lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <87txqknt5m.fsf@sejong.aot.lge.com> Date: Mon, 14 Jan 2013 16:03:01 +0900 From: Namhyung Kim <namhyung@...nel.org> To: Alex Shi <alex.shi@...el.com> Cc: mingo@...hat.com, peterz@...radead.org, tglx@...utronix.de, akpm@...ux-foundation.org, arjan@...ux.intel.com, bp@...en8.de, pjt@...gle.com, efault@....de, vincent.guittot@...aro.org, gregkh@...uxfoundation.org, preeti@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org Subject: Re: [PATCH v3 16/22] sched: add power aware scheduling in fork/exec/wake On Sat, 5 Jan 2013 16:37:45 +0800, Alex Shi wrote: > This patch add power aware scheduling in fork/exec/wake. It try to > select cpu from the busiest while still has utilization group. That's > will save power for other groups. > > The trade off is adding a power aware statistics collection in group > seeking. But since the collection just happened in power scheduling > eligible condition, the worst case of hackbench testing just drops > about 2% with powersaving/balance policy. No clear change for > performance policy. > > I had tried to use rq load avg utilisation in this balancing, but since > the utilisation need much time to accumulate itself. It's unfit for any > burst balancing. So I use nr_running as instant rq utilisation. > > Signed-off-by: Alex Shi <alex.shi@...el.com> > --- [snip] > +/* > + * Try to collect the task running number and capacity of the doamin. > + */ > +static void get_sd_power_stats(struct sched_domain *sd, > + struct task_struct *p, struct sd_lb_stats *sds) > +{ > + struct sched_group *group; > + struct sg_lb_stats sgs; > + int sd_min_delta = INT_MAX; > + int cpu = task_cpu(p); > + > + group = sd->groups; > + do { > + long g_delta; > + unsigned long threshold; > + > + if (!cpumask_test_cpu(cpu, sched_group_mask(group))) > + continue; Why? That means only local group's stat will be accounted for this domain, right? Is it your intension? Thanks, Namhyung > + > + memset(&sgs, 0, sizeof(sgs)); > + get_sg_power_stats(group, sd, &sgs); > + > + if (sched_policy == SCHED_POLICY_POWERSAVING) > + threshold = sgs.group_weight; > + else > + threshold = sgs.group_capacity; > + > + g_delta = threshold - sgs.group_utils; > + > + if (g_delta > 0 && g_delta < sd_min_delta) { > + sd_min_delta = g_delta; > + sds->group_leader = group; > + } > + > + sds->sd_utils += sgs.group_utils; > + sds->total_pwr += group->sgp->power; > + } while (group = group->next, group != sd->groups); > + > + sds->sd_capacity = DIV_ROUND_CLOSEST(sds->total_pwr, > + SCHED_POWER_SCALE); > +} -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists