From: Andrew Morton <akpm@linux-foundation.org>
To: Valdis.Kletnieks@vt.edu
Cc: Miao Xie <miaox@cn.fujitsu.com>, linux-kernel@vger.kernel.org
Subject: Re: mmotm 2009-01-28-02-17 uploaded
Date: Thu, 29 Jan 2009 09:44:45 -0800 [thread overview]
Message-ID: <20090129094445.67fab3e4.akpm@linux-foundation.org> (raw)
In-Reply-To: <10146.1233200604@turing-police.cc.vt.edu>
On Wed, 28 Jan 2009 22:43:24 -0500 Valdis.Kletnieks@vt.edu wrote:
> On Wed, 28 Jan 2009 02:19:09 PST, akpm@linux-foundation.org said:
> > The mm-of-the-moment snapshot 2009-01-28-02-17 has been uploaded to
> >
> > http://userweb.kernel.org/~akpm/mmotm/
>
> cpuset-fix-allocating-page-cache-slab-object-on-the-unallowed-node-when-memory-spread-is-set.patch
>
> breaks compiles with CONFIG_CPUSETS=n
>
> CC init/main.o
> init/main.c: In function 'kernel_init':
> init/main.c:876: error: 'struct task_struct' has no member named 'mems_allowed'
> make[1]: *** [init/main.o] Error 1
>
> Looks like it adds a reference to task->mems_allowed to kernel/main.c
> and kernel/kthreads.c and neither one is wrapped with #ifdef CONFIG_CPUSETS
> or anything.
>
yup. mmotm-2009-01-29-02-29 has
diff -puN include/linux/cpuset.h~cpuset-fix-allocating-page-cache-slab-object-on-the-unallowed-node-when-memory-spread-is-set-fix-2 include/linux/cpuset.h
--- a/include/linux/cpuset.h~cpuset-fix-allocating-page-cache-slab-object-on-the-unallowed-node-when-memory-spread-is-set-fix-2
+++ a/include/linux/cpuset.h
@@ -79,6 +79,11 @@ extern void rebuild_sched_domains(void);
extern void cpuset_print_task_mems_allowed(struct task_struct *p);
+static inline void set_mems_allowed(nodemask_t nodemask)
+{
+ current->mems_allowed = nodemask;
+}
+
#else /* !CONFIG_CPUSETS */
static inline int cpuset_init(void) { return 0; }
@@ -163,6 +168,10 @@ static inline void cpuset_print_task_mem
{
}
+static inline void set_mems_allowed(nodemask_t nodemask)
+{
+}
+
#endif /* !CONFIG_CPUSETS */
#endif /* _LINUX_CPUSET_H */
diff -puN init/main.c~cpuset-fix-allocating-page-cache-slab-object-on-the-unallowed-node-when-memory-spread-is-set-fix-2 init/main.c
--- a/init/main.c~cpuset-fix-allocating-page-cache-slab-object-on-the-unallowed-node-when-memory-spread-is-set-fix-2
+++ a/init/main.c
@@ -873,7 +873,7 @@ static int __init kernel_init(void * unu
*/
init_pid_ns.child_reaper = current;
- current->mems_allowed = node_possible_map;
+ set_mems_allowed(node_possible_map);
cad_pid = task_pid(current);
diff -puN kernel/kthread.c~cpuset-fix-allocating-page-cache-slab-object-on-the-unallowed-node-when-memory-spread-is-set-fix-2 kernel/kthread.c
--- a/kernel/kthread.c~cpuset-fix-allocating-page-cache-slab-object-on-the-unallowed-node-when-memory-spread-is-set-fix-2
+++ a/kernel/kthread.c
@@ -13,6 +13,8 @@
#include <linux/file.h>
#include <linux/module.h>
#include <linux/mutex.h>
+#include <linux/cpuset.h>
+
#include <trace/sched.h>
#define KTHREAD_NICE_LEVEL (-5)
@@ -242,7 +244,7 @@ int kthreadd(void *unused)
set_user_nice(tsk, KTHREAD_NICE_LEVEL);
set_cpus_allowed_ptr(tsk, CPU_MASK_ALL_PTR);
- current->mems_allowed = node_possible_map;
+ set_mems_allowed(node_possible_map);
current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG;
for (;;) {
_
next prev parent reply other threads:[~2009-01-29 17:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200901281019.n0SAJ9C6013727@imap1.linux-foundation.org>
2009-01-28 16:56 ` mmotm 2009-01-28-02-17 uploaded (i386 build errors: cpusets & kexec) Randy Dunlap
2009-01-29 0:30 ` Andrew Morton
2009-01-29 2:28 ` Simon Horman
2009-01-29 12:09 ` Neil Horman
2009-01-29 14:20 ` Vivek Goyal
2009-01-29 19:28 ` Neil Horman
2009-01-29 18:01 ` Andrew Morton
2009-01-29 19:27 ` Neil Horman
2009-01-29 19:48 ` Andrew Morton
2009-01-29 21:15 ` Neil Horman
2009-01-29 3:43 ` mmotm 2009-01-28-02-17 uploaded Valdis.Kletnieks
2009-01-29 17:44 ` Andrew Morton [this message]
2009-01-29 4:03 ` Valdis.Kletnieks
2009-01-29 16:25 ` mmotm 2009-01-28-02-17 uploaded - docking station issues Valdis.Kletnieks
2009-01-31 5:03 ` Andrew Morton
2009-01-31 8:40 ` Valdis.Kletnieks
2009-01-31 8:52 ` Andrew Morton
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=20090129094445.67fab3e4.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Valdis.Kletnieks@vt.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=miaox@cn.fujitsu.com \
/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