linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Will Deacon <will@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrei Vagin <avagin@gmail.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/5] arm64: vdso: getcpu() support
Date: Wed, 17 Jun 2020 19:25:23 +0100	[thread overview]
Message-ID: <20200617182523.GH4613@sirena.org.uk> (raw)
In-Reply-To: <20200605131131.16491-1-broonie@kernel.org>


[-- Attachment #1.1: Type: text/plain, Size: 1561 bytes --]

On Fri, Jun 05, 2020 at 02:11:26PM +0100, Mark Brown wrote:

> It is questionable if something TPIDRRO_EL0 based is worthwhile at all
> on current kernels, since v4.18 we have had support for restartable
> sequences which can be used to provide a sched_getcpu() implementation
> with generally better performance than the vDSO approach on
> architectures which have that[1].  Work is ongoing to implement this for
> glibc:

...

> This is currently not compatible with KPTI due to what Will suggests is
> a misunderstanding on my part about the use of TPIDRRO_EL0 by the KPTI
> trampoline, since this posting is mainly for discussion of the approach
> as a whole and Will only just mentioned this that's not been addressed
> here.

So, I've been looking into this.  While it is true that we can do the
reinitialization I'm not sure that it's sensible to add this to what's
already a hot path where we're taking a substantial overhead for KPTI.
Given that once RSEQ sched_getcpu() support is merged into glibc (and
hopefully also other libcs) the majority of users will use that rather
than a vDSO implementation and the overwhelming impact will be overhead
until systems with E0PD start to be widely deployed which doesn't seem
great.

If we could find another scratch register for the trampoline that'd be
fine but otherwise I'm really questioning the value.  I've looked and
didn't see anything but it's entirely possible I'm missing something.
Otherwise do people think this is an idea worth pursuing, or should we
just suggest that people use RSEQ instead?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2020-06-17 18:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 13:11 [PATCH 0/5] arm64: vdso: getcpu() support Mark Brown
2020-06-05 13:11 ` [PATCH 1/5] arm64: vdso: Provide a define when building the vDSO Mark Brown
2020-06-05 13:11 ` [PATCH 2/5] arm64: vdso: Add per-CPU data Mark Brown
2020-06-05 13:11 ` [PATCH 3/5] arm64: vdso: Initialise the per-CPU vDSO data Mark Brown
2020-06-05 13:11 ` [PATCH 4/5] arm64: vdso: Add getcpu() implementation Mark Brown
2020-06-05 16:11   ` kernel test robot
2020-06-05 16:35     ` Mark Brown
2020-06-08  7:46       ` [kbuild-all] " Li Zhijian
2020-06-08 11:09         ` Mark Brown
2020-06-08 14:20           ` Philip Li
2020-06-07  2:04   ` kernel test robot
2020-06-05 13:11 ` [PATCH 5/5] selftests: vdso: Support arm64 in getcpu() test Mark Brown
2020-06-17 18:25 ` Mark Brown [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=20200617182523.GH4613@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=avagin@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=vincenzo.frascino@arm.com \
    --cc=will@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;
as well as URLs for NNTP newsgroup(s).