From: Ryan Arnold <rsa@us.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Neuling <mikey@neuling.org>,
Adhemerval Zanella <azanella@linux.vnet.ibm.com>,
sjmunroe@us.ibm.com, paulus@samba.org, anton@samba.org,
linuxppc-dev@lists.ozlabs.org,
Haren Myneni <haren@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/6] powerpc: Add enable_ppr kernel parameter to enable PPR save/restore
Date: Fri, 28 Sep 2012 17:11:44 -0500 [thread overview]
Message-ID: <1348870304.29664.6212.camel@localhost.localdomain> (raw)
In-Reply-To: <1347342911.2603.39.camel@pasglop>
On Tue, 2012-09-11 at 15:55 +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2012-09-10 at 22:42 -0700, Haren Myneni wrote:
> >
> > Thanks Michael. Yes, we noticed 6% overhead with null syscall test.
> > Hence added cmdline option as suggested. I will add this comment in
> > the
> > changelog.
> >
> > Regarding the option name, I thought about various ones such as
> > retain_process_ppr, retain_smt_priority, save_ppr and etc. Finally
> > added
> > 'enable_ppr' since it enables CPU_FTR (CPU_FTR_HAS_PPR) which allows
> > to
> > save/restore PPR value. Sure, I will change this option.
>
> No, that isn't a problem with the name. It's a problem with the polarity
> of the option.
>
> If you need a command line argument to enable the option, then nobody
> will enable it, it's pointless.
In GLIBC (ppc.h) we'll be providing a user space API to change the
thread priority in user state. We're also interested in using this in
some of the locking constructs if performance tests indicate it's
beneficial.
I have concerns with being able to enable/disable this option at boot
time. Usually, in GLIBC we'll just do a kernel version check and enable
certain facilities if we're building against a particular kernel that
supports them.
In this case, with a configurable option, GLIBC is going to need the
kernel to export a hwcap bit that tells us whether we need to do the
save/restore ourselves. Having to check the hwcap, and do the
save/restore in user space will, of course, increase the overhead on our
side.
If no hwcap bit is provided and this is disabled at kernel boot time, no
check is done and the user process assumes it's running under a certain
priority when it is, in-fact, not. I don't care for this option. We'll
be hitting code paths that are ineffective and unnecessary.
Ryan S. Arnold
Linux Technology Center
prev parent reply other threads:[~2012-09-28 22:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-09 11:37 [PATCH 2/6] powerpc: Add enable_ppr kernel parameter to enable PPR save/restore Haren Myneni
2012-09-10 0:12 ` Benjamin Herrenschmidt
2012-09-10 0:22 ` Michael Neuling
2012-09-11 5:42 ` Haren Myneni
2012-09-11 5:55 ` Benjamin Herrenschmidt
2012-09-28 22:11 ` Ryan Arnold [this message]
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=1348870304.29664.6212.camel@localhost.localdomain \
--to=rsa@us.ibm.com \
--cc=anton@samba.org \
--cc=azanella@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=haren@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=paulus@samba.org \
--cc=sjmunroe@us.ibm.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).