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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4CF51FE30200005A00077848@novprvoes0310.provo.novell.com>
Date:	Tue, 30 Nov 2010 14:01:39 -0700
From:	"Gregory Haskins" <ghaskins@...ell.com>
To:	"Steven Rostedt" <rostedt@...dmis.org>,
	"Dario Faggioli" <raistlin@...ux.it>
Cc:	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>,
	"Ingo Molnar" <mingo@...e.hu>,
	"Thomas Gleixner" <tglx@...utronix.de>,
	"Andrew Morton" <akpm@...l.org>,
	"linux-kernel" <linux-kernel@...r.kernel.org>,
	"Nick Piggin" <nickpiggin@...oo.com.au>
Subject: Re: [PATCH] sched: make pushable_tasks CONFIG_SMP dependant.

>>> On 11/30/2010 at 02:02 PM, in message
<1291143732.27486.36.camel@...dalf.stny.rr.com>, Steven Rostedt
<rostedt@...dmis.org> wrote: 
> On Tue, 2010-11-30 at 19:51 +0100, Dario Faggioli wrote:
>> As noted by Peter Zijlstra here https://lkml.org/lkml/2010/11/10/391
>> (while reviewing other stuff, though), tracking pushable tasks
>> only makes sense on SMPs.
> 
> Acked-by: Steven Rostedt <rostedt@...dmis.org>

Acked-by: Gregory Haskins <ghaskins@...ell.com>

> 
> -- Steve
> 
>> 
>> Signed-off-by: Dario Faggioli <raistlin@...ux.it>
>> ---
>>  include/linux/init_task.h |    9 ++++++++-
>>  include/linux/sched.h     |    2 ++
>>  kernel/sched.c            |    2 ++
>>  3 files changed, 12 insertions(+), 1 deletions(-)
>> 
>> diff --git a/include/linux/init_task.h b/include/linux/init_task.h
>> index 1f8c06c..6ed8812 100644
>> --- a/include/linux/init_task.h
>> +++ b/include/linux/init_task.h
>> @@ -12,6 +12,13 @@
>>  #include <linux/securebits.h>
>>  #include <net/net_namespace.h>
>>  
>> +#ifdef CONFIG_SMP
>> +# define INIT_PUSHABLE_TASKS(tsk)					\
>> +	.pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO),
>> +#else
>> +# define INIT_PUSHABLE_TASKS(tsk)
>> +#endif
>> +
>>  extern struct files_struct init_files;
>>  extern struct fs_struct init_fs;
>>  
>> @@ -137,7 +144,7 @@ extern struct cred init_cred;
>>  		.nr_cpus_allowed = NR_CPUS,				\
>>  	},								\
>>  	.tasks		= LIST_HEAD_INIT(tsk.tasks),			\
>> -	.pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO), \
>> +	INIT_PUSHABLE_TASKS(tsk)					\
>>  	.ptraced	= LIST_HEAD_INIT(tsk.ptraced),			\
>>  	.ptrace_entry	= LIST_HEAD_INIT(tsk.ptrace_entry),		\
>>  	.real_parent	= &tsk,						\
>> diff --git a/include/linux/sched.h b/include/linux/sched.h
>> index b0fc8ee..eae4131 100644
>> --- a/include/linux/sched.h
>> +++ b/include/linux/sched.h
>> @@ -1244,7 +1244,9 @@ struct task_struct {
>>  #endif
>>  
>>  	struct list_head tasks;
>> +#ifdef CONFIG_SMP
>>  	struct plist_node pushable_tasks;
>> +#endif
>>  
>>  	struct mm_struct *mm, *active_mm;
>>  #if defined(SPLIT_RSS_COUNTING)
>> diff --git a/kernel/sched.c b/kernel/sched.c
>> index 0debad9..166f9f8 100644
>> --- a/kernel/sched.c
>> +++ b/kernel/sched.c
>> @@ -2595,7 +2595,9 @@ void sched_fork(struct task_struct *p, int clone_flags)
>>  	/* Want to start with kernel preemption disabled. */
>>  	task_thread_info(p)->preempt_count = 1;
>>  #endif
>> +#ifdef CONFIG_SMP
>>  	plist_node_init(&p->pushable_tasks, MAX_PRIO);
>> +#endif
>>  
>>  	put_cpu();
>>  }
>> -- 
>> 1.7.2.3
>> 



--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ