Re: [RFC][PATCH][EXPERIMENTAL] CPU hotplug with frozen tasks

2007-04-18 Thread Gautham R Shenoy
/cpuid.c |2 ++ [snip] Though I am wondering what might be the usecase for microcode! Guess we'll see that patch soon :-) Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes with a price tag of responsibility, which is still a bargain, because

[RFC 0/2] Fix Freezer related races.

2007-04-19 Thread Gautham R Shenoy
, 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 message to [EMAIL PROTECTED] More

[RFC PATCH 1/2] Fix PF_NOFREEZE and freezeable race

2007-04-19 Thread Gautham R Shenoy
to thaw the task since it is marked PF_NOFREEZE. Avoid this problem by checking the current task's PF_NOFREEZE status in the refrigerator before marking current as frozen. Signed-off-by: Gautham R Shenoy [EMAIL PROTECTED] --- kernel/power/process.c |9 + 1 file changed, 9 insertions

[RFC PATCH(experimental) 2/2] Fix freezer-kthread_stop race

2007-04-19 Thread Gautham R Shenoy
to call try_to_freeze. kthread_stop is one such case. flush_workqueue might be another. This patch attempts to address such a situation with a fix for kthread_stop. Strictly experimental. Compile tested on i386. Signed-off-by: Gautham R Shenoy [EMAIL PROTECTED] --- include/asm-arm/thread_info.h

Re: [RFC PATCH(experimental) 2/2] Fix freezer-kthread_stop race

2007-04-20 Thread Gautham R Shenoy
On Thu, Apr 19, 2007 at 02:31:33PM -0700, Andrew Morton wrote: On Thu, 19 Apr 2007 17:34:19 +0530 Gautham R Shenoy [EMAIL PROTECTED] wrote: flush_workqueue() just needs to die. I think there are (almost) no legitimate users of it once cancel_work_sync() is merged. This patch attempts

Re: [RFC PATCH(experimental) 2/2] Fix freezer-kthread_stop race

2007-04-20 Thread Gautham R Shenoy
that flush_workqueue() needs to go, I guess, I am ok with fixing only kthread_stop/kthread_should_stop for the moment. Unless I can spot any other valid case :) wake_up_process(k); put_task_struct(k); Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India

Re: [RFC PATCH(experimental) 2/2] Fix freezer-kthread_stop race

2007-04-20 Thread Gautham R Shenoy
in this case it does make sense :-) Greetings, Rafael - 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

Re: [RFC PATCH 1/2] Fix PF_NOFREEZE and freezeable race

2007-04-23 Thread Gautham R Shenoy
On Fri, Apr 20, 2007 at 10:02:08PM +0400, Oleg Nesterov wrote: On 04/19, Rafael J. Wysocki wrote: On Thursday, 19 April 2007 14:02, Gautham R Shenoy wrote: This patch fixes the race pointed out by Oleg Nesterov. * Freezer marks a thread as freezeable. * The thread now marks

Re: [RFC PATCH(experimental) 2/2] Fix freezer-kthread_stop race

2007-04-23 Thread Gautham R Shenoy
On Sat, Apr 21, 2007 at 01:12:09AM +0400, Oleg Nesterov wrote: On 04/19, Gautham R Shenoy wrote: @@ -63,12 +74,16 @@ void refrigerator(void) recalc_sigpending(); /* We sent fake signal, clean it up */ spin_unlock_irq(current-sighand-siglock); + task_lock(current

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Gautham R Shenoy
)) + clear_frozen_flag(k); task_unlock(k); + } 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

Re: [RFC][PATCH -mm 2/3] freezer: Introduce freezer_flags

2007-04-23 Thread Gautham R Shenoy
, TIF_FREEZE); + do_not_freeze(p); We may want to rename do_not_freeze to something else. It kind of looks weird calling do_not_freeze(p) after setting the frozen flag! Probably, just a matter of taste :-) } Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM

Re: [RFC][PATCH -mm 2/3] freezer: Introduce freezer_flags

2007-04-23 Thread Gautham R Shenoy
try_to_freeze. If the task was marked for freezing, it will be frozen now. You may want to check the thread http://lkml.org/lkml/2007/2/18/47 on how it came into existance. Cheers, Satyam Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes with a price tag

Re: [RFC PATCH(experimental) 2/2] Fix freezer-kthread_stop race

2007-04-23 Thread Gautham R Shenoy
On Mon, Apr 23, 2007 at 10:39:56PM +0400, Oleg Nesterov wrote: On 04/23, Gautham R Shenoy wrote: On Sat, Apr 21, 2007 at 01:12:09AM +0400, Oleg Nesterov wrote: On 04/19, Gautham R Shenoy wrote: @@ -63,12 +74,16 @@ void refrigerator(void) recalc_sigpending(); /* We sent

Re: [RFC][PATCH -mm 3/3] freezer: Fix problem with kthread_stop

2007-04-23 Thread Gautham R Shenoy
On Tue, Apr 24, 2007 at 12:46:37AM +0400, Oleg Nesterov wrote: On 04/23, Rafael J. Wysocki wrote: On Monday, 23 April 2007 14:35, Gautham R Shenoy wrote: + if (!freezer_should_exempt(current)) { task_lock(k); + /* We are freezable, so we must make sure

Re: [RFC][PATCH -mm 2/3] freezer: Introduce freezer_flags

2007-04-23 Thread Gautham R Shenoy
, thanks for pointing that out. That reminds me, shouldn't we set the child's TFF_FREEZE flag if the parent is freezing or frozen? Should I clear it in dup_task_struct() or is there a better place? Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes

Re: [PATCH] kthread_should_stop_check_freeze (was: Re: [PATCH -mm 3/7] Freezer: Remove PF_NOFREEZE from rcutorture thread)

2007-03-12 Thread Gautham R Shenoy
for cpu-hotplug) where we want to stop a frozen thread immediately after thawing it. Something like CPU_DEAD: thaw_process(p); kthread_stop(p); p = NULL; Is there a problem with this line of thinking ? thanks and regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes

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

2007-02-14 Thread Gautham R Shenoy
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 priceless

[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/linux/notifier.h |3

[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 changed, 98

[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/sched.c

[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/mips-mt.c

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 is mainly based on ideas of Andrew Morton

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

2007-02-15 Thread Gautham R Shenoy
, Rafael -- 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 message to [EMAIL PROTECTED] More

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

2007-02-15 Thread Gautham R Shenoy
if there is a need for the hierarchy. Rafael 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

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

2007-02-15 Thread Gautham R Shenoy
of those spurious unlock_cpu_hotplug 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
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). -- Regards, vatsa thanks gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes with a price tag

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! Awesome!! So

Re: Avoid checking for cpu gone when CONFIG_HOTPLUG_CPU not defined

2007-04-08 Thread Gautham R Shenoy
can cheerfully delete when we get the freezer stuff done. Fortunately, Anil's patch will make it nice and easy to find again. Ok, I will make a note of this one. If the IO-test results are good, I hope to post the patchset sometime this week. Thanks and Regards gautham. -- Gautham R Shenoy

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-08 Thread Gautham R Shenoy
that #if above is now broken. Actually it was probably always broken, but it just became more so. I have already removed it from in my version 3. Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes with a price tag of responsibility, which is still

Re: [PATCH] kthread: Don't depend on work queues

2007-04-11 Thread Gautham R Shenoy
by default. From cpu-hotplug perspective, helper_wq was the only singlethreaded non-freezeable workqueue. Greetings, Rafael - 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

Re: [PATCH] kthread: Don't depend on work queues

2007-04-11 Thread Gautham R Shenoy
On Wed, Apr 11, 2007 at 03:48:05PM +0400, Oleg Nesterov wrote: On 04/11, Gautham R Shenoy wrote: On Wed, Apr 11, 2007 at 12:13:34PM +0200, Rafael J. Wysocki wrote: It should be calling try_to_freeze() somewhere anyway. We may need to freeze all tasks in some cases. How

Re: [PATCH 7/8] Clean up workqueue.c with respect to the freezer based cpu-hotplug

2007-04-12 Thread Gautham R Shenoy
this wait_for_completion as well as long as the thread A is not marked PF_NOFREEZE. But with multiple freeze events, it won't be as simple as that. -- Regards, vatsa Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes with a price tag of responsibility

Re: [PATCH 7/8] Clean up workqueue.c with respect to the freezer based cpu-hotplug

2007-04-13 Thread Gautham R Shenoy
see that it will fail in our case where we might need to nest the try_to_freeze_tasks call. Hmm, we don't have a rwlock variant that allows multiple writers, now do we?! Oleg. Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes with a price tag

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

2007-02-21 Thread Gautham R Shenoy
workaround. So, I'll try running CPU_DOWN_PREPARE and CPU_UP_PREPARE from a non frozen context to check if there are any potential problems. Hopfully there shouldn't be (m)any! Oleg. thanks and regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes with a price tag

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

2007-02-21 Thread Gautham R Shenoy
workqueue (which is single threaded, so won't be frozen anyway). And a quick cscope scan shows that only the xfslogd and xfsdatad are the only freezable workqueues. Any particular reason for not marking rest of the non-single_threaded workqueues freezeable ?? thanks and regards gautham -- Gautham R

Re: freezer problems

2007-02-26 Thread Gautham R Shenoy
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, because Freedom is priceless! - To unsubscribe from

Re: freezer problems

2007-02-26 Thread Gautham R Shenoy
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 Technology Center IBM India. Freedom comes with a price tag of responsibility, which

Re: Problem with freezable workqueues

2007-02-28 Thread Gautham R Shenoy
on, we are thawing processes individually in CPU_DEAD before cleaning/stopping them. I haven't observed any bad lockups/freeze chills with this approach. But I need to test it a bit more before posting them. regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes

Re: Problem with freezable workqueues

2007-02-28 Thread Gautham R Shenoy
. 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: send the line unsubscribe linux

Re: [PATCH -mm 3/7] Freezer: Remove PF_NOFREEZE from rcutorture thread

2007-03-01 Thread Gautham R Shenoy
for not try_to_freeze()'ing the fakewriter and the reader threads?? (Ok, I admit, I haven't looked into the code for the reason which might be obvious.) thanks gautham. -- Gautham R Shenoy Linux Technology Center IBM India. Freedom comes with a price tag of responsibility, which is still a bargain

[PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-01 Thread Gautham R Shenoy
based on the freeze events. Thus all tasks which were previously marked PF_NOFREEZE are now exempted from freezer using freezer_exempt(FE_ALL); which means exempt from all kinds of freezes. Signed-off-by: Gautham R Shenoy [EMAIL PROTECTED] Cc: Pavel Machek [EMAIL PROTECTED] Cc: Rafael J

[PATCH 2/8] Make process freezer reentrant

2007-04-01 Thread Gautham R Shenoy
This patch adds provision to make the process freezer reentrant for different kinds of freeze events. Credit to Rafael Wysocki for the system_freeze_event_mask idea. Signed-off-by: Gautham R Shenoy [EMAIL PROTECTED] Cc: Pavel Machek [EMAIL PROTECTED] Cc: Rafael J. Wysocki [EMAIL PROTECTED

[PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-01 Thread Gautham R Shenoy
in _cpu_up be avoided by some cleaner means. Signed-off-by : Srivatsa Vaddagiri [EMAIL PROTECTED] Signed-off-by : Gautham R Shenoy [EMAIL PROTECTED] Signed-off-by : Rafael J. Wysocki [EMAIL PROTECTED] -- include/linux/freezer.h | 10 -- include/linux/notifier.h |2 - include/linux

[PATCH 4/8] Rip out lock_cpu_hotplug()

2007-04-01 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/mips-mt.c

[PATCH 5/8] __cpu_up: use singlethreaded workqueue

2007-04-01 Thread Gautham R Shenoy
Currently i386 and x86_64 __cpu_up uses the services of the kevents workqueue to bring the cpu up. Change this and use kthread workqueue instead which is single_threaded and won't be frozen during CPU_HOTPLUG. Signed-off-by: Gautham R Shenoy [EMAIL PROTECTED] Cc: Andi Kleen [EMAIL PROTECTED

[PATCH 6/8] Make non-singlethreaded workqueues freezeable by default

2007-04-01 Thread Gautham R Shenoy
to flush_workqueue in vain, in a frozen context. Note: o The singlethreaded workqueues will not be frozen. Signed-off-by: Gautham R Shenoy [EMAIL PROTECTED] Cc: Oleg Nesterov [EMAIL PROTECTED] Cc: Johannes Berg [EMAIL PROTECTED] -- include/linux/workqueue.h | 12 +--- kernel/workqueue.c

[PATCH 7/8] Clean up workqueue.c with respect to the freezer based cpu-hotplug

2007-04-01 Thread Gautham R Shenoy
that all non-singlethreaded workqueues *have* to be frozen to avoid any races. Signed-off-by: Gautham R Shenoy [EMAIL PROTECTED] Signed-off-by: Srivatsa Vaddagiri [EMAIL PROTECTED] Cc: Oleg Nesterov [EMAIL PROTECTED] -- kernel/workqueue.c | 118 ++--- 1

[PATCH 8/8] Make kernel threads freezeable for cpu-hotplug

2007-04-01 Thread Gautham R Shenoy
This patch makes all the kernel_threads (except the migration thread) freezeable for cpu hotplug. Signed-off-by: Gautham R Shenoy [EMAIL PROTECTED] -- arch/i386/kernel/apm.c |2 +- drivers/block/loop.c|2 +- drivers/char/apm-emulation.c|6

[RFC] Cpu-hotplug: Using the Process Freezer (try2)

2007-04-01 Thread Gautham R Shenoy
ambitious at this point of time. Atleast in my case it was :-) The patchset is against 2.6.21-rc5-mm3. Awaiting your feedback. 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

Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2)

2007-04-02 Thread Gautham R Shenoy
On Mon, Apr 02, 2007 at 08:16:12AM +0200, Ingo Molnar wrote: * Gautham R Shenoy [EMAIL PROTECTED] wrote: Hello Everybody, This is another attempt towards process-freezer based cpu-hotplug. This patchset covers just about everything that was discussed on the LKML with respect

Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2)

2007-04-02 Thread Gautham R Shenoy
race conditions. -- Regards, vatsa 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

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-03 Thread Gautham R Shenoy
(FE_ALL); which means exempt from all kinds of freezes. Signed-off-by: Gautham R Shenoy [EMAIL PROTECTED] Cc: Pavel Machek [EMAIL PROTECTED] Cc: Rafael J. Wysocki [EMAIL PROTECTED] Cc: Masami Hiramatsu [EMAIL PROTECTED] Actually no, I was not in cc. Oops! Sorry. I knew I had

Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2)

2007-04-03 Thread Gautham R Shenoy
{ Rafael / Andrew, Any reasons for leaving this hunk out? I reran my tests with this hunk applied, and it work just fine. Even 'make -j' the maximum time taken to hotplug a cpu was 0m2.16s. Ingo Thanks and Regards gautham. -- Gautham R Shenoy Linux Technology Center IBM India

Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2)

2007-04-03 Thread Gautham R Shenoy
. Rafael / Andrew, Any reasons for leaving this hunk out? I will rerun my tests with this hunk applied and report back. Ingo 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

Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2)

2007-04-03 Thread Gautham R Shenoy
, freezer and hence hotplug succeeds even when I am running a 'make -j' test. -- Regards, vatsa 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] Cpu-hotplug: Using the Process Freezer (try2)

2007-04-04 Thread Gautham R Shenoy
. -- 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 message to [EMAIL PROTECTED] More majordomo info

Re: [RFC] Cpu-hotplug: Using the Process Freezer (try2)

2007-04-04 Thread Gautham R Shenoy
loop should do the trick. Will get back soon. Ingo 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

Re: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend

2007-04-05 Thread Gautham R Shenoy
On Thu, Apr 05, 2007 at 01:46:33PM +0400, Oleg Nesterov wrote: On 04/02, Gautham R Shenoy wrote: +/* + * Exempt the current process from being frozen for a certain event + */ +static inline void freezer_exempt(unsigned long exempt_freeze_event) +{ + if (exempt_freeze_event

Re: [PATCH 2/8] Make process freezer reentrant

2007-04-05 Thread Gautham R Shenoy
On Thu, Apr 05, 2007 at 01:53:01PM +0400, Oleg Nesterov wrote: On 04/02, Gautham R Shenoy wrote: int freeze_processes(unsigned long freeze_event) { unsigned int nr_unfrozen; - + int ret = 0; + mutex_lock(freezer_mutex); + if (system_freeze_event_mask freeze_event

Re: [PATCH 3/8] Use process freezer for cpu-hotplug

2007-04-05 Thread Gautham R Shenoy
On Thu, Apr 05, 2007 at 02:53:56PM +0400, Oleg Nesterov wrote: On 04/02, Gautham R Shenoy wrote: + if (freeze_processes(FE_HOTPLUG_CPU)) { + thaw_processes(FE_HOTPLUG_CPU); + return -EBUSY; + } Off-topic. This is a common pattern. Perhaps it makes sense

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

[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 as it highlights

[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 bump up

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

2007-11-15 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 message to [EMAIL PROTECTED

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

2007-11-20 Thread Gautham R Shenoy
); extern void cpu_maps_update_begin(void); extern void cpu_maps_update_done(void); -- 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

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

2007-12-10 Thread Gautham R Shenoy
. Thanks and Regards gautham. commit 15bfb662b35c609490185fba2fd4713d230b9374 Author: Gautham R Shenoy [EMAIL PROTECTED] Date: Mon Dec 10 13:41:45 2007 +0530 softlockup: remove get_online_cpus() which doesn't help here. The get_online_cpus() protection seems to be bogus in kernel/softlockup.c

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

2007-12-10 Thread Gautham R Shenoy
for a sufficiently long time. b) If the tasks have been migrated off, then we have nothing to check. However, if we still want that particular cpu to not go offline during the check, then could we use the following patch commit a49736844717e00f7a37c96368cea8fec7eb31cf Author: Gautham R Shenoy [EMAIL

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, and that CPU could go away while i'm still using it, right

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 global operation not a per-CPU operation (we iterate over

Re: 2.6.24-rc5-mm1

2007-12-13 Thread Gautham R Shenoy
-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 and Regards gautham. -- Gautham R Shenoy Linux

[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 message to [EMAIL PROTECTED] More

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

2007-12-13 Thread Gautham R Shenoy
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 Sarma [EMAIL PROTECTED

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

2007-12-13 Thread Gautham R Shenoy
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 include/linux/rcupdate.h | 168

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

2007-12-13 Thread Gautham R Shenoy
-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 a/kernel/rcuclassic.c b/kernel

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

2007-12-13 Thread Gautham R Shenoy
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 |3 include/linux/rcupdate.h | 11

[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 Shenoy [EMAIL

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

2007-12-13 Thread Gautham R Shenoy
in the Reader Pipe list. o Free-Block Circulation: Shows the number of torture structures -- 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

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 documentation to reflect preemptible RCU as well as recent

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, Thanks for posting this. I believe this is the same

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

2008-01-04 Thread Gautham R Shenoy
fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 -- 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

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

2008-01-04 Thread Gautham R Shenoy
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 bargain, because Freedom is priceless

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 to be taken always when scanning over cpus

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

2007-10-18 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: This patch implements a Refcount

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 other than get_online_cpus, please

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 get_online_cpus and put_online_cpus instead as it highlights

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: Replace all lock_cpu_hotplug/unlock_cpu_hotplug from the kernel and use

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

2007-10-21 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 message to [EMAIL PROTECTED] More

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 and CPU_LOCK_RELEASE hotplug notification events

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

2007-10-23 Thread Gautham R Shenoy
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 price tag of responsibility, which

[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 kernel/cpu.c

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

2007-10-23 Thread Gautham R Shenoy
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] --- arch/i386/kernel

[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/cpu.c

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

2007-10-23 Thread Gautham R Shenoy
the 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/workqueue.c

[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: linux-2.6.23

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) { if (cpu = 0) - kthread_bind(p, cpu

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, which is a spinlock which serializes the accesses

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 the version 2 of the refcount based cpu-hotplug locking

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

2007-09-28 Thread Gautham R Shenoy
on DEBUG_KERNEL -- 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 message to [EMAIL PROTECTED] More

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

2007-10-05 Thread Gautham R Shenoy
+ boost implementations. + config LKDTM tristate Linux Kernel Dump Test Tool Module depends on DEBUG_KERNEL -- 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: [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] + +/* + * Return the list from which to boost target tasks. + * May only be invoked

  1   2   3   4   5   6   7   8   9   10   >