All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xie Yongmei <yongmeixie@hotmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org
Cc: yongmeixie@hotmail.comc, Xie Yongmei <yongmeixie@hotmail.com>
Subject: [PATCH 1/3] writeback: refine trace event balance_dirty_pages
Date: Wed, 27 Apr 2022 05:32:39 -0400	[thread overview]
Message-ID: <TYYP286MB11159B3C5B4385EF013E1DDAC5FA9@TYYP286MB1115.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20220427093241.108281-1-yongmeixie@hotmail.com>

Patch set "writeback: cgroup writeback support" supports wb for
cgroups. Since then, writeback code introduces two domains to
control the dirty pages, namely global domain and cgroup domain
via pos_ratio in commit c2aa723a6093 ("writeback: implement memcg
writeback domain based throttling")

When one of domains is over freerun level of pages, it enters the
throttle code. Then it computes the position ratio for each of domains
and use the smaller one as a factor to make sure dirty rate keeping
paces with writeout speed.

Unfortunately, the trace code didn't update correspondingly. They still
use bdi as prefix to describe the part propotionally with writeout speed
(AKA feedback).

No functional change.

Signed-off-by: Xie Yongmei <yongmeixie@hotmail.com>
---
 include/trace/events/writeback.h | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 86b2a82da546..0394f425f832 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -624,8 +624,8 @@ TRACE_EVENT(balance_dirty_pages,
 		 unsigned long thresh,
 		 unsigned long bg_thresh,
 		 unsigned long dirty,
-		 unsigned long bdi_thresh,
-		 unsigned long bdi_dirty,
+		 unsigned long wb_thresh,
+		 unsigned long wb_dirty,
 		 unsigned long dirty_ratelimit,
 		 unsigned long task_ratelimit,
 		 unsigned long dirtied,
@@ -633,7 +633,7 @@ TRACE_EVENT(balance_dirty_pages,
 		 long pause,
 		 unsigned long start_time),
 
-	TP_ARGS(wb, thresh, bg_thresh, dirty, bdi_thresh, bdi_dirty,
+	TP_ARGS(wb, thresh, bg_thresh, dirty, wb_thresh, wb_dirty,
 		dirty_ratelimit, task_ratelimit,
 		dirtied, period, pause, start_time),
 
@@ -642,8 +642,8 @@ TRACE_EVENT(balance_dirty_pages,
 		__field(unsigned long,	limit)
 		__field(unsigned long,	setpoint)
 		__field(unsigned long,	dirty)
-		__field(unsigned long,	bdi_setpoint)
-		__field(unsigned long,	bdi_dirty)
+		__field(unsigned long,	wb_setpoint)
+		__field(unsigned long,	wb_dirty)
 		__field(unsigned long,	dirty_ratelimit)
 		__field(unsigned long,	task_ratelimit)
 		__field(unsigned int,	dirtied)
@@ -663,9 +663,9 @@ TRACE_EVENT(balance_dirty_pages,
 		__entry->setpoint	= (global_wb_domain.dirty_limit +
 						freerun) / 2;
 		__entry->dirty		= dirty;
-		__entry->bdi_setpoint	= __entry->setpoint *
-						bdi_thresh / (thresh + 1);
-		__entry->bdi_dirty	= bdi_dirty;
+		__entry->wb_setpoint	= __entry->setpoint *
+						wb_thresh / (thresh + 1);
+		__entry->wb_dirty	= wb_dirty;
 		__entry->dirty_ratelimit = KBps(dirty_ratelimit);
 		__entry->task_ratelimit	= KBps(task_ratelimit);
 		__entry->dirtied	= dirtied;
@@ -681,16 +681,17 @@ TRACE_EVENT(balance_dirty_pages,
 
 	TP_printk("bdi %s: "
 		  "limit=%lu setpoint=%lu dirty=%lu "
-		  "bdi_setpoint=%lu bdi_dirty=%lu "
+		  "wb_setpoint=%lu wb_dirty=%lu "
 		  "dirty_ratelimit=%lu task_ratelimit=%lu "
 		  "dirtied=%u dirtied_pause=%u "
-		  "paused=%lu pause=%ld period=%lu think=%ld cgroup_ino=%lu",
+		  "paused=%lu pause=%ld period=%lu think=%ld "
+		  "cgroup_ino=%lu",
 		  __entry->bdi,
 		  __entry->limit,
 		  __entry->setpoint,
 		  __entry->dirty,
-		  __entry->bdi_setpoint,
-		  __entry->bdi_dirty,
+		  __entry->wb_setpoint,
+		  __entry->wb_dirty,
 		  __entry->dirty_ratelimit,
 		  __entry->task_ratelimit,
 		  __entry->dirtied,
-- 
2.27.0


       reply	other threads:[~2022-04-27  9:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220427093241.108281-1-yongmeixie@hotmail.com>
2022-04-27  9:32 ` Xie Yongmei [this message]
2022-04-27  9:32 ` [PATCH 2/3] writeback: per memcg dirty flush Xie Yongmei
2022-04-27 10:35   ` Michal Hocko
2022-04-27  9:32 ` [PATCH 3/3] writeback: specify writeback period and expire interval per memcg Xie Yongmei
2022-04-27 10:36   ` Michal Hocko

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=TYYP286MB11159B3C5B4385EF013E1DDAC5FA9@TYYP286MB1115.JPNP286.PROD.OUTLOOK.COM \
    --to=yongmeixie@hotmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yongmeixie@hotmail.comc \
    /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.