[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZcaxxQE1PkepEWwf@localhost.localdomain>
Date: Sat, 10 Feb 2024 00:14:13 +0100
From: Oscar Salvador <osalvador@...e.de>
To: Marco Elver <elver@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Michal Hocko <mhocko@...e.com>,
Vlastimil Babka <vbabka@...e.cz>,
Andrey Konovalov <andreyknvl@...il.com>,
Alexander Potapenko <glider@...gle.com>
Subject: Re: [PATCH v7 3/4] mm,page_owner: Display all stacks and their count
On Fri, Feb 09, 2024 at 10:52:48PM +0100, Oscar Salvador wrote:
> Thinking about it some more, I think I made a mistake:
>
> I am walking all buckets, and within those buckets there are not only
> page_owner stack_records, which means that I could return a stack_record
> from e.g: KASAN (which I think can evict stack_records) and then
> everything goes off the rails.
> Which means I cannot walk the buckets like that.
>
> Actually, I think that having something like the following
>
> struct list_stack_records {
> struct stack_record *stack;
> struct list_stack_records *next;
> }
Or, I could use the extra_bits field from handle_parts to flag that
when a depot_stack_handle_t is used by page_owner.
Then __stack_depot_get_next_stack_record() would check whether
a stack_record->handle.extra_bits has the page_owner bit, and only
return those stacks that have such bit.
This would solve the problem of returning a potentially evictable stack
, only by returning page_owner's stack_records, and I would not have
to maintain my own list.
I yet have to see how that would look like, but sounds promising.
Do you think that is feasible Marco?
Thanks
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists