Re: [PATCH] simplify cpu_hotplug_begin()/put_online_cpus()

2008-02-18 Thread Gautham R Shenoy
On Sat, Feb 16, 2008 at 08:22:54PM +0300, Oleg Nesterov wrote: This looks neat and clean. Acked-by: Gautham R Shenoy <[EMAIL PROTECTED]> > cpu_hotplug_begin() must be always called under cpu_add_remove_lock, this > means > that only one process can be cpu_hotplug.active_writ

Re: [PATCH 2/2] Markers Implementation for Preempt RCU Boost Tracing

2008-01-04 Thread Gautham R Shenoy
don't you > simply use smp_processor_id() right here ? > Agreed. Also in patch 1, in cases where we're using markers in place of RCU_TRACE_ME(), we need not pass the parameter and simply use smp_processor_id(). It's only the RCU_TRACE_RDP() that requires cpuid to be passed. Thanks

__get_cpu_var() called from a preempt-unsafe context in __rcu_preempt_unboost() ?

2008-01-04 Thread Gautham R Shenoy
get_cpu_var() safe in this context, since we've already enabled the local interrupts and we're not in a preempt_disabled() ? Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price tag of responsibility, which is still a barg

Re: broken suspend (sched related) [Was: 2.6.24-rc4-mm1]

2007-12-10 Thread Gautham R Shenoy
pus() from the watchdog thread's context, which is going to be kthread_stop'ed from a cpu-hotplug context. This is what I think was happening in the case reported by Jiri. Please find the patch below. Thanks and Regards gautham. commit 15bfb662b35c609490185fba2fd4713d230b9374 Author: Gautham

Re: broken suspend (sched related) [Was: 2.6.24-rc4-mm1]

2007-12-10 Thread Gautham R Shenoy
ing the check, then could we use the following patch commit a49736844717e00f7a37c96368cea8fec7eb31cf Author: Gautham R Shenoy <[EMAIL PROTECTED]> Date: Mon Dec 10 15:43:32 2007 +0530 CPU-Hotplug: Add try_get_online_cpus() Add the fastpath code, try_get_online_cpus() which will return

Re: broken suspend (sched related) [Was: 2.6.24-rc4-mm1]

2007-12-10 Thread Gautham R Shenoy
On Mon, Dec 10, 2007 at 11:21:57AM +0100, Ingo Molnar wrote: > > * Gautham R Shenoy <[EMAIL PROTECTED]> wrote: > > > > i'm wondering, what's the proper CPU-hotplug safe sequence here > > > then? I'm picking a CPU number from cpu_online_map, a

Re: broken suspend (sched related) [Was: 2.6.24-rc4-mm1]

2007-12-10 Thread Gautham R Shenoy
On Dec 10, 2007 4:58 PM, Ingo Molnar <[EMAIL PROTECTED]> wrote: > > * Gautham R Shenoy <[EMAIL PROTECTED]> wrote: > > > > say we've got 100 CPUs, so we've got 100 watchdog tasks running - > > > one for each CPU. Checking for hung tasks is a g

Re: 2.6.24-rc5-mm1

2007-12-13 Thread Gautham R Shenoy
disable-decoding-during-sizing-of-bars.patch. > > - git-sched was dropped due to breaking suspend-to-RAM. Is it the same suspend-to-RAM problem that Jiri Slaby reported here --> http://lkml.org/lkml/2007/12/7/125 The problem has been identified and a fix patch was provided. Thanks an

[RFC PATCH 0/6] RCU: Preemptible-RCU

2007-12-13 Thread Gautham R Shenoy
and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price tag of responsibility, which is still a bargain, because Freedom is priceless!" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a mess

[RFC PATCH 1/6] Preempt-RCU: Use softirq instead of tasklets for RCU

2007-12-13 Thread Gautham R Shenoy
cur while processing callbacks. The discussion of the related theoretical race pointed out by James Huang can be found here --> http://lkml.org/lkml/2007/11/20/603 Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Signed-off-by: Dipankar

[RFC PATCH 2/6] Preempt-RCU: Reorganize RCU code into rcuclassic.c and rcupdate.c

2007-12-13 Thread Gautham R Shenoy
ration for subsequently merging the preemptible RCU implementation. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> Signed-off-by: Dipankar Sarma <[EMAIL PROTECTED]> Signed-off-by: Paul E. McKenney <[EMAIL PROTECTED]> --- include/linux/rcuclassic.h | 161

[RFC PATCH 3/6] Preempt-RCU: Fix rcu_barrier for preemptive environment

2007-12-13 Thread Gautham R Shenoy
off-by: Gautham R Shenoy <[EMAIL PROTECTED]> Signed-off-by: Dipankar Sarma <[EMAIL PROTECTED]> Signed-off-by: Paul E. McKenney <[EMAIL PROTECTED]> --- kernel/rcuclassic.c |2 +- kernel/rcupdate.c | 10 ++ 2 files changed, 11 insertions(+), 1 deletions(-) diff --git

[RFC PATCH 4/6] Preempt-RCU: Implementation

2007-12-13 Thread Gautham R Shenoy
can be switched to at compiler. Also includes RCU tracing summarized in debugfs. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> Signed-off-by: Dipankar Sarma <[EMAIL PROTECTED]> Signed-off-by: Paul E. McKenney <[EMAIL PROTECTED]> --- include/linux/rcuclassic.h

[RFC PATCH 5/6] Preempt-RCU: CPU Hotplug handling

2007-12-13 Thread Gautham R Shenoy
Preempt-RCU: CPU Hotplug handling From: Paul E. McKenney <[EMAIL PROTECTED]> This patch allows preemptible RCU to tolerate CPU-hotplug operations. It accomplishes this by maintaining a local copy of a map of online CPUs, which it accesses under its own lock. Signed-off-by: Gautham R

[RFC PATCH 6/6] Preempt-RCU: Update RCU Documentation.

2007-12-13 Thread Gautham R Shenoy
quot;rcu" for the rcu_read_lock() API, "rcu_sync" for rcu_read_lock() with synchronous reclamation, @@ -82,8 +83,6 @@ be evident. ;-) The entries are as follows: -o "ggp": The number of counter flips (or batches) since boot. - o "rtc":

Re: [RFC PATCH 6/6] Preempt-RCU: Update RCU Documentation.

2007-12-13 Thread Gautham R Shenoy
On Thu, Dec 13, 2007 at 09:42:53PM +0100, Ingo Molnar wrote: > > * Gautham R Shenoy <[EMAIL PROTECTED]> wrote: > > > Preempt-RCU: Update RCU Documentation. > > > > From: Paul E. McKenney <[EMAIL PROTECTED]> > > > > This patch updates the RCU d

Re: [RFC PATCH 0/6] RCU: Preemptible-RCU

2007-12-13 Thread Gautham R Shenoy
Hi Steve, On Thu, Dec 13, 2007 at 12:36:47PM -0500, Steven Rostedt wrote: > On Thu, 13 Dec 2007, Gautham R Shenoy wrote: > > > > > Currently it is based against the latest linux-2.6-sched-devel.git > > > > Awaiting your feedback! > > Hi Gautham, > >

Re: [PATCH RFC 6/9] RCU priority boosting for preemptible RCU

2007-10-05 Thread Gautham R Shenoy
list_add_tail(&p->run_list, ¤t->run_list); > p->array = current->array; > p->array->nr_active++; > @@ -3590,6 +3592,8 @@ asmlinkage void __sched schedule(void) > } > profile_hit(SCH

Re: [PATCH RFC 6/9] RCU priority boosting for preemptible RCU

2007-10-05 Thread Gautham R Shenoy
On Fri, Oct 05, 2007 at 08:24:21AM -0400, Steven Rostedt wrote: > > > > On Fri, 5 Oct 2007, Gautham R Shenoy wrote: > > > On Mon, Sep 10, 2007 at 11:39:01AM -0700, Paul E. McKenney wrote: > > > > [snip] > > > > > + > > > +/* &

Re: [RFC PATCH 1/3] cpu-hotplug: Refcount Based Cpu Hotplug implementation

2007-11-20 Thread Gautham R Shenoy
void unregister_cpu_notifier(struct notifier_block *nb) > { > } > > +static inline void cpu_hotplug_init(void) > +{ > +} > + > #endif /* CONFIG_SMP */ > extern struct sysdev_class cpu_sysdev_class; > -extern void cpu_hotplug_init(void); > extern void cpu_maps_u

[RFC PATCH 3/3] cpu-hotplug: Replace per-subsystem mutexes with get_online_cpus()

2007-11-15 Thread Gautham R Shenoy
From: Gautham R Shenoy <[EMAIL PROTECTED]> Date: Thu, 15 Nov 2007 18:14:29 +0530 Subject: [PATCH 3/3] cpu-hotplug: Replace per-subsystem mutexes with get_online_cpus() This patch converts the known per-subsystem mutexes to get_online_cpus put_online_cpus. It also eliminates the CPU_LOCK_A

[RFC PATCH 2/3] cpu-hotplug: Replace lock_cpu_hotplug() with get_online_cpus()

2007-11-15 Thread Gautham R Shenoy
From: Gautham R Shenoy <[EMAIL PROTECTED]> Date: Thu, 15 Nov 2007 18:14:29 +0530 Subject: [PATCH 2/3] cpu-hotplug: Replace lock_cpu_hotplug() with get_online_cpus() Replace all lock_cpu_hotplug/unlock_cpu_hotplug from the kernel and use get_online_cpus and put_online_cpus instead

[RFC PATCH 1/3] cpu-hotplug: Refcount Based Cpu Hotplug implementation

2007-11-15 Thread Gautham R Shenoy
From: Gautham R Shenoy <[EMAIL PROTECTED]> Date: Thu, 15 Nov 2007 18:14:20 +0530 Subject: [PATCH 1/3] cpu-hotplug: Refcount based Cpu Hotplug implementation This patch implements a Refcount + Waitqueue based model for cpu-hotplug. Now, a thread which wants to prevent cpu-hotplug, will bum

[RFC PATCH 0/3] Refcount Based Cpu Hotplug V3

2007-11-15 Thread Gautham R Shenoy
s and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price tag of responsibility, which is still a bargain, because Freedom is priceless!" - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bo

Re: cpu hotplug support broken in 2.6.23-rc3

2007-08-29 Thread Gautham R Shenoy
fferent platforms as well. It's a good idea to add that info to the MAINTAINERS file as well. Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price tag of responsibility, which is still a bargain, because Freedom is pric

Re: cpusets vs cpu-hotplug interaction is broken?

2007-08-29 Thread Gautham R Shenoy
the cpus while they are in the offlined state. And on cpu_up, if the cpu is present in the task's allowed mask, it can run on that cpu, which is a good thing. The two users of cpuset_cpus_allowed - sched_setaffinity and pdflush don't seem to require the online cpu information. Paul,

Re: cpusets vs cpu-hotplug interaction is broken?

2007-08-29 Thread Gautham R Shenoy
On Wed, Aug 29, 2007 at 02:52:04PM +0400, Oleg Nesterov wrote: > On 08/29, Gautham R Shenoy wrote: > > > > On Tue, Aug 28, 2007 at 05:48:53PM +0400, Oleg Nesterov wrote: > > > (cpu-hotplug experts cc'ed) > > > > > > On 08/25, Oleg Nesterov wrote:

Cpu-Hotplug and Real-Time

2007-08-07 Thread Gautham R Shenoy
set_prio(p, current->prio); yield(); /* Reset priority back to the original value */ set_prio(p, old_prio); } Thoughts? Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price tag of responsibility

Re: [-mm PATCH 6/9] Memory controller add per container LRU and reclaim (v4)

2007-07-30 Thread Gautham R Shenoy
patch should do > it. > > Signed-off-by: Dhaval Giani <[EMAIL PROTECTED]> > Signed-off-by: Gautham Shenoy R <[EMAIL PROTECTED]> Gautham R Shenoy > > > Index: linux-2.6.23-rc1/mm/memcontrol.c > =

Re: rt ptracer can monopolize CPU (was: Cpu-Hotplug and Real-Time)

2007-08-16 Thread Gautham R Shenoy
On Thu, Aug 09, 2007 at 09:03:53PM +0400, Oleg Nesterov wrote: > On 08/07, Oleg Nesterov wrote: > > > > On 08/07, Gautham R Shenoy wrote: > > > > > > A will now call kthread_bind(B, cpu1). > > > kthread_bind(), calls wait_task_inactive(B), to ensu

Re: [RFC PATCH 2/4] Rename lock_cpu_hotplug to get_online_cpus

2007-10-18 Thread Gautham R Shenoy
Hi Nathan, > Gautham R Shenoy wrote: > > On Thu, Oct 18, 2007 at 03:22:21AM -0500, Nathan Lynch wrote: > > > Gautham R Shenoy wrote: > > > > Hi Nathan, > > > > > Hi Gautham- > > > > > > > > > > Gautham R Shenoy wrote:

Re: [RFC PATCH 2/4] Rename lock_cpu_hotplug to get_online_cpus

2007-10-21 Thread Gautham R Shenoy
named ? Personally I would propose the following names to reflect the behaviour, but if the community is okay with the word "lock" in the API's I don't have any problems renaming them to what you've suggested. /* * Api's which ensure that the cpu_present_map and the cpu

Re: [RFC PATCH 3/4] Replace per-subsystem mutexes with get_online_cpus

2007-10-21 Thread Gautham R Shenoy
On Sun, Oct 21, 2007 at 03:39:17PM +0400, Oleg Nesterov wrote: > On 10/16, Gautham R Shenoy wrote: > > > > This patch converts the known per-subsystem cpu_hotplug mutexes to > > get_online_cpus put_online_cpus. > > It also eliminates the CPU_LOCK_ACQUIRE a

[RFC PATCH 0/5] Refcount based Cpu Hotplug. V2

2007-10-23 Thread Gautham R Shenoy
ainst 2.6.23-mm1 has behaved well when it was stress tested with kernbench running while continuously performing cpu-hotplug operations on i386, x86_64 and ppc64. Awaiting your feedback. Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a p

[RFC PATCH 1/5] Refcount Based Cpu Hotplug implementation

2007-10-23 Thread Gautham R Shenoy
an ongoing cpu-hotplug operation are blocked until the cpu-hotplug operation is over. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> Signed-off-by: Paul Jackson <[EMAIL PROTECTED]> [For !CONFIG_HOTPLUG_CPU ] --- include/linux/cpu.h |3 + init/main.c |1

[RFC PATCH 2/5] Replace lock_cpu_hotplug() with get_online_cpus()

2007-10-23 Thread Gautham R Shenoy
o any of the local data structures. Hence the changes needs to be reviewed. In case of pseries_add_processor/pseries_remove_processor, use cpu_maps_update_begin()/cpu_maps_update_done() as we're modifying the cpu_present_map there. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]>

[RFC PATCH 3/5] Replace per-subsystem mutexes with get_online_cpus()

2007-10-23 Thread Gautham R Shenoy
This patch converts the known per-subsystem mutexes to get_online_cpus put_online_cpus. It also eliminates the CPU_LOCK_ACQUIRE and CPU_LOCK_RELEASE hotplug notification events. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> --- include/linux/notifier.h |4 +--- kernel

[RFC PATCH 4/5] Remove CPU_DEAD/CPU_UP_CANCELLED handling from workqueue.c

2007-10-23 Thread Gautham R Shenoy
accesses to the workqueues list. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> --- kernel/workqueue.c | 49 ++--- 1 file changed, 18 insertions(+), 31 deletions(-) Index: linux-2.6.23/kernel/workq

[RFC PATCH 5/5] Update get_online_cpus() in Documentation/cpu-hotplug.c

2007-10-23 Thread Gautham R Shenoy
Update the documentation for cpu hotplug to reflect the use of newly added API's get_online_cpus()/put_online_cpus(); Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> --- Documentation/cpu-hotplug.txt | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) Index: l

Re: [RFC PATCH 4/5] Remove CPU_DEAD/CPU_UP_CANCELLED handling from workqueue.c

2007-10-24 Thread Gautham R Shenoy
Hello Rusty, On Wed, Oct 24, 2007 at 05:21:04PM +1000, Rusty Russell wrote: > On Wednesday 24 October 2007 15:37:16 Gautham R Shenoy wrote: > > @@ -712,7 +712,7 @@ static void start_workqueue_thread(struc > > > > if (p != NULL) { > &g

Re: [RFC PATCH 4/5] Remove CPU_DEAD/CPU_UP_CANCELLED handling from workqueue.c

2007-10-24 Thread Gautham R Shenoy
On Wed, Oct 24, 2007 at 05:38:18PM +0400, Oleg Nesterov wrote: > On 10/24, Gautham R Shenoy wrote: > > > > (reordered) > > > With get_online_cpus()/put_online_cpus(), we can eliminate > > the workqueue_mutex and reintroduce the workqueue_lock, > > whic

Re: [RFC PATCH 0/5] Refcount based Cpu Hotplug. V2

2007-10-24 Thread Gautham R Shenoy
On Wed, Oct 24, 2007 at 10:17:54PM +0400, Oleg Nesterov wrote: > On 10/24, Gautham R Shenoy wrote: > > > > On Wed, Oct 24, 2007 at 10:04:41AM -0700, Christoph Lameter wrote: > > > On Wed, 24 Oct 2007, Gautham R Shenoy wrote: > > > > > > > This is th

Re: [RFC PATCH 0/5] Refcount based Cpu Hotplug. V2

2007-10-25 Thread Gautham R Shenoy
On Wed, Oct 24, 2007 at 10:04:41AM -0700, Christoph Lameter wrote: > On Wed, 24 Oct 2007, Gautham R Shenoy wrote: > > > This is the version 2 of the refcount based cpu-hotplug "locking" > > implementation. > > Uggh. This introduces a global lock that has t

[PATCH] Use raw_smp_processor_id() in rcu_random()

2007-10-12 Thread Gautham R Shenoy
6/0x39 [rcutorture] [] rcu_torture_fakewriter+0x4d/0xc5 [rcutorture] rcu_random() can do with raw_smp_processor_id() as a parameter to cpu_clock() in this particular context. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> --- kernel/rcutorture.c |3 ++- 1 file changed, 2 insertions(+)

[PATCH] Add irq protection in the percpu-counters cpu-hotplug-callback path

2007-10-14 Thread Gautham R Shenoy
] sysenter_past_esp+0x5f/0x99 === ---> From: Gautham R Shenoy <[EMAIL PROTECTED]> Some of the per-cpu counters and thus their locks are accessed from IRQ contexts. This can cause a deadlock if it interrupts a cpu-offline thread which is transferring a dead-cpu's c

[RFC PATCH 0/4] Refcount Based Cpu-Hotplug Revisit.

2007-10-16 Thread Gautham R Shenoy
h 4/4: Eliminates the CPU_DEAD and CPU_UP_CANCELLED event handling from workqueue.c The patch series has survived an overnight test with kernbench on i386. and has been tested with Paul Mckenney's latest preemptible rcu code. Awaiting thy feedback! Thanks and Regards gautham. -- Gautha

[RFC PATCH 1/4] Refcount Based Cpu-Hotplug Implementation

2007-10-16 Thread Gautham R Shenoy
an ongoing cpu-hotplug operation are blocked until the cpu-hotplug operation is over. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> --- include/linux/cpu.h |2 + init/main.c |1 kernel/cpu.c| 91 3 files c

[RFC PATCH 2/4] Rename lock_cpu_hotplug to get_online_cpus

2007-10-16 Thread Gautham R Shenoy
Replace all lock_cpu_hotplug/unlock_cpu_hotplug from the kernel and use get_online_cpus and put_online_cpus instead as it highlights the refcount semantics in these operations. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> --- arch/i386/kernel/cpu/mtrr/main.c

[RFC PATCH 3/4] Replace per-subsystem mutexes with get_online_cpus

2007-10-16 Thread Gautham R Shenoy
This patch converts the known per-subsystem cpu_hotplug mutexes to get_online_cpus put_online_cpus. It also eliminates the CPU_LOCK_ACQUIRE and CPU_LOCK_RELEASE hotplug notification events. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> --- include/linux/notifier.h |4 +---

[RFC PATCH 4/4] Remove CPU_DEAD/CPU_UP_CANCELLED handling from workqueue.c

2007-10-16 Thread Gautham R Shenoy
the cpu goes offline. Since no one can queue any work on an offlined cpu, this thread will be forever sleeping, untill someone onlines the cpu. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> --- kernel/workqueue.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-)

Re: [RFC PATCH 0/4] Refcount Based Cpu-Hotplug Revisit.

2007-10-16 Thread Gautham R Shenoy
ood point! I'll add the comment before cpu_hotplug_begin(). > > Linus Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price tag of responsibility, which is still a bargain, because Freedom is priceless!"

Re: [RFC PATCH 1/4] Refcount Based Cpu-Hotplug Implementation

2007-10-16 Thread Gautham R Shenoy
On Wed, Oct 17, 2007 at 10:47:41AM +1000, Rusty Russell wrote: > On Tuesday 16 October 2007 20:34:17 Gautham R Shenoy wrote: > > This patch implements a Refcount + Waitqueue based model for > > cpu-hotplug. > > Hi Gautham, Hi Rusty, > > I can't see where

Re: [RFC PATCH 1/4] Refcount Based Cpu-Hotplug Implementation

2007-10-17 Thread Gautham R Shenoy
Hi Paul, On Wed, Oct 17, 2007 at 04:27:09AM -0700, Paul Jackson wrote: > With the following patch, the four cpu hotplug patches by > Gautham R Shenoy boot successfully on my sn2_defconfig ia64 > SN2 Altix system. > > This patch moves the cpu_hotplug_init() code outside

Re: [RFC PATCH 1/4] Refcount Based Cpu-Hotplug Implementation

2007-10-17 Thread Gautham R Shenoy
On Wed, Oct 17, 2007 at 04:29:12PM +1000, Rusty Russell wrote: > On Wednesday 17 October 2007 15:37:54 Gautham R Shenoy wrote: > > On Wed, Oct 17, 2007 at 10:47:41AM +1000, Rusty Russell wrote: > > > On Tuesday 16 October 2007 20:34:17 Gautham R Shenoy wrote: > > >

Re: [RFC PATCH 2/4] Rename lock_cpu_hotplug to get_online_cpus

2007-10-18 Thread Gautham R Shenoy
Hi Nathan, > Hi Gautham- > > Gautham R Shenoy wrote: > > Replace all lock_cpu_hotplug/unlock_cpu_hotplug from the kernel and use > > get_online_cpus and put_online_cpus instead as it highlights > > the refcount semantics in these operations. > > Something oth

Re: [RFC PATCH 2/4] Rename lock_cpu_hotplug to get_online_cpus

2007-10-18 Thread Gautham R Shenoy
On Thu, Oct 18, 2007 at 03:22:21AM -0500, Nathan Lynch wrote: > Gautham R Shenoy wrote: > > Hi Nathan, > > > Hi Gautham- > > > > > > Gautham R Shenoy wrote: > > > > Replace all lock_cpu_hotplug/unlock_cpu_hotplug from the kernel and use > >

Re: [PATCH] Relay CPU Hotplug support

2006-12-22 Thread Gautham R Shenoy
te per_subsystem_cpus_mask before sending the post_cpu_hotplug_notifications, the post_notification handlers will be executing with the consistent value of the online_cpus mask. Does anybody see a problem with this "update_now-cleanup_later" approach ? Thanks and Regards gautham. -- Gaut

Re: [PATCH] Relay CPU Hotplug support

2006-12-22 Thread Gautham R Shenoy
On Fri, Dec 22, 2006 at 02:44:58AM -0800, Andrew Morton wrote: > On Fri, 22 Dec 2006 16:07:24 +0530 > Gautham R Shenoy <[EMAIL PROTECTED]> wrote: > > > While we are at this per-subsystem cpuhotplug "locking", here's a > > proposal that might put an end to

Re: [PATCH 3/2] fix flush_workqueue() vs CPU_DEAD race

2007-01-03 Thread Gautham R Shenoy
what Oleg has posted. Will check that out tonite. > > should be scrapped. But really I forget what their status is. Gautham, > can you please remind us where we're at? > If all goes fine (w.r.t cpufreq and workqueue), eliminating lock_cpu_hotplug from kernel/*.c should be rel

Re: [PATCH 3/2] fix flush_workqueue() vs CPU_DEAD race

2007-01-03 Thread Gautham R Shenoy
On Wed, Jan 03, 2007 at 07:34:59PM +0530, Gautham R Shenoy wrote: > > > handle-cpu_lock_acquire-and-cpu_lock_release-in-workqueue_cpu_callback.patch > > Again, this one ensures that workqueue_mutex is taken/released on > CPU_LOCK_ACQUIRE/CPU_LOCK_RELEASE events in the c

Re: [PATCH 3/2] fix flush_workqueue() vs CPU_DEAD race

2007-01-03 Thread Gautham R Shenoy
mutex in the cpu_hotplug callback function. The same can be acheived by acquiring these mutexes in CPU_UP_PREPARE/CPU_DOWN_PREPARE etc. This is true for every subsystem that is cpu-hotplug aware. > Oleg. > Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India.

Re: [RFC PATCH(Experimental) 2/4] Revert changes to workqueue.c

2007-02-21 Thread Gautham R Shenoy
cancel_work_sync(); > > but it is ok to do cancel_work_sync() unconditionally. True. But this might be a one off solution for slab. However, if someone in the future might require to do a flush_workqueue from CPU_DOWN_PREPARE context, we would need to find a new workaround. So, I'

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-21 Thread Gautham R Shenoy
freezeable ?? thanks and regards gautham -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price tag of responsibility, which is still a bargain, because Freedom is priceless!" - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: freezer problems

2007-02-26 Thread Gautham R Shenoy
rozen context is a good thing to silence these warnings, but I guess that would open up some new races. > > Greetings, > Rafael regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price tag of responsibility, which is still a bargain, beca

Re: freezer problems

2007-02-26 Thread Gautham R Shenoy
glethreaded workqueue's for hotplug, since we are not kthread_stopping them anywhere. So this kthread_stop waiting for parent(khelper_wq) which is blocked on wait_for_complete(child->vfork_done) shouldn't occur. No? Thanks and Regards gautham. -- Gautham R Shenoy Linux Techn

Re: Problem with freezable workqueues

2007-02-28 Thread Gautham R Shenoy
_KILL_THREADS, the notifications for which were being sent *after* we thawed the processes in __cpu_down. However, in the version which we are working on, we are thawing processes individually in CPU_DEAD before cleaning/stopping them. I haven't observed any bad lockups/freeze chills with this

Re: Problem with freezable workqueues

2007-02-28 Thread Gautham R Shenoy
*only* for hotplug. Rafael, does that mean more status flags?! Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price tag of responsibility, which is still a bargain, because Freedom is priceless!" - To unsubscribe from this list

[RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-14 Thread Gautham R Shenoy
been tested only on i386. - Updated documentation for cpu-hotplug. Any feedback would be greatly appreciated. Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price tag of responsibility, which is still a bargain, because Freedom is pricel

[RFC PATCH(Experimental) 1/4] freezer-cpu-hotplug core

2007-02-14 Thread Gautham R Shenoy
/CPU_UP_PREPARE in the frozen context create any dirty dependencies in the future? o Can the SYSTEM_RUNNING hack in _cpu_up be avoided by some cleaner means. Signed-off-by : Srivatsa Vaddagiri <[EMAIL PROTECTED]> Signed-off-by : Gautham R Shenoy <[EMAIL PROTECTED]> -- include/linu

[RFC PATCH(Experimental) 2/4] Revert changes to workqueue.c

2007-02-14 Thread Gautham R Shenoy
This patch reverts all the recent workqueue hacks added to make it hotplug safe. Signed-off-by : Srivatsa Vaddagiri <[EMAIL PROTECTED]> Signed-off-by : Gautham R Shenoy <[EMAIL PROTECTED]> kernel/workqueue.c | 225 +++-- 1 files

[RFC PATCH(Experimental) 3/4] Revert changes to sched.c and slab.c

2007-02-14 Thread Gautham R Shenoy
This patch removes the per-subsystem hotcpu mutexes from sched and slab subsystems. Signed-off-by : Gautham R Shenoy <[EMAIL PROTECTED]> -- kernel/sched.c | 16 mm/slab.c |6 -- 2 files changed, 22 deletions(-) Index: hotplug/kernel/s

[RFC PATCH(Experimental) 4/4] Rip out lock_cpu_hotplug from linux.

2007-02-14 Thread Gautham R Shenoy
This patch rips out lock_cpu_hotplug from the kernel. Good Riddance!! (hopefully :) ) Signed-off-by : Gautham R Shenoy <[EMAIL PROTECTED]> -- arch/i386/kernel/cpu/mtrr/main.c |6 -- arch/i386/kernel/microcode.c |8 arch/mips/kernel/mip

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-14 Thread Gautham R Shenoy
On Wed, Feb 14, 2007 at 10:43:35PM +0100, Rafael J. Wysocki wrote: > Hi, > > On Wednesday, 14 February 2007 15:40, Gautham R Shenoy wrote: > > Hello Everybody, > > > > This is an experiment towards process_freezer based implementation > > of cpu-hotplug. This i

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-15 Thread Gautham R Shenoy
re_hotplug_suspend(); primitive_cpu_down/_up(); perform_post_hotplug_suspend(); Does this look like a good thing to you? > All in all, I think we should start from modifying the freezer and the > classification of processes with respect to the freezing. > Cool! Lets get started then

Re: [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug

2007-02-15 Thread Gautham R Shenoy
nts to be frozen for lets say kprobes but not for cpu-hotplug. Cpu-hotplug and kprobes may not have a dependency like the one that exists between cpu-hotplug and suspend. So, at this moment, even I am not sure if there is a need for the hierarchy. > > Rafael Thanks and Regards gau

Re: BUG: warning at kernel/cpu.c:51/unlock_cpu_hotplug() - 2.6.18.6

2007-02-15 Thread Gautham R Shenoy
g warnings. Let me know if this fix works for you or not. regards gautham. Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]> kernel/cpu.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.18/kernel/cpu.c ==

Re: [RFC PATCH(Experimental) 1/4] freezer-cpu-hotplug core

2007-02-16 Thread Gautham R Shenoy
oes kthread_stop. Rafael, does this have any negative impact on the freezer design? > This should let us do kthread_stop() in CPU_DEAD itself (while processes > are frozen)? That would allow us to do everything from CPU_DEAD itself > (and not have CPU_DEAD_KILL_THREADS). > >

Re: [RFC PATCH(Experimental) 1/4] freezer-cpu-hotplug core

2007-02-17 Thread Gautham R Shenoy
On Sat, Feb 17, 2007 at 11:02:33AM +0530, Gautham R Shenoy wrote: > This looks ok, but probably we could do it in a better way. > How about an api to thaw only a specific task something like > thaw_process(struct task_struct p). I see that thaw_process already exists in freezer.h! Awe

Re: Fw: Re: [mm PATCH 4/6] RCU: (now) CPU hotplug

2007-01-30 Thread Gautham R Shenoy
npopular lock_cpu_hotplug :-) > p = __stop_machine_run(take_cpu_down, NULL, cpu); > mutex_unlock(&cpu_bitmask_lock); Looks good. I'm wondering if we'll need to try_to_freeze in the fork and exit code as well :? Thanks and Regards gautham. -- Gautham R Sh

Re: -mm merge plans for 2.6.20

2006-12-05 Thread Gautham R Shenoy
them. Other than that, there are issues regarding the workqueue-hotplug-"locking" which needs to be addressed, probably in a seperate thread. So could you please reconsider this decision to merge the hotplug-locking rework, and let it stabilize in -mm for sometime ? Thanks and Regards gau

Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

2006-12-06 Thread Gautham R Shenoy
pu_hotplug callback path can cause a deadlock if we go for per-subsystem hotcpu mutexes. Can you think of a way by which we can avoid destroying the kondemand workqueue from the cpu-hotplug callback path ? Please see http://lkml.org/lkml/2006/11/30/9 for the culprit-callpath. Thanks and Regards g

[PATCH] Change cpu_up and co from __devinit to __cpuinit

2007-01-06 Thread Gautham R Shenoy
U or are of __init type. Thus when CONFIG_HOTPLUG_CPU=y, all these cpu up functions would land up in .text section, and when CONFIG_HOTPLUG_CPU=n, all these functions would land up in .init section. Tested on a i386 SMP machine running linux-2.6.20-rc3-mm1. Signed-off-by: Gautham R Shenoy <[EMAIL

CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

2006-11-29 Thread Gautham R Shenoy
_rework patches) So do we - Rethink the strategy of per-subsystem hotcpu-locks ? OR - Think of a way to straighten out the super-convoluted cpufreq code ? At the moment, I would suggest the latter :-) Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Fr

Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

2006-11-29 Thread Gautham R Shenoy
On Wed, Nov 29, 2006 at 01:05:56PM -0800, Andrew Morton wrote: > On Wed, 29 Nov 2006 20:54:04 +0530 > Gautham R Shenoy <[EMAIL PROTECTED]> wrote: > > > Ok, so to cut the long story short, > > - While changing governor from anything to > > ondemand, locks

Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

2006-11-29 Thread Gautham R Shenoy
On Thu, Nov 30, 2006 at 09:58:07AM +0530, Gautham R Shenoy wrote: > > So can we ignore this circular-dep warning as a false positive? > Or is there a way to exploit this circular dependency ? > > At the moment, I cannot think of way to exploit this circular dependency > unle

Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

2006-11-30 Thread Gautham R Shenoy
On Thu, Nov 30, 2006 at 09:29:34AM +0100, Ingo Molnar wrote: > > * Gautham R Shenoy <[EMAIL PROTECTED]> wrote: > > > Ok, I see that we are already doing it :(. So we can end up in a > > deadlock. > > > > Here's the culprit callpath: > > i

Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

2006-11-30 Thread Gautham R Shenoy
On Thu, Nov 30, 2006 at 09:31:44AM +0100, Ingo Molnar wrote: > > * Gautham R Shenoy <[EMAIL PROTECTED]> wrote: > > > So do we > > - Rethink the strategy of per-subsystem hotcpu-locks ? > > > > OR > > > > - Think of a way to straighten out

Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

2006-11-30 Thread Gautham R Shenoy
On Thu, Nov 30, 2006 at 12:03:15PM +0100, Ingo Molnar wrote: > > * Gautham R Shenoy <[EMAIL PROTECTED]> wrote: > > > a) cpufreq maintain's it's own cpumask in the variable > > policy->affected_cpus and says : If a frequency change is issued to > >

Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

2006-11-30 Thread Gautham R Shenoy
On Thu, Nov 30, 2006 at 12:53:27PM +0100, Ingo Molnar wrote: > > * Gautham R Shenoy <[EMAIL PROTECTED]> wrote: > > > This is what is currently being done by cpufreq: > > ok! > > > a) get_some_cpu_hotplug_protection() [use either some global mechanism > &

Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

2006-11-30 Thread Gautham R Shenoy
ck, i)) */ /* do some operation, which might sleep */ /* migrates to cpu j */ cpu_hotplug_unlock(); /* does mutex_unlock(&percpu(hotplug_lock, i) while running on cpu j */ This would cause cacheline ping pong, no? > > Ingo regards gautham. -- Gautham R Shenoy Linux Technol

Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

2006-11-30 Thread Gautham R Shenoy
deadlock, since A acts as a mutex for B->C / C->B callpath. Just curious :-) [ Well, I might encounter such a scenario in an attempt to make cpufreq cpu-hotplug safe! ] > Ingo Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "

Re: [PATCH 4/10] cpu: deliver CPU_UP_CANCELED only to NOTIFY_OKed callbacks with CPU_UP_PREPARE

2007-07-17 Thread Gautham R Shenoy
-1, &nr_calls); > if (ret == NOTIFY_BAD) { > + nr_calls--; > printk("%s: attempt to bring up CPU %u failed\n", > __FUNCTION__, cpu); > ret = -EINVAL; > - > To unsubscri

Re: [PATCH 4/10] cpu: deliver CPU_UP_CANCELED only to NOTIFY_OKed callbacks with CPU_UP_PREPARE

2007-07-17 Thread Gautham R Shenoy
goto bad; > +if (!alien) { > + kfree(shared); > + kfree(nc); > + goto bad; > + } > } > cachep->

Re: [PATCH 1/7] Freezer: Read PF_BORROWED_MM in a nonracy way

2007-05-12 Thread Gautham R Shenoy
_to_freeze. I won't expect an exiting thread to call try_to_freeze, but a daemonize()ed thread can. So should we perform that check in reparent_to_kthreadd() ? We are protected by the tasklist_lock there, no? > > Rafael Thanks and Regards gautham. -- Gautham R Shenoy Linux Techno

Re: [PATCH 1/7] Freezer: Read PF_BORROWED_MM in a nonracy way

2007-05-12 Thread Gautham R Shenoy
On Sat, May 12, 2007 at 11:27:36AM +0200, Rafael J. Wysocki wrote: > On Saturday, 12 May 2007 10:16, Gautham R Shenoy wrote: > > > > But I am not sure if this is the case with suspend/hibernate, since we > > need to do a sys_sync() between try_freeze_tasks(F

Re: [PATCH 1/7] Freezer: Read PF_BORROWED_MM in a nonracy way

2007-05-12 Thread Gautham R Shenoy
op this patch and try to address the > issue in the next series of patches. I think it's a good idea. I would want to review the patches again. The more I look at them, the better I seem to understand the subtleties in the freezer code. > > Greetings, > Rafael Thanks and R

Re: [RFD] Freezing of kernel threads

2007-05-12 Thread Gautham R Shenoy
e() from the remaining > kernel threads. Later, if testing shows that we've overlooked some kernel > threads which need to be made freezable, we'll be able to add the "ability to > freeze" to these threads quite easily. > > Of course, that would also require u

Re: [RFD] Freezing of kernel threads

2007-05-13 Thread Gautham R Shenoy
way. If you still feel that we can solve it using a simpler, cleaner better method, I am all for it. Why, even I would like to see this problem fixed, as much as you do, if not more :-) Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. "Freedom comes with a price

Re: [RFD] Freezing of kernel threads

2007-05-14 Thread Gautham R Shenoy
; to cpu_online_map way back when cpu hotplug was being developed. It will > be a good idea to reintroduce that back. > Yes. However, there are places where people keep a local copy of the cpu_online_map. So any access to this local copy is also not cpu-hotplug safe. No ? > > and it

Re: CPU hotplug: system hang on CPU hot remove during `pfmon --system-wide'

2007-06-06 Thread Gautham R Shenoy
g model to allow blocking code sections too, we cannot use preempt_enable/disable. Therefore sir, we do need nice scalable refcounting model :) > As mentioned, it's actually fairly easy to add verification calls to make > sure that certain accesses are done with preemption disabled, so.. > >

  1   2   3   4   5   6   >