All of lore.kernel.org
 help / color / mirror / Atom feed
* nonboot cpu on SMP suspend
@ 2009-03-18  6:25 Li Yang
  2009-03-18 23:00 ` Rafael J. Wysocki
  2009-03-20 18:58 ` Pavel Machek
  0 siblings, 2 replies; 8+ messages in thread
From: Li Yang @ 2009-03-18  6:25 UTC (permalink / raw)
  To: linux-kernel

Hi all,

I'm curious why we need to un-plug all the nonboot cpus before suspend
and start them all over again after the suspend(ACPI sleep)?  I mean
if we can bring the booting cpu back to the exact state as before
suspend, why can't we just do the same for non-booting cpus?  And that
will be much faster.  Any thought?  Thanks.

- Leo

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

* Re: nonboot cpu on SMP suspend
  2009-03-18  6:25 nonboot cpu on SMP suspend Li Yang
@ 2009-03-18 23:00 ` Rafael J. Wysocki
  2009-03-19  7:04   ` chen gong
  2009-03-20 18:58 ` Pavel Machek
  1 sibling, 1 reply; 8+ messages in thread
From: Rafael J. Wysocki @ 2009-03-18 23:00 UTC (permalink / raw)
  To: Li Yang; +Cc: linux-kernel

On Wednesday 18 March 2009, Li Yang wrote:
> Hi all,
> 
> I'm curious why we need to un-plug all the nonboot cpus before suspend
> and start them all over again after the suspend(ACPI sleep)?  I mean
> if we can bring the booting cpu back to the exact state as before
> suspend, why can't we just do the same for non-booting cpus?  And that
> will be much faster.  Any thought?  Thanks.

Because we need to enter the BIOS with one CPU on-line only.

Thanks,
Rafael

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

* Re: nonboot cpu on SMP suspend
  2009-03-18 23:00 ` Rafael J. Wysocki
@ 2009-03-19  7:04   ` chen gong
  2009-03-19  7:18     ` Li Yang
  0 siblings, 1 reply; 8+ messages in thread
From: chen gong @ 2009-03-19  7:04 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Li Yang, linux-kernel

Rafael J. Wysocki 写道:
> On Wednesday 18 March 2009, Li Yang wrote:
>> Hi all,
>>
>> I'm curious why we need to un-plug all the nonboot cpus before suspend
>> and start them all over again after the suspend(ACPI sleep)?  I mean
>> if we can bring the booting cpu back to the exact state as before
>> suspend, why can't we just do the same for non-booting cpus?  And that
>> will be much faster.  Any thought?  Thanks.
> 
> Because we need to enter the BIOS with one CPU on-line only.
> 
You mean only one CPU can be supported by BIOS when suspend/resume ?

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

* Re: nonboot cpu on SMP suspend
  2009-03-19  7:04   ` chen gong
@ 2009-03-19  7:18     ` Li Yang
  2009-03-19 12:30       ` Rafael J. Wysocki
  0 siblings, 1 reply; 8+ messages in thread
From: Li Yang @ 2009-03-19  7:18 UTC (permalink / raw)
  To: chen gong; +Cc: Rafael J. Wysocki, linux-kernel

On Thu, Mar 19, 2009 at 3:04 PM, chen gong <gong.chen@linux.intel.com> wrote:
> Rafael J. Wysocki 写道:
>>
>> On Wednesday 18 March 2009, Li Yang wrote:
>>>
>>> Hi all,
>>>
>>> I'm curious why we need to un-plug all the nonboot cpus before suspend
>>> and start them all over again after the suspend(ACPI sleep)?  I mean
>>> if we can bring the booting cpu back to the exact state as before
>>> suspend, why can't we just do the same for non-booting cpus?  And that
>>> will be much faster.  Any thought?  Thanks.
>>
>> Because we need to enter the BIOS with one CPU on-line only.
>>
> You mean only one CPU can be supported by BIOS when suspend/resume ?

If so, is it a defect of x86 BIOS?  And is it true that for other
architectures without a BIOS there won't be such a limitation if the
boot code is sane?  Thanks

- Leo

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

* Re: nonboot cpu on SMP suspend
  2009-03-19  7:18     ` Li Yang
@ 2009-03-19 12:30       ` Rafael J. Wysocki
  0 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2009-03-19 12:30 UTC (permalink / raw)
  To: Li Yang; +Cc: chen gong, linux-kernel

On Thursday 19 March 2009, Li Yang wrote:
> On Thu, Mar 19, 2009 at 3:04 PM, chen gong <gong.chen@linux.intel.com> wrote:
> > Rafael J. Wysocki 写道:
> >>
> >> On Wednesday 18 March 2009, Li Yang wrote:
> >>>
> >>> Hi all,
> >>>
> >>> I'm curious why we need to un-plug all the nonboot cpus before suspend
> >>> and start them all over again after the suspend(ACPI sleep)?  I mean
> >>> if we can bring the booting cpu back to the exact state as before
> >>> suspend, why can't we just do the same for non-booting cpus?  And that
> >>> will be much faster.  Any thought?  Thanks.
> >>
> >> Because we need to enter the BIOS with one CPU on-line only.
> >>
> > You mean only one CPU can be supported by BIOS when suspend/resume ?
> 
> If so, is it a defect of x86 BIOS?  And is it true that for other
> architectures without a BIOS there won't be such a limitation if the
> boot code is sane?  Thanks

I think that is a limitation of x86 BIOS and I don't know enough about the
other architectures to comment.

Thanks,
Rafael


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

* Re: nonboot cpu on SMP suspend
  2009-03-18  6:25 nonboot cpu on SMP suspend Li Yang
  2009-03-18 23:00 ` Rafael J. Wysocki
@ 2009-03-20 18:58 ` Pavel Machek
  2009-03-23  7:15   ` Li Yang
  1 sibling, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2009-03-20 18:58 UTC (permalink / raw)
  To: Li Yang; +Cc: linux-kernel

On Wed 2009-03-18 14:25:32, Li Yang wrote:
> Hi all,
> 
> I'm curious why we need to un-plug all the nonboot cpus before suspend
> and start them all over again after the suspend(ACPI sleep)?  I mean
> if we can bring the booting cpu back to the exact state as before
> suspend, why can't we just do the same for non-booting cpus?  And that
> will be much faster.  Any thought?  Thanks.

Why do you think it will be faster?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: nonboot cpu on SMP suspend
  2009-03-20 18:58 ` Pavel Machek
@ 2009-03-23  7:15   ` Li Yang
  2009-03-23 10:38     ` Pavel Machek
  0 siblings, 1 reply; 8+ messages in thread
From: Li Yang @ 2009-03-23  7:15 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-kernel

On Sat, Mar 21, 2009 at 2:58 AM, Pavel Machek <pavel@ucw.cz> wrote:
> On Wed 2009-03-18 14:25:32, Li Yang wrote:
>> Hi all,
>>
>> I'm curious why we need to un-plug all the nonboot cpus before suspend
>> and start them all over again after the suspend(ACPI sleep)?  I mean
>> if we can bring the booting cpu back to the exact state as before
>> suspend, why can't we just do the same for non-booting cpus?  And that
>> will be much faster.  Any thought?  Thanks.
>
> Why do you think it will be faster?

_cpu_down() and _cpu_up() are surely complex functions, involving
work_queues and synchronization between boot cpu and non-boot cpu.  On
the contrary, to bring the cpu back to previous state is much simpler.
 For standby state, you barely need to do anything.  For mem state,
you only need to restore the registers and states of the CPU.

- Leo

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

* Re: nonboot cpu on SMP suspend
  2009-03-23  7:15   ` Li Yang
@ 2009-03-23 10:38     ` Pavel Machek
  0 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2009-03-23 10:38 UTC (permalink / raw)
  To: Li Yang; +Cc: linux-kernel

On Mon 2009-03-23 15:15:57, Li Yang wrote:
> On Sat, Mar 21, 2009 at 2:58 AM, Pavel Machek <pavel@ucw.cz> wrote:
> > On Wed 2009-03-18 14:25:32, Li Yang wrote:
> >> Hi all,
> >>
> >> I'm curious why we need to un-plug all the nonboot cpus before suspend
> >> and start them all over again after the suspend(ACPI sleep)?  I mean
> >> if we can bring the booting cpu back to the exact state as before
> >> suspend, why can't we just do the same for non-booting cpus?  And that
> >> will be much faster.  Any thought?  Thanks.
> >
> > Why do you think it will be faster?
> 
> _cpu_down() and _cpu_up() are surely complex functions, involving
> work_queues and synchronization between boot cpu and non-boot cpu.  On
> the contrary, to bring the cpu back to previous state is much simpler.
>  For standby state, you barely need to do anything.  For mem state,
> you only need to restore the registers and states of the CPU.

Feel free to cook up a patch.
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

end of thread, other threads:[~2009-03-23 10:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-18  6:25 nonboot cpu on SMP suspend Li Yang
2009-03-18 23:00 ` Rafael J. Wysocki
2009-03-19  7:04   ` chen gong
2009-03-19  7:18     ` Li Yang
2009-03-19 12:30       ` Rafael J. Wysocki
2009-03-20 18:58 ` Pavel Machek
2009-03-23  7:15   ` Li Yang
2009-03-23 10:38     ` Pavel Machek

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.