* [PATCH] generate hotplug events for cpu online
@ 2005-04-14 17:56 Nathan Lynch
2005-04-21 18:46 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Lynch @ 2005-04-14 17:56 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml, Rusty Russell
We already do kobject_hotplug for cpu offline; this adds a
kobject_hotplug call for the online case. This is being requested by
developers of an application which wants to be notified about both
kinds of events.
Signed-off-by: Nathan Lynch <ntl@pobox.com>
Index: linux-2.6.12-rc2-mm3/drivers/base/cpu.c
===================================================================
--- linux-2.6.12-rc2-mm3.orig/drivers/base/cpu.c 2005-03-02 01:37:53.000000000 -0600
+++ linux-2.6.12-rc2-mm3/drivers/base/cpu.c 2005-04-14 10:56:29.000000000 -0500
@@ -37,6 +37,8 @@ static ssize_t store_online(struct sys_d
break;
case '1':
ret = cpu_up(cpu->sysdev.id);
+ if (!ret)
+ kobject_hotplug(&dev->kobj, KOBJ_ONLINE);
break;
default:
ret = -EINVAL;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] generate hotplug events for cpu online
2005-04-14 17:56 [PATCH] generate hotplug events for cpu online Nathan Lynch
@ 2005-04-21 18:46 ` Pavel Machek
2005-04-22 0:15 ` Nathan Lynch
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2005-04-21 18:46 UTC (permalink / raw)
To: Nathan Lynch; +Cc: Andrew Morton, lkml, Rusty Russell
Hi!
> We already do kobject_hotplug for cpu offline; this adds a
> kobject_hotplug call for the online case. This is being requested by
> developers of an application which wants to be notified about both
> kinds of events.
I'm afraid of bad interactions with swsusp/S3 on smp. We offline cpus there,
but we probably do not want userland to know...
Pavel
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] generate hotplug events for cpu online
2005-04-21 18:46 ` Pavel Machek
@ 2005-04-22 0:15 ` Nathan Lynch
0 siblings, 0 replies; 3+ messages in thread
From: Nathan Lynch @ 2005-04-22 0:15 UTC (permalink / raw)
To: Pavel Machek; +Cc: Andrew Morton, lkml, Rusty Russell
On Thu, Apr 21, 2005 at 08:46:56PM +0200, Pavel Machek wrote:
> Hi!
>
> > We already do kobject_hotplug for cpu offline; this adds a
> > kobject_hotplug call for the online case. This is being requested by
> > developers of an application which wants to be notified about both
> > kinds of events.
>
> I'm afraid of bad interactions with swsusp/S3 on smp. We offline cpus there,
> but we probably do not want userland to know...
The kobject_hotplug calls for cpu online and offline are present only
in the code paths where the operation is initiated through the sysfs
interface, so I don't think you have to worry.
Nathan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-22 0:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-14 17:56 [PATCH] generate hotplug events for cpu online Nathan Lynch
2005-04-21 18:46 ` Pavel Machek
2005-04-22 0:15 ` Nathan Lynch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®