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: Tue, 17 Jul 2012 17:04:05 +0800 From: Michael Wang <wangyun@...ux.vnet.ibm.com> To: LKML <linux-kernel@...r.kernel.org> CC: mingo@...hat.com, Peter Zijlstra <peterz@...radead.org>, paul@...lmenage.org Subject: [PATCH 3/5] cpusets: enable the dynamical domain flags From: Michael Wang <wangyun@...ux.vnet.ibm.com> We will record the domain flags for cpuset in update_domain_attr and use it to replace the static domain flags in set_domain_attribute. Signed-off-by: Michael Wang <wangyun@...ux.vnet.ibm.com> --- kernel/cpuset.c | 7 +++++++ kernel/sched/core.c | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 67ee111..def8080 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -476,8 +476,15 @@ static int cpusets_overlap(struct cpuset *a, struct cpuset *b) static void update_domain_attr(struct sched_domain_attr *dattr, struct cpuset *c) { + int i; if (dattr->relax_domain_level < c->relax_domain_level) dattr->relax_domain_level = c->relax_domain_level; + /* record all the domain flags if cpuset want to use them */ + if (c->enable_ddf) { + dattr->enable_ddf = 1; + for (i = 0; i < MAX_DDF; i++) + dattr->ddf[i] = c->ddf[i]; + } return; } diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 3f9d368..7a1c886 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6461,7 +6461,15 @@ static void set_domain_attribute(struct sched_domain *sd, { int request; - if (!attr || attr->relax_domain_level < 0) { + if (!attr) + return; + + if (attr->enable_ddf) { + /* replace domain flags with ddf according to level */ + sd->flags = attr->ddf[sd->level]; + } + + if (attr->relax_domain_level < 0) { if (default_relax_domain_level < 0) return; else -- 1.7.4.1 -- 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