2003-02-03 11:25:51

by Zwane Mwaikambo

[permalink] [raw]
Subject: [PATCH][0/6] CPU Hotplug update + fixes

Hi,
These patches are in no way an attempt to push this for inclusion,
but instead a bit of grunt work to keep it current. However i would
very much so like see it included in mainline.

- sync against 2.5.59
- add additional cpu_online check in i386 cpu_up to differentiate
between boot and runtime offlined/onlined cpus.
- fix cpu online show/store oops due to changes in struct device_attribute
- added CPU_DEAD case for mm/slab.c to fix memory leak (double allocation) and
added stop_cpu_timer()
- added CPU_DEAD case for RCU, here we clear the cpu's rcu_data and kill its
tasklet. Added rcu_offline_cpu()
- added CPU_DEAD case for fs/buffer.c (suggestion from Andrew Morton, bugs
from me)

Tested on a 4way i386 with cpu offline, online whilst doing make -j4
bzImage. It is possible to induce what appear to be deadlocks but i am
working through those as i go along. Rusty is there anything i can do to
get this merged with what you currently have?

Zwane
--
function.linuxpower.ca


2003-02-03 12:00:23

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: [PATCH][0/6] CPU Hotplug update + fixes

I forgot to mention, this is based off the Linux CPU Hotplug code in;
hotcpu-x86-28-10-2002.2.5.44.diff

Zwane
--
function.linuxpower.ca

2003-02-04 06:49:18

by Rusty Russell

[permalink] [raw]
Subject: Re: [PATCH][0/6] CPU Hotplug update + fixes

In message <[email protected]> y
ou write:
> Hi,
> These patches are in no way an attempt to push this for inclusion,
> but instead a bit of grunt work to keep it current. However i would
> very much so like see it included in mainline.

Zwane, please send me your physical address so I can put you on my Christmas
list 8)

I've stolen these, removed a couple of unrelated cleanups to shrink
it, and put them on my page with you as author (and me as coauthor).

Here are the parts I pulled out (BTW, I'm missing 4/6: can you
re-xmit?)

Index: linux-2.5.59-lch2/include/linux/cpu.h
===================================================================
RCS file: /build/cvsroot/linux-2.5.59/include/linux/cpu.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -u -r1.1.1.1 -r1.1.1.1.2.1
--- linux-2.5.59-lch2/include/linux/cpu.h 17 Jan 2003 11:15:50 -0000 1.1.1.1
+++ linux-2.5.59-lch2/include/linux/cpu.h 20 Jan 2003 13:48:27 -0000 1.1.1.1.2.1
@@ -1,3 +1,5 @@
+#ifndef _LINUX_CPU_H
+#define _LINUX_CPU_H
/*
* include/linux/cpu.h - generic cpu definition
*
@@ -16,8 +18,6 @@
* - drivers/base/intf.c
* - Documentation/driver-model/interface.txt
*/
-#ifndef _LINUX_CPU_H_
-#define _LINUX_CPU_H_

#include <linux/device.h>
#include <linux/node.h>
Index: linux-2.5.59-lch2/drivers/base/cpu.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.59/drivers/base/cpu.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -u -r1.1.1.1 -r1.1.1.1.2.1
--- linux-2.5.59-lch2/drivers/base/cpu.c 17 Jan 2003 11:15:18 -0000 1.1.1.1
+++ linux-2.5.59-lch2/drivers/base/cpu.c 20 Jan 2003 13:48:26 -0000 1.1.1.1.2.1
@@ -14,11 +14,11 @@
{
return 0;
}
+
struct device_class cpu_devclass = {
.name = "cpu",
.add_device = cpu_add_device,
};
-

struct device_driver cpu_driver = {
.name = "cpu",
Index: linux-2.5.59-lch2/mm/page-writeback.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.59/mm/page-writeback.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 page-writeback.c
--- linux-2.5.59-lch2/mm/page-writeback.c 17 Jan 2003 11:16:41 -0000 1.1.1.1
+++ linux-2.5.59-lch2/mm/page-writeback.c 21 Jan 2003 04:48:29 -0000
@@ -350,6 +350,7 @@
static int
ratelimit_handler(struct notifier_block *self, unsigned long u, void *v)
{
+ /* This should be fine for all cases */
set_ratelimit();
return 0;
}

--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

2003-02-05 02:39:02

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: [PATCH][0/6] CPU Hotplug update + fixes

On Tue, 4 Feb 2003, Rusty Russell wrote:

> In message <[email protected]> y
> ou write:
> > Hi,
> > These patches are in no way an attempt to push this for inclusion,
> > but instead a bit of grunt work to keep it current. However i would
> > very much so like see it included in mainline.
>
> Zwane, please send me your physical address so I can put you on my Christmas
> list 8)

=)

> I've stolen these, removed a couple of unrelated cleanups to shrink
> it, and put them on my page with you as author (and me as coauthor).

Hardly, i just resynced. Your code saved me a lot of time redoing the very
same thing. So perhaps the converse is more appropriate ;)

> Here are the parts I pulled out (BTW, I'm missing 4/6: can you
> re-xmit?)

I will resend in a private mail, including a fix for mm/slab.c from
Manfred.

Cheers,
Zwane