Re: regression/bisected commit 773688a6cb24b0b3c2ba40354d883348a2befa38 make my system completely unusable under high load

From: Marco Elver
Date: Fri Jan 19 2024 - 06:00:40 EST


On Fri, 19 Jan 2024 at 11:54, Marco Elver <elver@xxxxxxxxxx> wrote:
>
> On Fri, 19 Jan 2024 at 11:46, Mikhail Gavrilov
> <mikhail.v.gavrilov@xxxxxxxxx> wrote:
> >
> > Hi,
> > I use a system with KASAN sanitizer everyday.
> > Because I want to catch difficult-to-repeat bugs.
> > And all worked fine until commit 773688a6cb24b0b3c2ba40354d883348a2befa38.
> > After commit 773688a6cb24b0b3c2ba40354d883348a2befa38 all working
> > jerky when I compile something.
> > The sound is interrupted, the cursor moves jerkily if I try to do
> > anything when all the cores are loaded.
> >
> > > git bisect bad
> > 773688a6cb24b0b3c2ba40354d883348a2befa38 is the first bad commit
> > commit 773688a6cb24b0b3c2ba40354d883348a2befa38
> > Author: Andrey Konovalov <andreyknvl@xxxxxxxxxx>
> > Date: Mon Nov 20 18:47:19 2023 +0100
> >
> > kasan: use stack_depot_put for Generic mode
> [...]
> > mm/kasan/common.c | 3 ++-
> > mm/kasan/generic.c | 22 ++++++++++++++++++----
> > mm/kasan/quarantine.c | 26 ++++++++++++++++++++------
> > 3 files changed, 40 insertions(+), 11 deletions(-)
> >
> > I attached here my build .config and kernel log.
> > Who could dig into it, please?
>
> I was afraid this would happen - could you try this patch series:
> https://lore.kernel.org/all/20240118110216.2539519-2-elver@xxxxxxxxxx/ [1]

In addition, could you give some additional details about the number
of CPUs in your system?
And if possible, do you have a way to measure performance besides the
obvious lagging of the system? It would be interesting to know if the
fix in [1] regains performance fully.

One major difference is still that an atomic RMW is in the fast paths.
This could be fixed by reverting
773688a6cb24b0b3c2ba40354d883348a2befa38 on top of everything else,
but we're not sure yet that's necessary because the cost of an atomic
RMW really depends on the system you're working with.