public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mmotm] fix more cpuset breakage
       [not found] <200901290142.n0T1gq02009439@imap1.linux-foundation.org>
@ 2009-01-29  3:24 ` Randy Dunlap
  2009-01-29  9:44   ` Andrew Morton
  2009-01-29  3:29 ` mmotm 2009-01-28-17-42 uploaded (ata/ahci.c) Randy Dunlap
  1 sibling, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2009-01-29  3:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton

From: Randy Dunlap <randy.dunlap@oracle.com>

Not everyone uses cpusets, so fix the b0rked build (part 2):

kernel/kthread.c:243: error: 'struct task_struct' has no member named 'mems_allowed'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 kernel/kthread.c |    2 ++
 1 file changed, 2 insertions(+)

--- mmotm-2009-0128-1742.orig/kernel/kthread.c
+++ mmotm-2009-0128-1742/kernel/kthread.c
@@ -240,7 +240,9 @@ int kthreadd(void *unused)
 	set_user_nice(tsk, KTHREAD_NICE_LEVEL);
 	set_cpus_allowed_ptr(tsk, CPU_MASK_ALL_PTR);
 
+#ifdef CONFIG_CPUSETS
 	current->mems_allowed = node_possible_map;
+#endif
 	current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG;
 
 	for (;;) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mmotm 2009-01-28-17-42 uploaded (ata/ahci.c)
       [not found] <200901290142.n0T1gq02009439@imap1.linux-foundation.org>
  2009-01-29  3:24 ` [PATCH -mmotm] fix more cpuset breakage Randy Dunlap
@ 2009-01-29  3:29 ` Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2009-01-29  3:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton

akpm@linux-foundation.org wrote:
> The mm-of-the-moment snapshot 2009-01-28-17-42 has been uploaded to
> 
>    http://userweb.kernel.org/~akpm/mmotm/
> 
> and will soon be available at
> 
>    git://git.zen-sources.org/zen/mmotm.git
> 
> It contains the following patches against 2.6.29-rc3:

This function is in ahci.c 2 times:

drivers/ata/ahci.c:2578: error: redefinition of 'ahci_broken_system_poweroff'
drivers/ata/ahci.c:2552: error: previous definition of 'ahci_broken_system_poweroff' was here

-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -mmotm] fix more cpuset breakage
  2009-01-29  3:24 ` [PATCH -mmotm] fix more cpuset breakage Randy Dunlap
@ 2009-01-29  9:44   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2009-01-29  9:44 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Christoph Lameter, Miao Xie, Nick Piggin,
	Paul Menage

On Wed, 28 Jan 2009 19:24:24 -0800 Randy Dunlap <randy.dunlap@oracle.com> wrote:

> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Not everyone uses cpusets, so fix the b0rked build (part 2):
> 
> kernel/kthread.c:243: error: 'struct task_struct' has no member named 'mems_allowed'
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
>  kernel/kthread.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- mmotm-2009-0128-1742.orig/kernel/kthread.c
> +++ mmotm-2009-0128-1742/kernel/kthread.c
> @@ -240,7 +240,9 @@ int kthreadd(void *unused)
>  	set_user_nice(tsk, KTHREAD_NICE_LEVEL);
>  	set_cpus_allowed_ptr(tsk, CPU_MASK_ALL_PTR);
>  
> +#ifdef CONFIG_CPUSETS
>  	current->mems_allowed = node_possible_map;
> +#endif
>  	current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG;
>  
>  	for (;;) {

OK, enough ifdefs.  I did this:

--- 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 */
--- 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);
 
--- 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 (;;) {
_


Also, I think we're still waiting for someone to tell us why
kernel_init() (at least) needed that chantge?

And why did kthreadd need changing, come to that?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-29  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200901290142.n0T1gq02009439@imap1.linux-foundation.org>
2009-01-29  3:24 ` [PATCH -mmotm] fix more cpuset breakage Randy Dunlap
2009-01-29  9:44   ` Andrew Morton
2009-01-29  3:29 ` mmotm 2009-01-28-17-42 uploaded (ata/ahci.c) Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox