From: yunhui cui <cuiyunhui@bytedance.com>
To: "Christoph Lameter (Ampere)" <cl@gentwo.org>
Cc: punit.agrawal@bytedance.com, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu, dennis@kernel.org,
tj@kernel.org, samitolvanen@google.com, guoren@kernel.org,
debug@rivosinc.com, charlie@rivosinc.com, cleger@rivosinc.com,
puranjay@kernel.org, antonb@tenstorrent.com, namcaov@gmail.com,
andy.chiu@sifive.com, ajones@ventanamicro.com,
samuel.holland@sifive.com, haxel@fzi.de,
yang.zhang@hexintek.com, conor.dooley@microchip.com,
evan@rivosinc.com, yang.lee@linux.alibaba.com,
tglx@linutronix.de, haibo1.xu@intel.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [External] Re: [PATCH RFC] riscv: use gp to save percpu offset
Date: Fri, 30 Aug 2024 18:01:31 +0800 [thread overview]
Message-ID: <CAEEQ3w=PsM5T+yMrEGdWZ2nm7m7SX3vzscLtWpOPVu1zpfm3YQ@mail.gmail.com> (raw)
In-Reply-To: <e06a3bd9-6378-2d4b-b06d-cc2d58776eca@gentwo.org>
Hi Christoph,
On Sat, Aug 24, 2024 at 9:57 AM Christoph Lameter (Ampere)
<cl@gentwo.org> wrote:
>
> On Sat, 24 Aug 2024, Yunhui Cui wrote:
>
> > Compared to directly fetching the per-CPU offset from memory (or cache),
> > using the global pointer (gp) to store the per-CPU offset can save one
> > memory access.
>
> Yes! That is a step in the right direction.
>
> Is there something like gp relative addressing so that we can do loads
> and stores relative to gp as well?
>
> Are there atomics that can do read modify write relative to GP? That would
> get you to comparable per cpu efficiency to x86. x86 can do relative
> addressing and RMV in one instruction which allows one to drop the preempt
> enable/disable since one instruction cannot be interrupted.
Your suggestion is excellent. If conditions permit, we can indeed move
closer to the x86 architecture.
Thanks,
Yunhui
prev parent reply other threads:[~2024-08-30 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-24 0:49 Yunhui Cui
2024-08-24 1:57 ` Christoph Lameter (Ampere)
2024-08-30 10:01 ` yunhui cui [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='CAEEQ3w=PsM5T+yMrEGdWZ2nm7m7SX3vzscLtWpOPVu1zpfm3YQ@mail.gmail.com' \
--to=cuiyunhui@bytedance.com \
--cc=ajones@ventanamicro.com \
--cc=andy.chiu@sifive.com \
--cc=antonb@tenstorrent.com \
--cc=aou@eecs.berkeley.edu \
--cc=charlie@rivosinc.com \
--cc=cl@gentwo.org \
--cc=cleger@rivosinc.com \
--cc=conor.dooley@microchip.com \
--cc=debug@rivosinc.com \
--cc=dennis@kernel.org \
--cc=evan@rivosinc.com \
--cc=guoren@kernel.org \
--cc=haibo1.xu@intel.com \
--cc=haxel@fzi.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=namcaov@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=punit.agrawal@bytedance.com \
--cc=puranjay@kernel.org \
--cc=samitolvanen@google.com \
--cc=samuel.holland@sifive.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=yang.lee@linux.alibaba.com \
--cc=yang.zhang@hexintek.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