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: Mon, 27 Jun 2011 21:38:13 -0700 From: Paul Turner <pjt@...gle.com> To: Peter Zijlstra <a.p.zijlstra@...llo.nl> Cc: linux-kernel@...r.kernel.org, Bharata B Rao <bharata@...ux.vnet.ibm.com>, 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>, Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>, Ingo Molnar <mingo@...e.hu>, Pavel Emelyanov <xemul@...nvz.org> Subject: Re: [patch 12/16] sched: prevent interactions with throttled entities On Thu, Jun 23, 2011 at 4:49 AM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote: > On Tue, 2011-06-21 at 00:17 -0700, Paul Turner wrote: >> @@ -2635,8 +2704,10 @@ static int update_shares_cpu(struct task >> >> raw_spin_lock_irqsave(&rq->lock, flags); >> >> - update_rq_clock(rq); >> - update_cfs_load(cfs_rq, 1); >> + if (!throttled_hierarchy(cfs_rq)) { >> + update_rq_clock(rq); >> + update_cfs_load(cfs_rq, 1); >> + } >> >> /* > > OK, so we can't contribute to load since we're throttled, but > tg->load_weight might have changed meanwhile? > What's why we continue to update their shares (also at enqueue/dequeue) but not their load, so that the weight will be correct when unthrottling* > Also, update_cfs_shares()->reweight_entity() can dequeue/enqueue the > entity, doesn't that require an up-to-date rq->clock? > It shouldn't, we're only doing an account_enqueue/dequeue, and there shouldn't be a cfs_rq->curr to lead to updates (on a throttled entity). I suppose we might do something interesting in the case of a race with alb forcing something throttled to run intersecting with update_shares()**. The original concern here was [*] above, keeping shares current for the unthrottle. *However*, with the hierarchal throttle accounting in the current version, I think this can be improved. Instead, we should skip update_shares/update_cfs_shares for all throttled entities and simply do a final update shares when throttle_count goes to 0 in tg_throttle_down (which also avoids **). I thought of doing this at the end of preparing the last patchset but by that time it was tested and I didn't want to change things around here at the last minute. Will fix for this week. > > -- 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