Re: [PATCH] rust: alloc: Fix `ArrayLayout` allocations
From: Janne Grunau
Date: Sat Nov 23 2024 - 16:55:37 EST
On Sat, Nov 23, 2024 at 09:08:35PM +0100, Danilo Krummrich wrote:
> On Sat, Nov 23, 2024 at 07:29:38PM +0900, Asahi Lina wrote:
> > We were accidentally allocating a layout for the *square* of the object
> > size due to a variable shadowing mishap.
> >
> > Fixes memory bloat and page allocation failures in drm/asahi.
> >
> > Reported-by: Janne Grunau <j@xxxxxxxxxx>
> > Fixes: 9e7bbfa18276 ("rust: alloc: introduce `ArrayLayout`")
> > Signed-off-by: Asahi Lina <lina@xxxxxxxxxxxxx>
>
> Good catch!
>
> Acked-by: Danilo Krummrich <dakr@xxxxxxxxxx>
>
> (I'm just back from moving and just starting to catch up on what was going on
> in the last few weeks.)
>
> Is this related to the performance regression that has been observed by Andreas?
> Or did it turn out to be a false positive?
No idea. We noticed KVec allocation errors with page order 4 to 8 under
memory pressure which weren't observed with the previous allocator (or at
least not that easily).
I haven't noticed performance regressions with asahi's usage. glmark2
score was roughly at the expected value.
Janne