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
| ||
|
Date: Wed, 13 Oct 2010 00:13:26 -0700 From: Paul Turner <pjt@...gle.com> To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> Cc: bharata@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org, Dhaval Giani <dhaval.giani@...il.com>, Balbir Singh <balbir@...ux.vnet.ibm.com>, Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>, Srivatsa Vaddagiri <vatsa@...ibm.com>, Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>, Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <a.p.zijlstra@...llo.nl>, Pavel Emelyanov <xemul@...nvz.org>, Herbert Poetzl <herbert@...hfloor.at>, Avi Kivity <avi@...hat.com>, Chris Friesen <cfriesen@...tel.com>, Paul Menage <menage@...gle.com>, Mike Waychison <mikew@...gle.com>, Nikhil Rao <ncrao@...gle.com> Subject: Re: [PATCH v3 3/7] sched: throttle cfs_rq entities which exceed their local quota On Wed, Oct 13, 2010 at 12:00 AM, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote: > On Tue, 12 Oct 2010 23:44:29 -0700 > Paul Turner <pjt@...gle.com> wrote: > >> On Tue, Oct 12, 2010 at 11:34 PM, KAMEZAWA Hiroyuki >> <kamezawa.hiroyu@...fujitsu.com> wrote: >> > On Tue, 12 Oct 2010 13:22:02 +0530 >> > Bharata B Rao <bharata@...ux.vnet.ibm.com> wrote: > >> >> /* >> >> * Re-compute the task group their per cpu shares over the given domain. >> >> * This needs to be done in a bottom-up fashion because the rq weight of a >> >> @@ -1688,7 +1691,14 @@ static int tg_shares_up(struct task_grou >> >> usd_rq_weight = per_cpu_ptr(update_shares_data, smp_processor_id()); >> >> >> >> for_each_cpu(i, sched_domain_span(sd)) { >> >> - weight = tg->cfs_rq[i]->load.weight; >> >> + /* >> >> + * bandwidth throttled entities cannot contribute to load >> >> + * balance >> >> + */ >> >> + if (!cfs_rq_throttled(tg->cfs_rq[i])) >> >> + weight = tg->cfs_rq[i]->load.weight; >> >> + else >> >> + weight = 0; >> > >> > cpu.share and bandwidth control can't be used simultaneously or... >> > is this fair ? I'm not familiar with scheduler but this allows boost this tg. >> > Could you add a brief documentaion of a spec/feature. in the next post ? >> > >> >> Bandwidth control is orthogonal to shares, shares continue controls >> distribution of bandwidth when within quota. Bandwidth control only >> has 'perceivable' effect when you exceed your reservation within a >> quota period. >> >> What the above is doing is removing any throttled entities from the >> load-balancer's weight calculations (based on contribution from >> throttled entities) since these entities are already dequeued and >> cannot be balanced. >> >> Or have I misunderstood your question? >> > > Thank you for quick reply. > It seems I don't undestand what "cfs_rq_throttled()==1" means. cfs_rq_throttled() == 1 correlates to cfs_rq->throttled == 1. This is set when a cfs_rq exceeds it's local bandwidth quota and there is no quota available in the global pool to refresh it. At that point the cfs_rq is forcibly throttled, we accomplish this by a) Ending its execution b) Removing it from the entity tree (se->on_rq == 0) c) Setting the throttled flag The cfs_rq->throttled flag is required to track this state so that we do not re-enqueue a throttled entity on child wake-up. It also tells us here that we should update the accounting since these se's, while containing runnable entities, are not actually on_rq. > > Thanks, > -Kame > > -- 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