[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANpmjNNuZQi4dc2eDaCZASBaHz98Qd+1663_Qhwru_5ZBAmXjg@mail.gmail.com>
Date: Thu, 15 Feb 2024 13:52:16 +0100
From: Marco Elver <elver@...gle.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Oscar Salvador <osalvador@...e.de>, Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Michal Hocko <mhocko@...e.com>, Andrey Konovalov <andreyknvl@...il.com>,
Alexander Potapenko <glider@...gle.com>
Subject: Re: [PATCH v9 3/7] mm,page_owner: Maintain own list of stack_records structs
On Thu, 15 Feb 2024 at 11:55, Vlastimil Babka <vbabka@...e.cz> wrote:
>
> On 2/14/24 18:01, Oscar Salvador wrote:
> > page_owner needs to increment a stack_record refcount when a new allocation
> > occurs, and decrement it on a free operation.
> > In order to do that, we need to have a way to get a stack_record from a
> > handle.
> > Implement __stack_depot_get_stack_record() which just does that, and make
> > it public so page_owner can use it.
> >
> > Also, traversing all stackdepot buckets comes with its own complexity,
> > plus we would have to implement a way to mark only those stack_records
> > that were originated from page_owner, as those are the ones we are
> > interested in.
> > For that reason, page_owner maintains its own list of stack_records,
> > because traversing that list is faster than traversing all buckets
> > while keeping at the same time a low complexity.
> >
> > For now, add to stack_list only the stack_records of dummy_handle and
> > failure_handle, and set their refcount of 1.
> >
> > Further patches will add code to increment or decrement stack_records
> > count on allocation and free operation.
> >
> > Signed-off-by: Oscar Salvador <osalvador@...e.de>
>
> Reviewed-by: Vlastimil Babka <vbabka@...e.cz>
>
+1
Reviewed-by: Marco Elver <elver@...gle.com>
Powered by blists - more mailing lists