From: Michael Ellerman <mpe@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, <linuxppc-dev@ozlabs.org>
Subject: Re: [1/4] powerpc/kernel: Drop HMT_MEDIUM_PPR_DISCARD
Date: Thu, 17 Dec 2015 22:57:29 +1100 (AEDT) [thread overview]
Message-ID: <20151217115730.0BA221402A8@ozlabs.org> (raw)
In-Reply-To: <1448421919-30426-1-git-send-email-mpe@ellerman.id.au>
On Wed, 2015-25-11 at 03:25:16 UTC, Michael Ellerman wrote:
> HMT_MEDIUM_PPR_DISCARD is a macro which is present at the start of most
> of our first level exception handlers. It conditionally executes a
> HMT_MEDIUM instruction, which sets the processor priority to medium.
>
> On on modern systems, ie. Power7 and later, it is nop'ed out at boot.
> All it does is make the exception vectors more cramped, and consume 4
> bytes of icache.
>
> On old systems it has the effect of boosting the processor priority at
> the start of exception processing. If we were previously in the idle
> loop for example, we may be at low or very low priority. This is
> desirable as we want to process the exception as fast as possible.
>
> However looking closely at the generated code, we see that in all cases
> we execute another HMT_MEDIUM just four instructions later. With code
> patching applied, the final code on an old (Power6) system will look
> like, eg:
>
> c000000000000300 <data_access_pSeries>:
> c000000000000300: 7c 42 13 78 mr r2,r2 <-
> c000000000000304: 7d b2 43 a6 mtsprg 2,r13
> c000000000000308: 7d b1 42 a6 mfsprg r13,1
> c00000000000030c: f9 2d 00 80 std r9,128(r13)
> c000000000000310: 60 00 00 00 nop
> c000000000000314: 7c 42 13 78 mr r2,r2 <-
>
> So I suggest that the added code complexity of HMT_MEDIUM_PPR_DISCARD is
> not justified by the benefit of boosting the processor priority for the
> duration of four instructions, and therefore we drop it.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Series applied to powerpc next.
https://git.kernel.org/powerpc/c/d6265aeaf815801ad53a95f11c
cheers
prev parent reply other threads:[~2015-12-17 11:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 3:25 [PATCH 1/4] powerpc/kernel: Drop HMT_MEDIUM_PPR_DISCARD Michael Ellerman
2015-11-25 3:25 ` [PATCH 2/4] powerpc/kernel: Open code HMT_MEDIUM_LOW_HAS_PPR Michael Ellerman
2015-11-25 3:25 ` [PATCH 3/4] powerpc/kernel: Open code SET_DEFAULT_THREAD_PPR Michael Ellerman
2015-11-25 3:25 ` [PATCH 4/4] powerpc/kernel: Combine vec/loc for STD_EXCEPTION_PSERIES Michael Ellerman
2015-12-17 11:57 ` Michael Ellerman [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=20151217115730.0BA221402A8@ozlabs.org \
--to=mpe@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
/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).