Re: [PATCH v8 2/5] mm,page_owner: Implement the tracking of the stacks count

From: Oscar Salvador
Date: Tue Feb 13 2024 - 11:03:46 EST


On Tue, Feb 13, 2024 at 04:29:28PM +0100, Oscar Salvador wrote:
> I thought about giving them a refcount of 1, because we only print
> stacks which refcount > 1 anyways, but setting it to 0 has comes with
> the advantage of catching spurious increments, should someone call
> refcount_inc on those (which should not really happen).

On a second thought, I think we want a refcount of 1 for these stacks
at the beginning.
So should we e.g: re-enter page_owner, we would increment dummy_stack's
refcount. If refcount is 0, we will get a warning.



--
Oscar Salvador
SUSE Labs