Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1479432

Re: [PATCH v2 5/8] sched,x86: Enable Turbo Boost Max Technology

From Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 5/8] sched,x86: Enable Turbo Boost Max Technology
Date 2016-09-08 20:30 +0200
Message-ID <sfcff-S4-5@gated-at.bofh.it> (permalink)
References <scHpf-70l-11@gated-at.bofh.it> <scHpf-70l-9@gated-at.bofh.it> <sf2zg-3eC-19@gated-at.bofh.it> <sfbVT-HP-9@gated-at.bofh.it> <sfcff-S4-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 2016-09-08 at 20:22 +0200, Peter Zijlstra wrote:
> On Thu, Sep 08, 2016 at 11:09:28AM -0700, Tim Chen wrote:
> > 
> > On Thu, Sep 08, 2016 at 09:59:55AM +0200, Peter Zijlstra wrote:
> > > 
> > > I think there's a race here, if two tasks were to write to the
> > > sysctl
> > > they'd both change the value before getting stuck on the mutex in
> > > enable_sched_itmt().
> > > 
> > > One way around that is doing something like:
> > > 
> > > 
> > > 	struct ctl_table t;
> > > 	int val = sysctl_sched_itmt_enabled;
> > > 
> > > 	t = *table;
> > > 	t.data = &val;
> > > 
> > > 	proc_dointvec_minmax(&t, ...);
> > > 
> > > 	/* and update the sysctl_sched_itmt_enabled value inside the
> > > mutex */
> > > 	enable_sched_itmi(val);
> > 
> > Peter,
> > 
> > Since enable_sched_itmt is only used by sched_itmt_update_handler,
> > I've moved the mutex locking to sched_itmt_update_handler to
> > eliminate
> > the race condition in the code path you mentioned.
> 
> That is indeed simpler. Thanks!
Do we need to send v3 to include these changes?

Thanks,
Srinivas

> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 5/8] sched,x86: Enable Turbo Boost Max Technology Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-09-01 23:10 +0200
  Re: [PATCH v2 5/8] sched,x86: Enable Turbo Boost Max Technology Peter Zijlstra <peterz@infradead.org> - 2016-09-08 10:10 +0200
    Re: [PATCH v2 5/8] sched,x86: Enable Turbo Boost Max Technology Tim Chen <tim.c.chen@linux.intel.com> - 2016-09-08 20:10 +0200
      Re: [PATCH v2 5/8] sched,x86: Enable Turbo Boost Max Technology Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-09-08 20:30 +0200
        Re: [PATCH v2 5/8] sched,x86: Enable Turbo Boost Max Technology Peter Zijlstra <peterz@infradead.org> - 2016-09-08 20:40 +0200
          Re: [PATCH v2 5/8] sched,x86: Enable Turbo Boost Max Technology Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-09-08 20:50 +0200
        Re: [PATCH v2 5/8] sched,x86: Enable Turbo Boost Max Technology "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-09-08 23:20 +0200
      Re: [PATCH v2 5/8] sched,x86: Enable Turbo Boost Max Technology Peter Zijlstra <peterz@infradead.org> - 2016-09-08 20:30 +0200

csiph-web