From: Stephane Eranian <eranian@google.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Andi Kleen <ak@linux.intel.com>,
"Liang, Kan" <kan.liang@intel.com>,
mingo@elte.hu, nelson.dsouza@intel.com,
Jiri Olsa <jolsa@redhat.com>,
tonyj@suse.com
Subject: Re: [PATCH v2 2/2] perf/x86/intel: force resched when TFA sysctl is modified
Date: Mon, 15 Apr 2019 10:20:57 -0700 [thread overview]
Message-ID: <CABPqkBQtJ81TMvjExJ3+hm1f+E1zkbTi-au-GkJRTg9ovZgEsQ@mail.gmail.com> (raw)
In-Reply-To: <20190415155742.GI12232@hirez.programming.kicks-ass.net>
On Mon, Apr 15, 2019 at 8:57 AM Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Mon, Apr 08, 2019 at 10:32:52AM -0700, Stephane Eranian wrote:
> > +static ssize_t set_sysctl_tfa(struct device *cdev,
> > + struct device_attribute *attr,
> > + const char *buf, size_t count)
> > +{
> > + bool val;
> > + ssize_t ret;
> > +
> > + ret = kstrtobool(buf, &val);
> > + if (ret)
> > + return ret;
> > +
> > + /* no change */
> > + if (val == allow_tsx_force_abort)
> > + return count;
> > +
> > + allow_tsx_force_abort = val;
> > +
> > + get_online_cpus();
> > + on_each_cpu(update_tfa_sched, NULL, 1);
> > + put_online_cpus();
> > +
> > + return count;
> > +}
>
> So we care about concurrent writing to that file?
Not likely but we care about seeing the effects on event scheduling
before the sysctl returns.
next prev parent reply other threads:[~2019-04-15 17:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 17:32 [PATCH v2 0/3] perf/x86/intel: force reschedule on TFA changes Stephane Eranian
2019-04-08 17:32 ` [PATCH v2 1/2] perf/core: add perf_ctx_resched() as global function Stephane Eranian
2019-04-15 15:45 ` Peter Zijlstra
2019-04-15 15:53 ` Peter Zijlstra
2019-04-16 11:33 ` [tip:perf/core] perf/core: Add perf_pmu_resched() " tip-bot for Stephane Eranian
2019-04-08 17:32 ` [PATCH v2 2/2] perf/x86/intel: force resched when TFA sysctl is modified Stephane Eranian
2019-04-15 15:57 ` Peter Zijlstra
2019-04-15 17:20 ` Stephane Eranian [this message]
2019-04-16 11:33 ` [tip:perf/core] perf/x86/intel: Force " tip-bot for Stephane Eranian
2019-04-16 16:28 ` Vince Weaver
2019-04-16 17:41 ` Peter Zijlstra
2019-04-17 6:06 ` Ingo Molnar
2019-04-18 21:50 ` Stephane Eranian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABPqkBQtJ81TMvjExJ3+hm1f+E1zkbTi-au-GkJRTg9ovZgEsQ@mail.gmail.com \
--to=eranian@google.com \
--cc=ak@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nelson.dsouza@intel.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tonyj@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).