Re: [PATCH v10 05/14] unwind_user/deferred: Add unwind cache
From: Peter Zijlstra
Date: Thu Jun 19 2025 - 03:56:32 EST
On Wed, Jun 18, 2025 at 11:33:59AM -0400, Steven Rostedt wrote:
> On Wed, 18 Jun 2025 16:13:45 +0200
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> > > + info->cache = kzalloc(struct_size(cache, entries, UNWIND_MAX_ENTRIES),
> > > + GFP_KERNEL);
> >
> > And now you're one 'long' larger than a page. Surely that's a crap size
> > for an allocator?
>
> Bah, Ingo suggested to put the counter in the allocation and I didn't think
> about the size going over the page. Good catch!
>
> Since it can make one per task, it may be good to make this into a
> kmemcache.
Well, the trivial solution is to make it 511 and call it a day. Don't
make things complicated if you don't have to.