Re: [PATCH RFC 00/28] ARM: Switch to generic entry

From: Russell King (Oracle)
Date: Thu Oct 10 2024 - 09:08:02 EST


On Thu, Oct 10, 2024 at 02:11:09PM +0200, Linus Walleij wrote:
> On Thu, Oct 10, 2024 at 1:55 PM Russell King (Oracle)
> <linux@xxxxxxxxxxxxxxx> wrote:
>
> > I haven't looked at the series yet, but I guess we're throwing away
> > all the effort I put in to make stuff like syscalls as fast as
> > possible.
> >
> > So the question is... do we want performance, or do we want generic
> > (and slower) code?
>
> Yes, the very same question that came to me as I was working on it, we
> need to reach some conclusion here. Al Viro also put some nice
> assembly optimizations in the syscall restart that just go out the
> window as well.
>
> Some of the C interpersing relates to the RCU context tracking that
> really likes to be called at every single IRQ, FIQ or SWI, and where ARM32
> is one of the few last users of the user_exit_callable()/user_enter_callable()
> API which is obviously less intrusive as it only needs to get called
> at transitions to/from userspace, while these calls are marked
> with big block letters as obsolete in the context tracker.
>
> > It seems insane to me that we spend time micro-optimising things like
> > memcpy, memset, divide routines, but then go and throw away performance
> > that applications actually rely upon, such as syscall performance.
>
> Yes, this series is a real RFC in the true sense of the word.

I think we need to quantify what the effect is on performance by making
these changes, and I think we need to do more than just syscall entry/
exit performance, but the overall performance impact on userspace when
the system is under a certain interrupt load.

One of the things we have to remember is that applications like to
endlessly get system time. Many of these other architectures that have
been converted to this generic code support VDSO. However, 32-bit ARM
generally does not have VDSO to avoid the syscall over head for
e.g. gettimeofday().

So, we also need to time real workloads as well to properly understand
what the effect of making these changes is.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!