From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Jinjie Ruan <ruanjinjie@huawei.com>,
catalin.marinas@arm.com, will@kernel.org, oleg@redhat.com,
tglx@linutronix.de, peterz@infradead.org, luto@kernel.org,
kees@kernel.org, wad@chromium.org, rostedt@goodmis.org,
arnd@arndb.de, ardb@kernel.org, broonie@kernel.org,
rick.p.edgecombe@intel.com, leobras@redhat.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 0/3] arm64: entry: Convert to generic entry
Date: Tue, 22 Oct 2024 14:58:21 +0100 [thread overview]
Message-ID: <Zxevfe-PZgB_Z8hi@shell.armlinux.org.uk> (raw)
In-Reply-To: <ZxEsZBvsirXJz2dT@J2N7QTR9R3.cambridge.arm.com>
On Thu, Oct 17, 2024 at 04:25:36PM +0100, Mark Rutland wrote:
> Hi,
>
> On Sat, Jun 29, 2024 at 04:55:58PM +0800, Jinjie Ruan wrote:
> > Currently, x86, Riscv, Loongarch use the generic entry. Convert arm64
> > to use the generic entry infrastructure from kernel/entry/*. The generic
> > entry makes maintainers' work easier and codes more elegant, which aslo
> > removed a lot of duplicate code.
>
> > arch/arm64/Kconfig | 1 +
> > arch/arm64/include/asm/entry-common.h | 172 ++++++++++++
> > arch/arm64/include/asm/ptrace.h | 5 +
> > arch/arm64/include/asm/stacktrace.h | 5 +-
> > arch/arm64/include/asm/syscall.h | 6 +-
> > arch/arm64/include/asm/thread_info.h | 23 +-
> > arch/arm64/kernel/entry-common.c | 368 +++++---------------------
> > arch/arm64/kernel/ptrace.c | 90 -------
> > arch/arm64/kernel/signal.c | 3 +-
> > arch/arm64/kernel/syscall.c | 18 +-
> > include/linux/entry-common.h | 90 +++++++
> > include/linux/thread_info.h | 13 +
> > kernel/entry/common.c | 37 +--
> > 13 files changed, 395 insertions(+), 436 deletions(-)
> > create mode 100644 arch/arm64/include/asm/entry-common.h
>
> Looking at this I have a few concerns, which I've tried to explain
> below.
One concern I notice Mark didn't mention is (and I've made this same
point in response to LinusW's series doing similar for 32-bit ARM)
is... we need to quantify what the impact is of making these changes.
Historically, people have worked hard to make the overhead from
syscalls as low as possible - if one looks at the x86 architecture,
Linux first started off using int $0x80 to deliver syscalls to the
kernel. Later CPUs invented sysenter and syscall instructions which
I guess result in increased performance over the old int $0x80
approach.
syscall entry/exit times are one of those trivial things to measure,
most commonly done by seeing how many getpid() calls one can make
to the kernel in a defined period of time - and it's one of those
measurements people consider (rightly or wrongly) to be a measure
of the system performance.
When one considers that the majority of interactions userspace has
with the kernel involve syscalls, one can see why this is an
important path to be as performant as possible.
So, I think it's important to always quantify what the impact is of
any major change to the kernel entry/exit paths - it's all part of
properly evaluating whether the change makes sense.
If switching to generic code causes a significant degredation in
performance, then that needs to be investigated and fixed - not
waited for until someone pops up and eventually says "hey, that
change to use the generic code resulted in our systems becoming
much less performant!" six or twelve months down the road.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2024-10-22 14:03 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-29 8:55 [PATCH v3 0/3] arm64: entry: Convert to generic entry Jinjie Ruan
2024-06-29 8:55 ` [PATCH v3 1/3] entry: Add some arch funcs to support arm64 to use " Jinjie Ruan
2024-08-20 11:41 ` Kevin Brodsky
2024-08-22 12:36 ` Jinjie Ruan
2024-08-26 15:55 ` Kevin Brodsky
2024-06-29 8:56 ` [PATCH v3 2/3] arm64: Prepare to switch to " Jinjie Ruan
2024-08-20 11:42 ` Kevin Brodsky
2024-08-20 12:57 ` Jinjie Ruan
2024-06-29 8:56 ` [PATCH v3 3/3] arm64: entry: Convert " Jinjie Ruan
2024-07-23 1:39 ` Jinjie Ruan
2024-08-20 11:43 ` Kevin Brodsky
2024-08-22 12:30 ` Jinjie Ruan
2024-08-26 15:56 ` Kevin Brodsky
2024-09-18 1:59 ` Jinjie Ruan
2024-09-18 8:04 ` Mark Rutland
2024-07-01 15:40 ` [PATCH v3 0/3] " Kees Cook
2024-07-02 1:01 ` Jinjie Ruan
2024-07-02 20:59 ` Kees Cook
2024-07-07 19:20 ` Thomas Gleixner
2024-10-17 15:25 ` Mark Rutland
2024-10-21 8:30 ` Jinjie Ruan
2024-10-21 9:45 ` Mark Rutland
2024-10-22 12:07 ` Jinjie Ruan
2024-10-22 13:08 ` Mark Rutland
2024-10-22 13:37 ` Mark Rutland
2024-10-22 13:58 ` Russell King (Oracle) [this message]
2024-11-01 23:01 ` Linus Walleij
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=Zxevfe-PZgB_Z8hi@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=kees@kernel.org \
--cc=leobras@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mark.rutland@arm.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=rostedt@goodmis.org \
--cc=ruanjinjie@huawei.com \
--cc=tglx@linutronix.de \
--cc=wad@chromium.org \
--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).