lkml.org 
[lkml]   [2016]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFCv7 PATCH 03/10] sched: scheduler-driven cpu frequency selection
On Thu, Feb 25, 2016 at 04:34:23PM -0800, Steve Muckle wrote:
> >> + /*
> >> + * Ensure that all CPUs currently part of this policy are out
> >> + * of the hot path so that if this policy exits we can free gd.
> >> + */
> >> + preempt_disable();
> >> + smp_call_function_many(policy->cpus, dummy, NULL, true);
> >> + preempt_enable();
> >
> > I'm not sure how this works, can you please tell me?
>
> Peter correctly interpreted my intentions.
>
> The RCU possibility also crossed my mind. They both seemed like a bit of
> a hack to me - this wouldn't really be doing any RCU per se, rather
> relying on its implementation. I'll switch to RCU since that seems to be
> preferred though. It's certainly cleaner to write.

RCU is widely used in this fashion. synchronize_sched() is explicitly
constructed to sync against preempt disable sections. This is not an
implementation detail.

\
 
 \ /
  Last update: 2016-03-01 14:41    [W:0.344 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site