From: Oscar Salvador <osalvador@suse.de>
To: Alexander Potapenko <glider@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>,
Eric Dumazet <edumazet@google.com>,
Waiman Long <longman@redhat.com>,
Suren Baghdasaryan <surenb@google.com>,
Marco Elver <elver@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>
Subject: Re: [PATCH v4 0/3] page_owner: print stacks and their counter
Date: Mon, 24 Apr 2023 05:54:59 +0200 [thread overview]
Message-ID: <7718244879ff2b696ea9cbb744cb3805@suse.de> (raw)
In-Reply-To: <CAG_fn=UzFaHrM2X0_X=9aRPe5Wcmzj_snAbY=GJCj8__h9PxCg@mail.gmail.com>
On 2023-04-21 13:19, Alexander Potapenko wrote:
> I think the implementation of these counters is too specific to
> page_owner and is hard to use for any other purpose.
> If we decide to have them, there should be no page_owner-specific
> logic in the way we initialize/increment/decrement these counters.
Another solution would be to always increment the refcount in
__stack_depot_save,
in this case the "page-owner" specific changes are gone, and
it is more of a generic thing.
e.g: Andrey Konovalov mentioned that in a future KASAN remodelation,
he would be using a stack refcount as well.
> The thresholds in "mm,page_owner: Filter out stacks by a threshold
> counter" should also belong elsewhere.
That can certainly be cleaned up I guess to not polute non-page_owner
code.
> Given that no other stackdepot user needs these counters, maybe it
> should be cleaner to store an opaque struct along with the stack,
> passing its size to stack_depot_save(), and letting users access it
> directly using the stackdepot handler.
>
> I am also wondering if a separate hashtable mapping handlers to
> counters would solve the problem for you?
Let us see first if with the changes from above the code gets to a more
generic and clean stage, if not we can explore further options.
Thanks for your feedback Alexander!
--
Oscar Salvador
SUSE Labs
next prev parent reply other threads:[~2023-04-24 3:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 10:14 [PATCH v4 0/3] page_owner: print stacks and their counter Oscar Salvador
2023-04-21 10:14 ` [PATCH v4 1/3] lib/stackdepot: Add a refcount field in stack_record Oscar Salvador
2023-04-21 10:14 ` [PATCH v4 2/3] mm, page_owner: Add page_owner_stacks file to print out only stacks and their counte Oscar Salvador
2023-04-21 13:25 ` kernel test robot
2023-04-22 0:11 ` kernel test robot
2023-04-22 11:18 ` kernel test robot
2023-04-21 10:14 ` [PATCH v4 3/3] mm,page_owner: Filter out stacks by a threshold counter Oscar Salvador
2023-04-21 19:32 ` kernel test robot
2023-04-21 19:53 ` kernel test robot
2023-04-21 11:19 ` [PATCH v4 0/3] page_owner: print stacks and their counter Alexander Potapenko
2023-04-24 3:54 ` Oscar Salvador [this message]
2023-06-09 21:55 ` Andrew Morton
2023-06-12 9:44 ` Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7718244879ff2b696ea9cbb744cb3805@suse.de \
--to=osalvador@suse.de \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=edumazet@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=longman@redhat.com \
--cc=mhocko@suse.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.