Srivatsa S. Bhat
4a70d2d990
smpboot, idle: Fix comment mismatch over idle_threads_init()
...
The comment over idle_threads_init() really talks about the functionality
of idle_init(). Move that comment to idle_init(), and add a suitable
comment over idle_threads_init().
Signed-off-by: Srivatsa S. Bhat <[email protected] >
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected] >
2012-05-24 22:58:08 +02:00
Srivatsa S. Bhat
ee74d13229
smpboot, idle: Optimize calls to smp_processor_id() in idle_threads_init()
...
While trying to initialize idle threads for all cpus, idle_threads_init()
calls smp_processor_id() in a loop, which is unnecessary. The intent
is to initialize idle threads for all non-boot cpus. So just use a variable
to note the boot cpu and use it in the loop.
Signed-off-by: Srivatsa S. Bhat <[email protected] >
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected] >
2012-05-24 22:58:08 +02:00
Suresh Siddha
3bb5d2ee39
smp, idle: Allocate idle thread for each possible cpu during boot
...
percpu areas are already allocated during boot for each possible cpu.
percpu idle threads can be considered as an extension of the percpu areas,
and allocate them for each possible cpu during boot.
This will eliminate the need for workqueue based idle thread allocation.
In future we can move the idle thread area into the percpu area too.
[ tglx: Moved the loop into smpboot.c and added an error check when
the init code failed to allocate an idle thread for a cpu which
should be onlined ]
Signed-off-by: Suresh Siddha <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Rusty Russell <[email protected] >
Cc: Paul E. McKenney <[email protected] >
Cc: Srivatsa S. Bhat <[email protected] >
Cc: Tejun Heo <[email protected] >
Cc: David Rientjes <[email protected] >
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected] >
2012-05-03 19:32:34 +02:00
Thomas Gleixner
29d5e0476e
smp: Provide generic idle thread allocation
...
All SMP architectures have magic to fork the idle task and to store it
for reusage when cpu hotplug is enabled. Provide a generic
infrastructure for it.
Create/reinit the idle thread for the cpu which is brought up in the
generic code and hand the thread pointer to the architecture code via
__cpu_up().
Note, that fork_idle() is called via a workqueue, because this
guarantees that the idle thread does not get a reference to a user
space VM. This can happen when the boot process did not bring up all
possible cpus and a later cpu_up() is initiated via the sysfs
interface. In that case fork_idle() would be called in the context of
the user space task and take a reference on the user space VM.
Signed-off-by: Thomas Gleixner <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Rusty Russell <[email protected] >
Cc: Paul E. McKenney <[email protected] >
Cc: Srivatsa S. Bhat <[email protected] >
Cc: Matt Turner <[email protected] >
Cc: Russell King <[email protected] >
Cc: Mike Frysinger <[email protected] >
Cc: Jesper Nilsson <[email protected] >
Cc: Richard Kuo <[email protected] >
Cc: Tony Luck <[email protected] >
Cc: Hirokazu Takata <[email protected] >
Cc: Ralf Baechle <[email protected] >
Cc: David Howells <[email protected] >
Cc: James E.J. Bottomley <[email protected] >
Cc: Benjamin Herrenschmidt <[email protected] >
Cc: Martin Schwidefsky <[email protected] >
Cc: Paul Mundt <[email protected] >
Cc: David S. Miller <[email protected] >
Cc: Chris Metcalf <[email protected] >
Cc: Richard Weinberger <[email protected] >
Cc: [email protected]
Acked-by: Venkatesh Pallipadi <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
2012-04-26 12:06:09 +02:00
Thomas Gleixner
38498a67aa
smp: Add generic smpboot facility
...
Start a new file, which will hold SMP and CPU hotplug related generic
infrastructure.
Signed-off-by: Thomas Gleixner <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Rusty Russell <[email protected] >
Cc: Paul E. McKenney <[email protected] >
Cc: Srivatsa S. Bhat <[email protected] >
Cc: Matt Turner <[email protected] >
Cc: Russell King <[email protected] >
Cc: Mike Frysinger <[email protected] >
Cc: Jesper Nilsson <[email protected] >
Cc: Richard Kuo <[email protected] >
Cc: Tony Luck <[email protected] >
Cc: Hirokazu Takata <[email protected] >
Cc: Ralf Baechle <[email protected] >
Cc: David Howells <[email protected] >
Cc: James E.J. Bottomley <[email protected] >
Cc: Benjamin Herrenschmidt <[email protected] >
Cc: Martin Schwidefsky <[email protected] >
Cc: Paul Mundt <[email protected] >
Cc: David S. Miller <[email protected] >
Cc: Chris Metcalf <[email protected] >
Cc: Richard Weinberger <[email protected] >
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
2012-04-26 12:06:09 +02:00