All of lore.kernel.org
 help / color / mirror / Atom feed
* Understanding stop_machine() use for cpu_down()
@ 2017-01-25 23:41 Hardik H Bagdi
  2017-01-26  7:10 ` Greg KH
  2017-01-26 14:09 ` Hardik H Bagdi
  0 siblings, 2 replies; 4+ messages in thread
From: Hardik H Bagdi @ 2017-01-25 23:41 UTC (permalink / raw)
  To: linux-hotplug

Hi,

I'm trying to understand why stop_machine() is necessary for
cpu_down() operation.

I see that multi_cpu_stop() on every online cpu (which hogs the cpu
and then triggers state changes state)
and then, take_cpu_down is invoked on the outgoing cpu.
This happens by every cpu decrementing the msdata->thread_ack and last
one trigger a state change.

I'm trying to understand why is this necessary.

Is to wait for RCU grace period(s)?
If yes, what variable/struct is being protected and how does
stop_machine() help there?

I see there was a patch (https://lwn.net/Articles/538819/) but had
some issues with idle_loop.

Is there an alternative where the stop_machine would not be necessary?
Or more specifically, is there a reason why every CPU would need to stop?

Any help would be appreciated.

Thanks,
Hardik

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

* Re: Understanding stop_machine() use for cpu_down()
  2017-01-25 23:41 Understanding stop_machine() use for cpu_down() Hardik H Bagdi
@ 2017-01-26  7:10 ` Greg KH
  2017-01-26 14:09 ` Hardik H Bagdi
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2017-01-26  7:10 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Jan 25, 2017 at 06:41:53PM -0500, Hardik H Bagdi wrote:
> Hi,
> 
> I'm trying to understand why stop_machine() is necessary for
> cpu_down() operation.

Great!  But you might want to ask this on a linux kernel specific
mailing list.  This is for the old linux hotplug scripts :)

Perhaps linux-kernel@vger.kernel.org and cc: the proper kernel
developers who work in this area?

good luck!

greg k-h

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

* Re: Understanding stop_machine() use for cpu_down()
  2017-01-25 23:41 Understanding stop_machine() use for cpu_down() Hardik H Bagdi
  2017-01-26  7:10 ` Greg KH
@ 2017-01-26 14:09 ` Hardik H Bagdi
  1 sibling, 0 replies; 4+ messages in thread
From: Hardik H Bagdi @ 2017-01-26 14:09 UTC (permalink / raw)
  To: linux-hotplug

Okay, got you.
Thanks a lot!

Harry

On Thu, Jan 26, 2017 at 2:10 AM, Greg KH <greg@kroah.com> wrote:
> On Wed, Jan 25, 2017 at 06:41:53PM -0500, Hardik H Bagdi wrote:
>> Hi,
>>
>> I'm trying to understand why stop_machine() is necessary for
>> cpu_down() operation.
>
> Great!  But you might want to ask this on a linux kernel specific
> mailing list.  This is for the old linux hotplug scripts :)
>
> Perhaps linux-kernel@vger.kernel.org and cc: the proper kernel
> developers who work in this area?
>
> good luck!
>
> greg k-h

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

* Understanding stop_machine() use for cpu_down()
@ 2017-01-26 14:12 Hardik H Bagdi
  0 siblings, 0 replies; 4+ messages in thread
From: Hardik H Bagdi @ 2017-01-26 14:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: rusty, vatsa, ashok.raj, zwanem

Hi,

I'm trying to understand why stop_machine() is necessary for
cpu_down() operation.

I see that multi_cpu_stop() on every online cpu (which hogs the cpu
and then triggers state changes state)
and then, take_cpu_down is invoked on the outgoing cpu.
This happens by every cpu decrementing the msdata->thread_ack and last
one trigger a state change.

I'm trying to understand why is this necessary.

Is to wait for RCU grace period(s)?
If yes, what variable/struct is being protected and how does
stop_machine() help there?

I see there was a patch (https://lwn.net/Articles/538819/) but had
some issues with idle_loop.

Is there an alternative where the stop_machine would not be necessary?
Or more specifically, is there a reason why every CPU would need to stop?

Any help would be appreciated.

Thanks,
Hardik

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

end of thread, other threads:[~2017-01-26 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 23:41 Understanding stop_machine() use for cpu_down() Hardik H Bagdi
2017-01-26  7:10 ` Greg KH
2017-01-26 14:09 ` Hardik H Bagdi
2017-01-26 14:12 Hardik H Bagdi

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.