All of lore.kernel.org
 help / color / mirror / Atom feed
* apm power_off on smp
@ 2002-07-14 22:13 Pozsar Balazs
  2002-07-14 22:30 ` Kelledin
  0 siblings, 1 reply; 9+ messages in thread
From: Pozsar Balazs @ 2002-07-14 22:13 UTC (permalink / raw)
  To: linux-kernel


Hi all!

APM's poweroff function is explicitly turned off on smp systems by
default. Could someone tell me please what is the reason for that?

In other words: what are the objections against the below patch? :)

diff -Naur a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
--- a/arch/i386/kernel/apm.c	Mon Feb 25 19:37:53 2002
+++ b/arch/i386/kernel/apm.c	Sun Jul 14 23:05:14 2002
@@ -393,11 +393,7 @@
 #endif
 static int			debug;
 static int			apm_disabled = -1;
-#ifdef CONFIG_SMP
-static int			power_off;
-#else
 static int			power_off = 1;
-#endif
 #ifdef CONFIG_APM_REAL_MODE_POWER_OFF
 static int			realmode_power_off = 1;
 #else

-- 
pozsy


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: apm power_off on smp
  2002-07-14 22:13 apm power_off on smp Pozsar Balazs
@ 2002-07-14 22:30 ` Kelledin
  2002-07-14 22:55   ` Xavier Bestel
  0 siblings, 1 reply; 9+ messages in thread
From: Kelledin @ 2002-07-14 22:30 UTC (permalink / raw)
  To: linux-kernel

> APM's poweroff function is explicitly turned off on smp systems by
> default. Could someone tell me please what is the reason for that?

(as of kernel 2.4.18) pretty much *all* APM functions are disabled on SMP 
kernels--the simple reason being that APM isn't SMP safe, and making it SMP 
safe is not a trivial task.

If all you want is a soft power-off, you're better off using ACPI (assuming 
your system supports it).  Since this is probably a desktop (and not a 
laptop), I doubt there's much else you want in the way of power management...

-- 
Kelledin
"If a server crashes in a server farm and no one pings it, does it still cost 
four figures to fix?"


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: apm power_off on smp
  2002-07-14 22:30 ` Kelledin
@ 2002-07-14 22:55   ` Xavier Bestel
  2002-07-14 23:03     ` Pozsar Balazs
  0 siblings, 1 reply; 9+ messages in thread
From: Xavier Bestel @ 2002-07-14 22:55 UTC (permalink / raw)
  To: Kelledin; +Cc: Linux Kernel Mailing List

Le lun 15/07/2002 à 00:30, Kelledin a écrit :
> > APM's poweroff function is explicitly turned off on smp systems by
> > default. Could someone tell me please what is the reason for that?
> 
> (as of kernel 2.4.18) pretty much *all* APM functions are disabled on SMP 
> kernels--the simple reason being that APM isn't SMP safe, and making it SMP 
> safe is not a trivial task.
> 
> If all you want is a soft power-off, you're better off using ACPI (assuming 
> your system supports it).  Since this is probably a desktop (and not a 
> laptop), I doubt there's much else you want in the way of power management...

ACPI is still very broken for some chipsets (VIA 686b), while apm works
well for this task (powering off a machine doesn't need much SMP
protection).


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: apm power_off on smp
  2002-07-14 22:55   ` Xavier Bestel
@ 2002-07-14 23:03     ` Pozsar Balazs
  2002-07-15  0:39       ` Alan Cox
  0 siblings, 1 reply; 9+ messages in thread
From: Pozsar Balazs @ 2002-07-14 23:03 UTC (permalink / raw)
  To: Xavier Bestel; +Cc: Kelledin, Linux Kernel Mailing List


Yes, all I want is poweroff.
I understand that apm is not smp safe, and pretty much all of it is
disabled in smp mode.

What i do not understand is why the poweroff functionality is disabled by
default.


On 15 Jul 2002, Xavier Bestel wrote:

> Le lun 15/07/2002 ŕ 00:30, Kelledin a écrit :
> > > APM's poweroff function is explicitly turned off on smp systems by
> > > default. Could someone tell me please what is the reason for that?
> >
> > (as of kernel 2.4.18) pretty much *all* APM functions are disabled on SMP
> > kernels--the simple reason being that APM isn't SMP safe, and making it SMP
> > safe is not a trivial task.
> >
> > If all you want is a soft power-off, you're better off using ACPI (assuming
> > your system supports it).  Since this is probably a desktop (and not a
> > laptop), I doubt there's much else you want in the way of power management...
>
> ACPI is still very broken for some chipsets (VIA 686b), while apm works
> well for this task (powering off a machine doesn't need much SMP
> protection).
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

-- 
pozsy


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: apm power_off on smp
  2002-07-15  0:39       ` Alan Cox
@ 2002-07-14 23:34         ` Xavier Bestel
  2002-07-15  0:57           ` Alan Cox
  0 siblings, 1 reply; 9+ messages in thread
From: Xavier Bestel @ 2002-07-14 23:34 UTC (permalink / raw)
  To: Alan Cox; +Cc: Pozsar Balazs, Kelledin, Linux Kernel Mailing List

Le lun 15/07/2002 à 02:39, Alan Cox a écrit :
> On Mon, 2002-07-15 at 00:03, Pozsar Balazs wrote:
> > 
> > Yes, all I want is poweroff.
> > I understand that apm is not smp safe, and pretty much all of it is
> > disabled in smp mode.
> > 
> > What i do not understand is why the poweroff functionality is disabled by
> > default.
> 
> Because it too is unsafe on some machines

Would it be possible to use the CPU-hotplug patch to unplug all CPUs
except the one entering apm power-off ?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: apm power_off on smp
  2002-07-15  0:57           ` Alan Cox
@ 2002-07-15  0:05             ` Xavier Bestel
  2002-07-15  1:23               ` Alan Cox
  0 siblings, 1 reply; 9+ messages in thread
From: Xavier Bestel @ 2002-07-15  0:05 UTC (permalink / raw)
  To: Alan Cox; +Cc: Pozsar Balazs, Kelledin, Linux Kernel Mailing List

Le lun 15/07/2002 à 02:57, Alan Cox a écrit :
> > Would it be possible to use the CPU-hotplug patch to unplug all CPUs
> > except the one entering apm power-off ?
> 
> Only if your hardware supports true CPU unplugging and your BIOS
> supports APM for it. That is wildly improbable at best

Err .. my mobo's BIOS is SMP specific and implements APM, so I guess
there is a case where it's useful. It must be something like when
running Win95, which is UP only. Isn't Linux able to return to a UP-like
state (à la Win95) just before entering poweroff ?

Or perhaps my first assumption is false: the APM implementation in my
BIOS just wastes some flash and never intended to be utilized.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: apm power_off on smp
  2002-07-14 23:03     ` Pozsar Balazs
@ 2002-07-15  0:39       ` Alan Cox
  2002-07-14 23:34         ` Xavier Bestel
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Cox @ 2002-07-15  0:39 UTC (permalink / raw)
  To: Pozsar Balazs; +Cc: Xavier Bestel, Kelledin, Linux Kernel Mailing List

On Mon, 2002-07-15 at 00:03, Pozsar Balazs wrote:
> 
> Yes, all I want is poweroff.
> I understand that apm is not smp safe, and pretty much all of it is
> disabled in smp mode.
> 
> What i do not understand is why the poweroff functionality is disabled by
> default.

Because it too is unsafe on some machines


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: apm power_off on smp
  2002-07-14 23:34         ` Xavier Bestel
@ 2002-07-15  0:57           ` Alan Cox
  2002-07-15  0:05             ` Xavier Bestel
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Cox @ 2002-07-15  0:57 UTC (permalink / raw)
  To: Xavier Bestel; +Cc: Pozsar Balazs, Kelledin, Linux Kernel Mailing List

On Mon, 2002-07-15 at 00:34, Xavier Bestel wrote:
> > > What i do not understand is why the poweroff functionality is disabled by
> > > default.
> > 
> > Because it too is unsafe on some machines
> 
> Would it be possible to use the CPU-hotplug patch to unplug all CPUs
> except the one entering apm power-off ?

Only if your hardware supports true CPU unplugging and your BIOS
supports APM for it. That is wildly improbable at best


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: apm power_off on smp
  2002-07-15  0:05             ` Xavier Bestel
@ 2002-07-15  1:23               ` Alan Cox
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2002-07-15  1:23 UTC (permalink / raw)
  To: Xavier Bestel; +Cc: Pozsar Balazs, Kelledin, Linux Kernel Mailing List

On Mon, 2002-07-15 at 01:05, Xavier Bestel wrote:
> Err .. my mobo's BIOS is SMP specific and implements APM, so I guess
> there is a case where it's useful. It must be something like when

Don't bet on that. I've seen quad Xeon servers with single CPU only APM

> running Win95, which is UP only. Isn't Linux able to return to a UP-like
> state (à la Win95) just before entering poweroff ?

We can flush the caches and pray, but what the BIOS does is an
interesting question. On the theory thats its your data you have to
select the chances you wish to take. (Indeed on -ac you can enable APM
on SMP in full)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-07-15  0:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-14 22:13 apm power_off on smp Pozsar Balazs
2002-07-14 22:30 ` Kelledin
2002-07-14 22:55   ` Xavier Bestel
2002-07-14 23:03     ` Pozsar Balazs
2002-07-15  0:39       ` Alan Cox
2002-07-14 23:34         ` Xavier Bestel
2002-07-15  0:57           ` Alan Cox
2002-07-15  0:05             ` Xavier Bestel
2002-07-15  1:23               ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.