From: Michael Wang <wangyun@linux.vnet.ibm.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: mingo@redhat.com, Peter Zijlstra <peterz@infradead.org>,
paul@paulmenage.org
Subject: [PATCH 1/5] cpusets: add basic variables
Date: Tue, 17 Jul 2012 17:03:56 +0800 [thread overview]
Message-ID: <50052A7C.4040104@linux.vnet.ibm.com> (raw)
From: Michael Wang <wangyun@linux.vnet.ibm.com>
Add the variables we need for the implementation of dynamical domain
flags.
Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
---
include/linux/sched.h | 22 ++++++++++++++++++++++
kernel/cpuset.c | 7 +++++++
2 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index ddc1225..9164309 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -922,8 +922,30 @@ static inline unsigned int group_first_cpu(struct sched_group *group)
return cpumask_first(sched_group_cpus(group));
}
+enum {
+#ifdef CONFIG_SCHED_SMT
+ SMT_DDF,
+#endif
+#ifdef CONFIG_SCHED_MC
+ MC_DDF,
+#endif
+#ifdef CONFIG_SCHED_BOOK
+ BOOK_DDF,
+#endif
+ CPU_DDF,
+ MAX_DDF,
+};
+
struct sched_domain_attr {
int relax_domain_level;
+ /*
+ * dynamical domain flag array cover all level, only useful if
+ * enable_ddf is 1.
+ * the static domain flags will be replaced by ddf on each domain
+ * level dynamically in set_domain_attribute.
+ */
+ u64 ddf[MAX_DDF];
+ int enable_ddf;
};
#define SD_ATTR_INIT (struct sched_domain_attr) { \
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 0cbc631..35fb585 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -105,6 +105,13 @@ struct cpuset {
/* for custom sched domain */
int relax_domain_level;
+ /*
+ * dynamical domain flag configuration for cpuset, see struct
+ * sched_domain_attr for detail.
+ */
+ u64 ddf[MAX_DDF];
+ int enable_ddf;
+
/* used for walking a cpuset hierarchy */
struct list_head stack_list;
};
--
1.7.4.1
reply other threads:[~2012-07-17 9:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50052A7C.4040104@linux.vnet.ibm.com \
--to=wangyun@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paul@paulmenage.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox