All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, vbabka@suse.cz, surenb@google.com,
	mhocko@suse.com, longman@redhat.com, glider@google.com,
	elver@google.com, edumazet@google.com, andreyknvl@gmail.com,
	osalvador@suse.de, akpm@linux-foundation.org
Subject: [to-be-updated] mmpage_owner-filter-out-stacks-by-a-threshold-counter.patch removed from -mm tree
Date: Mon, 12 Jun 2023 13:45:02 -0700	[thread overview]
Message-ID: <20230612204503.11BABC433D2@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: mm,page_owner: filter out stacks by a threshold counter
has been removed from the -mm tree.  Its filename was
     mmpage_owner-filter-out-stacks-by-a-threshold-counter.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Oscar Salvador <osalvador@suse.de>
Subject: mm,page_owner: filter out stacks by a threshold counter
Date: Tue, 16 May 2023 20:25:37 +0200

We want to be able to filter out the output on a threshold basis, in this
way we can get rid of a lot of noise and focus only on those stacks which
have an allegedly high counter.

We can control the threshold value by a new file called
'page_owner_threshold', which is 0 by default.

[akpm@linux-foundation.org: make page_owner_threshold_get() and page_owner_threshold_set() static]
Link: https://lkml.kernel.org/r/20230516182537.3139-4-osalvador@suse.de
Signed-off-by: Oscar Salvador <osalvador@suse.de>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Waiman Long <longman@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/stackdepot.c |    6 +++++-
 mm/page_owner.c  |   21 +++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

--- a/lib/stackdepot.c~mmpage_owner-filter-out-stacks-by-a-threshold-counter
+++ a/lib/stackdepot.c
@@ -488,6 +488,9 @@ static struct stack_record *stack_depot_
 }
 
 #ifdef CONFIG_PAGE_OWNER
+
+extern unsigned long page_owner_stack_threshold;
+
 void *stack_start(struct seq_file *m, loff_t *ppos)
 {
 	unsigned long *table = m->private;
@@ -542,7 +545,8 @@ int stack_print(struct seq_file *m, void
 	struct stack_record *stack = v;
 
 	if (stack->size <= 0 || stack->size > PAGE_SIZE ||
-	    stack->handle.valid != 1 || refcount_read(&stack->count) < 1)
+	    stack->handle.valid != 1 ||
+	    refcount_read(&stack->count) < page_owner_stack_threshold)
 		return 0;
 
 	buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
--- a/mm/page_owner.c~mmpage_owner-filter-out-stacks-by-a-threshold-counter
+++ a/mm/page_owner.c
@@ -743,6 +743,23 @@ const struct file_operations page_owner_
 	.release        = seq_release,
 };
 
+unsigned long page_owner_stack_threshold;
+
+static int page_owner_threshold_get(void *data, u64 *val)
+{
+	*val = page_owner_stack_threshold;
+	return 0;
+}
+
+static int page_owner_threshold_set(void *data, u64 val)
+{
+	page_owner_stack_threshold = val;
+	return 0;
+}
+
+DEFINE_SIMPLE_ATTRIBUTE(proc_page_owner_threshold, &page_owner_threshold_get,
+			&page_owner_threshold_set, "%llu");
+
 static int __init pageowner_init(void)
 {
 	if (!static_branch_unlikely(&page_owner_inited)) {
@@ -755,6 +772,10 @@ static int __init pageowner_init(void)
 
 	debugfs_create_file("page_owner_stacks", 0400, NULL, NULL,
 			     &page_owner_stack_operations);
+	debugfs_create_file("page_owner_threshold", 0600, NULL, NULL,
+			    &proc_page_owner_threshold);
+
+	page_owner_stack_threshold = 0;
 
 	return 0;
 }
_

Patches currently in -mm which might be from osalvador@suse.de are



                 reply	other threads:[~2023-06-12 20:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230612204503.11BABC433D2@smtp.kernel.org \
    --to=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=longman@redhat.com \
    --cc=mhocko@suse.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=osalvador@suse.de \
    --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.