mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] x86: Improve 64 bit __phys_addr call performance
Date: Wed, 10 Oct 2012 16:56:25 -0700	[thread overview]
Message-ID: <50760B29.4040407@intel.com> (raw)
In-Reply-To: <20121010135801.GW16230@one.firstfloor.org>

On 10/10/2012 06:58 AM, Andi Kleen wrote:
>> The second change was to streamline the code by making use of the carry flag
>> on an add operation instead of performing a compare on a 64 bit value.  The
>> advantage to this is that it allows us to reduce the overall size of the call.
>> On my Xeon E5 system the entire __phys_addr inline call consumes 30 bytes and
>> 5 instructions.  I also applied similar logic to the debug version of the
>> function.  My testing shows that the debug version of the function with this
>> patch applied is slightly faster than the non-debug version without the patch.
> Looks good. Thanks. 
>
> Probably should still split the callers though (or have a pa_symbol_fast
> that does not do the check)
>
> -Andi

I hadn't thought of that.  I couldn't drop support for symbols from
__pa, but I can get away with dropping support for regular addresses
from __pa_symbol.

I just submitted a patch to drop support for standard virtual addresses
from __pa_symbol.  I will also submit some patches tomorrow morning for
cleaning up a number of places I had found where we were calling
__pa/virt_to_phys when we should have been calling __pa_symbol.

Thanks,

Alex

  reply	other threads:[~2012-10-10 23:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 18:50 Alexander Duyck
2012-10-10 13:58 ` Andi Kleen
2012-10-10 23:56   ` Alexander Duyck [this message]
2012-10-24 10:25 ` Ingo Molnar
2012-10-24 16:31   ` Alexander Duyck

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=50760B29.4040407@intel.com \
    --to=alexander.h.duyck@intel.com \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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

Powered by JetHome