All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: guro@fb.com, ktkhai@virtuozzo.com, shakeelb@google.com,
	david@fromorbit.com, hannes@cmpxchg.org, mhocko@suse.com,
	akpm@linux-foundation.org
Cc: shy828301@gmail.com, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [v4 PATCH 01/11] mm: vmscan: use nid from shrink_control for tracepoint
Date: Thu, 21 Jan 2021 15:06:11 -0800	[thread overview]
Message-ID: <20210121230621.654304-2-shy828301@gmail.com> (raw)
In-Reply-To: <20210121230621.654304-1-shy828301@gmail.com>

The tracepoint's nid should show what node the shrink happens on, the start tracepoint
uses nid from shrinkctl, but the nid might be set to 0 before end tracepoint if the
shrinker is not NUMA aware, so the traceing log may show the shrink happens on one
node but end up on the other node.  It seems confusing.  And the following patch
will remove using nid directly in do_shrink_slab(), this patch also helps cleanup
the code.

Signed-off-by: Yang Shi <shy828301@gmail.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index b1b574ad199d..b512dd5e3a1c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -535,7 +535,7 @@ static unsigned long do_shrink_slab(struct shrink_control *shrinkctl,
 	else
 		new_nr = atomic_long_read(&shrinker->nr_deferred[nid]);
 
-	trace_mm_shrink_slab_end(shrinker, nid, freed, nr, new_nr, total_scan);
+	trace_mm_shrink_slab_end(shrinker, shrinkctl->nid, freed, nr, new_nr, total_scan);
 	return freed;
 }
 
-- 
2.26.2


  reply	other threads:[~2021-01-21 23:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 23:06 [v4 PATCH 0/11] Make shrinker's nr_deferred memcg aware Yang Shi
2021-01-21 23:06 ` Yang Shi [this message]
2021-01-21 23:06 ` [v4 PATCH 02/11] mm: vmscan: consolidate shrinker_maps handling code Yang Shi
2021-01-21 23:06 ` [v4 PATCH 03/11] mm: vmscan: use shrinker_rwsem to protect shrinker_maps allocation Yang Shi
2021-01-21 23:06 ` [v4 PATCH 04/11] mm: vmscan: remove memcg_shrinker_map_size Yang Shi
2021-01-25  8:35   ` Kirill Tkhai
2021-01-25 21:06     ` Yang Shi
2021-01-25 21:06       ` Yang Shi
2021-01-21 23:06 ` [v4 PATCH 05/11] mm: memcontrol: rename shrinker_map to shrinker_info Yang Shi
2021-01-21 23:06 ` [v4 PATCH 06/11] mm: vmscan: use a new flag to indicate shrinker is registered Yang Shi
2021-01-21 23:06 ` [v4 PATCH 07/11] mm: vmscan: add per memcg shrinker nr_deferred Yang Shi
2021-01-25  9:31   ` Kirill Tkhai
2021-01-25 21:08     ` Yang Shi
2021-01-25 21:08       ` Yang Shi
2021-01-21 23:06 ` [v4 PATCH 08/11] mm: vmscan: use per memcg nr_deferred of shrinker Yang Shi
2021-01-25  9:35   ` Kirill Tkhai
2021-01-25 21:16     ` Yang Shi
2021-01-25 21:16       ` Yang Shi
2021-01-21 23:06 ` [v4 PATCH 09/11] mm: vmscan: don't need allocate shrinker->nr_deferred for memcg aware shrinkers Yang Shi
2021-01-21 23:06 ` [v4 PATCH 10/11] mm: memcontrol: reparent nr_deferred when memcg offline Yang Shi
2021-01-21 23:06 ` [v4 PATCH 11/11] mm: vmscan: shrink deferred objects proportional to priority Yang Shi

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=20210121230621.654304-2-shy828301@gmail.com \
    --to=shy828301@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@fromorbit.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=ktkhai@virtuozzo.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=shakeelb@google.com \
    /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.