linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: implement optimized percpu variable access
Date: Thu, 29 Nov 2012 11:11:16 -0800	[thread overview]
Message-ID: <20121129191115.GH5312@atomide.com> (raw)
In-Reply-To: <1354200764-23751-1-git-send-email-robherring2@gmail.com>

* Rob Herring <robherring2@gmail.com> [121129 06:55]:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> Use the previously unused TPIDRPRW register to store percpu offsets.
> TPIDRPRW is only accessible in PL1, so it can only be used in the kernel.
> 
> This replaces 2 loads with a mrc instruction for each percpu variable
> access. With hackbench, the performance improvement is 1.4% on Cortex-A9
> (highbank). Taking an average of 30 runs of "hackbench -l 1000" yields:
> 
> Before: 6.2191
> After: 6.1348
> 
> Will Deacon reported similar delta on v6 with 11MPCore.
> 
> The asm "memory" constraints are needed here to ensure the percpu offset
> gets reloaded. Testing by Will found that this would not happen in
> __schedule() which is a bit of a special case as preemption is disabled
> but the execution can move cores.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Acked-by: Will Deacon <will.deacon@arm.com>
> ---
> Changes in v2:
> - Add asm "memory" constraint
> - Only enable on v6K and v7 and avoid enabling for v6 SMP_ON_UP

Thanks, seems to still boot on omap2 with omap2plus_defconfig.
Once the other comments are sorted out:

Acked-by: Tony Lindgren <tony@atomide.com>

      parent reply	other threads:[~2012-11-29 19:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 14:52 [PATCH v2] ARM: implement optimized percpu variable access Rob Herring
2012-11-29 15:05 ` Will Deacon
2012-11-29 15:09   ` Russell King - ARM Linux
2012-11-29 15:13   ` Rob Herring
2012-11-29 15:26     ` Will Deacon
2012-11-29 15:48     ` Nicolas Pitre
2012-11-29 15:45 ` Nicolas Pitre
2012-11-29 15:53   ` Russell King - ARM Linux
2012-11-29 16:02     ` Nicolas Pitre
2012-11-29 16:06       ` Russell King - ARM Linux
2012-11-29 19:11 ` Tony Lindgren [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=20121129191115.GH5312@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.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).