From: David Daney <ddaney@caviumnetworks.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>, ralf@linux-mips.org
Cc: David VomLehn <dvomlehn@cisco.com>, linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: Don't branch to eret in TLB refill.
Date: Mon, 18 May 2009 09:25:12 -0700 [thread overview]
Message-ID: <4A118BE8.50201@caviumnetworks.com> (raw)
In-Reply-To: <alpine.LFD.1.10.0905160706300.12158@ftp.linux-mips.org>
Maciej W. Rozycki wrote:
> On Tue, 12 May 2009, David Daney wrote:
>
>>>> + /*
>>>> + * Find the split point.
>>>> + */
>>>> + if (uasm_insn_has_bdelay(relocs, split - 1))
>>>> + split--;
>>>> + }
>>> The code itself makes sense. Does this case actually happen much, or was
>>> this just an itch?
>>>
>> For my CPU it was happening 100% of the time when I add the soon to be
>> submitted hugeTLBfs support patch. Although I have not measured it, this code
>> is so hot that keeping the normal case fitting on a single cache line should
>> be a big win.
>
> Rather than this hack,
I don't really know what to say about that comment.
* We are synthesizing optimized TLB refill handlers, even small
improvements yield big gains in system performance.
* The optimization you suggest below, although a good one, is somewhat
different and would make a good follow on patch.
* I am trying to make forward progress and not have The perfect be the
enemy of the good.
> I'd suggest microoptimising the code by shuffling
> it such that unless the handler fits in 128 bytes entirely (I'm not sure
> if that ever happens for XTLB refill) the part built by
> build_get_pgd_vmalloc64() is placed in the TLB handler slot, saving an
> unnecessary unconditional branch there. This way the problem of an
> unconditional branch to ERET will solve automagically as a side-effect.
> Unless the vmalloc part does not fit in 128 bytes, that is, in which case
> it would have to overflow back to the XTLB slot. It should be pretty
> straightforward to code. ;)
>
> Maciej
>
next prev parent reply other threads:[~2009-05-18 16:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 22:45 [PATCH] MIPS: Don't branch to eret in TLB refill David Daney
2009-05-13 0:23 ` David VomLehn
2009-05-13 1:12 ` David Daney
2009-05-13 2:01 ` Paul Gortmaker
2009-05-16 7:28 ` Maciej W. Rozycki
2009-05-18 16:25 ` David Daney [this message]
2009-05-18 17:48 ` Maciej W. Rozycki
2009-05-18 19:32 ` [PATCH] MIPS: Fold the TLB refill at the vmalloc path if possible Maciej W. Rozycki
2009-05-18 23:26 ` David Daney
2009-05-18 23:33 ` Maciej W. Rozycki
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=4A118BE8.50201@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=dvomlehn@cisco.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=ralf@linux-mips.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