All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
@ 2022-10-18 12:19 ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel, shikemeng

This series contain a few patch to correct comment, correct trace of
vtime_rate and so on. More detail can be found in the respective
changelogs.

---
v2:
 Thanks Tejun for review and comment!
 Add Acked-by tag from Tejun.
 Correct description in patch 3/5 and 4/5.
 Drop "blk-iocost: Avoid to call current_hweight_max if iocg->inuse
== iocg->active"
 Drop "blk-iocost: Remove redundant initialization of struct ioc_gq"
 Drop "blk-iocost: Get ioc_now inside weight_updated"
---

Kemeng Shi (5):
  blk-iocost: Fix typo in comment
  blk-iocost: Reset vtime_base_rate in ioc_refresh_params
  blk-iocost: Trace vtime_base_rate instead of vtime_rate
  blk-iocost: Remove vrate member in struct ioc_now
  blk-iocost: Correct comment in blk_iocost_init

 block/blk-iocost.c            | 16 +++++++++-------
 include/trace/events/iocost.h |  4 ++--
 2 files changed, 11 insertions(+), 9 deletions(-)

-- 
2.30.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
@ 2022-10-18 12:19 ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj-DgEjT+Ai2ygdnm+yROfE0A, josef-DigfWCa+lFGyeJad7bwFQA,
	axboe-tSWWG44O7X1aa/9Udqfwiw
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-block-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	shikemeng-hv44wF8Li93QT0dZR+AlfA

This series contain a few patch to correct comment, correct trace of
vtime_rate and so on. More detail can be found in the respective
changelogs.

---
v2:
 Thanks Tejun for review and comment!
 Add Acked-by tag from Tejun.
 Correct description in patch 3/5 and 4/5.
 Drop "blk-iocost: Avoid to call current_hweight_max if iocg->inuse
== iocg->active"
 Drop "blk-iocost: Remove redundant initialization of struct ioc_gq"
 Drop "blk-iocost: Get ioc_now inside weight_updated"
---

Kemeng Shi (5):
  blk-iocost: Fix typo in comment
  blk-iocost: Reset vtime_base_rate in ioc_refresh_params
  blk-iocost: Trace vtime_base_rate instead of vtime_rate
  blk-iocost: Remove vrate member in struct ioc_now
  blk-iocost: Correct comment in blk_iocost_init

 block/blk-iocost.c            | 16 +++++++++-------
 include/trace/events/iocost.h |  4 ++--
 2 files changed, 11 insertions(+), 9 deletions(-)

-- 
2.30.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 1/5] blk-iocost: Fix typo in comment
  2022-10-18 12:19 ` Kemeng Shi
@ 2022-10-18 12:19   ` Kemeng Shi
  -1 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel, shikemeng

soley -> solely

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
 block/blk-iocost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 495396425bad..be4bc38821e2 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -111,7 +111,7 @@
  * busy signal.
  *
  * As devices can have deep queues and be unfair in how the queued commands
- * are executed, soley depending on rq wait may not result in satisfactory
+ * are executed, solely depending on rq wait may not result in satisfactory
  * control quality.  For a better control quality, completion latency QoS
  * parameters can be configured so that the device is considered saturated
  * if N'th percentile completion latency rises above the set point.
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 1/5] blk-iocost: Fix typo in comment
@ 2022-10-18 12:19   ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel, shikemeng

soley -> solely

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
 block/blk-iocost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 495396425bad..be4bc38821e2 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -111,7 +111,7 @@
  * busy signal.
  *
  * As devices can have deep queues and be unfair in how the queued commands
- * are executed, soley depending on rq wait may not result in satisfactory
+ * are executed, solely depending on rq wait may not result in satisfactory
  * control quality.  For a better control quality, completion latency QoS
  * parameters can be configured so that the device is considered saturated
  * if N'th percentile completion latency rises above the set point.
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 2/5] blk-iocost: Reset vtime_base_rate in ioc_refresh_params
@ 2022-10-18 12:19   ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel, shikemeng

Since commit ac33e91e2daca("blk-iocost: implement vtime loss compensation")
split vtime_rate into vtime_rate and vtime_base_rate, we need reset both
vtime_base_rate and vtime_rate when device parameters are refreshed.
If vtime_base_rate is no reset here, vtime_rate will be overwritten with
old vtime_base_rate soon in ioc_refresh_vrate.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
 block/blk-iocost.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index be4bc38821e2..9214733bbc14 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -906,8 +906,10 @@ static bool ioc_refresh_params(struct ioc *ioc, bool force)
 	if (idx == ioc->autop_idx && !force)
 		return false;
 
-	if (idx != ioc->autop_idx)
+	if (idx != ioc->autop_idx) {
 		atomic64_set(&ioc->vtime_rate, VTIME_PER_USEC);
+		ioc->vtime_base_rate = VTIME_PER_USEC;
+	}
 
 	ioc->autop_idx = idx;
 	ioc->autop_too_fast_at = 0;
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 2/5] blk-iocost: Reset vtime_base_rate in ioc_refresh_params
@ 2022-10-18 12:19   ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj-DgEjT+Ai2ygdnm+yROfE0A, josef-DigfWCa+lFGyeJad7bwFQA,
	axboe-tSWWG44O7X1aa/9Udqfwiw
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-block-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	shikemeng-hv44wF8Li93QT0dZR+AlfA

Since commit ac33e91e2daca("blk-iocost: implement vtime loss compensation")
split vtime_rate into vtime_rate and vtime_base_rate, we need reset both
vtime_base_rate and vtime_rate when device parameters are refreshed.
If vtime_base_rate is no reset here, vtime_rate will be overwritten with
old vtime_base_rate soon in ioc_refresh_vrate.

Signed-off-by: Kemeng Shi <shikemeng-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Acked-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 block/blk-iocost.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index be4bc38821e2..9214733bbc14 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -906,8 +906,10 @@ static bool ioc_refresh_params(struct ioc *ioc, bool force)
 	if (idx == ioc->autop_idx && !force)
 		return false;
 
-	if (idx != ioc->autop_idx)
+	if (idx != ioc->autop_idx) {
 		atomic64_set(&ioc->vtime_rate, VTIME_PER_USEC);
+		ioc->vtime_base_rate = VTIME_PER_USEC;
+	}
 
 	ioc->autop_idx = idx;
 	ioc->autop_too_fast_at = 0;
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 3/5] blk-iocost: Trace vtime_base_rate instead of vtime_rate
  2022-10-18 12:19 ` Kemeng Shi
@ 2022-10-18 12:19   ` Kemeng Shi
  -1 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel, shikemeng

Since commit ac33e91e2daca ("blk-iocost: implement vtime loss
compensation") rename original vtime_rate to vtime_base_rate
and current vtime_rate is original vtime_rate with compensation.
The current rate showed in tracepoint is mixed with vtime_rate
and vtime_base_rate:
1) In function ioc_adjust_base_vrate, the first trace_iocost_ioc_vrate_adj
shows vtime_rate, the second trace_iocost_ioc_vrate_adj shows
vtime_base_rate.
2) In function iocg_activate shows vtime_rate by calling
TRACE_IOCG_PATH(iocg_activate...
3) In function ioc_check_iocgs shows vtime_rate by calling
TRACE_IOCG_PATH(iocg_idle...

Trace vtime_base_rate instead of vtime_rate as:
1) Before commit ac33e91e2daca ("blk-iocost: implement vtime loss
compensation"), the traced rate is without compensation, so still
show rate without compensation.
2) The vtime_base_rate is more stable while vtime_rate heavily depends on
excess budeget on current period which may change abruptly in next period.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
 block/blk-iocost.c            | 2 +-
 include/trace/events/iocost.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 9214733bbc14..b0991b52e3dd 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -977,7 +977,7 @@ static void ioc_adjust_base_vrate(struct ioc *ioc, u32 rq_wait_pct,
 
 	if (!ioc->busy_level || (ioc->busy_level < 0 && nr_lagging)) {
 		if (ioc->busy_level != prev_busy_level || nr_lagging)
-			trace_iocost_ioc_vrate_adj(ioc, atomic64_read(&ioc->vtime_rate),
+			trace_iocost_ioc_vrate_adj(ioc, vrate,
 						   missed_ppm, rq_wait_pct,
 						   nr_lagging, nr_shortages);
 
diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h
index 6d1626e7a4ce..af8bfed528fc 100644
--- a/include/trace/events/iocost.h
+++ b/include/trace/events/iocost.h
@@ -38,7 +38,7 @@ DECLARE_EVENT_CLASS(iocost_iocg_state,
 		__assign_str(cgroup, path);
 		__entry->now = now->now;
 		__entry->vnow = now->vnow;
-		__entry->vrate = now->vrate;
+		__entry->vrate = iocg->ioc->vtime_base_rate;
 		__entry->last_period = last_period;
 		__entry->cur_period = cur_period;
 		__entry->vtime = vtime;
@@ -160,7 +160,7 @@ TRACE_EVENT(iocost_ioc_vrate_adj,
 
 	TP_fast_assign(
 		__assign_str(devname, ioc_name(ioc));
-		__entry->old_vrate = atomic64_read(&ioc->vtime_rate);
+		__entry->old_vrate = ioc->vtime_base_rate;
 		__entry->new_vrate = new_vrate;
 		__entry->busy_level = ioc->busy_level;
 		__entry->read_missed_ppm = missed_ppm[READ];
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 3/5] blk-iocost: Trace vtime_base_rate instead of vtime_rate
@ 2022-10-18 12:19   ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel, shikemeng

Since commit ac33e91e2daca ("blk-iocost: implement vtime loss
compensation") rename original vtime_rate to vtime_base_rate
and current vtime_rate is original vtime_rate with compensation.
The current rate showed in tracepoint is mixed with vtime_rate
and vtime_base_rate:
1) In function ioc_adjust_base_vrate, the first trace_iocost_ioc_vrate_adj
shows vtime_rate, the second trace_iocost_ioc_vrate_adj shows
vtime_base_rate.
2) In function iocg_activate shows vtime_rate by calling
TRACE_IOCG_PATH(iocg_activate...
3) In function ioc_check_iocgs shows vtime_rate by calling
TRACE_IOCG_PATH(iocg_idle...

Trace vtime_base_rate instead of vtime_rate as:
1) Before commit ac33e91e2daca ("blk-iocost: implement vtime loss
compensation"), the traced rate is without compensation, so still
show rate without compensation.
2) The vtime_base_rate is more stable while vtime_rate heavily depends on
excess budeget on current period which may change abruptly in next period.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
 block/blk-iocost.c            | 2 +-
 include/trace/events/iocost.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 9214733bbc14..b0991b52e3dd 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -977,7 +977,7 @@ static void ioc_adjust_base_vrate(struct ioc *ioc, u32 rq_wait_pct,
 
 	if (!ioc->busy_level || (ioc->busy_level < 0 && nr_lagging)) {
 		if (ioc->busy_level != prev_busy_level || nr_lagging)
-			trace_iocost_ioc_vrate_adj(ioc, atomic64_read(&ioc->vtime_rate),
+			trace_iocost_ioc_vrate_adj(ioc, vrate,
 						   missed_ppm, rq_wait_pct,
 						   nr_lagging, nr_shortages);
 
diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h
index 6d1626e7a4ce..af8bfed528fc 100644
--- a/include/trace/events/iocost.h
+++ b/include/trace/events/iocost.h
@@ -38,7 +38,7 @@ DECLARE_EVENT_CLASS(iocost_iocg_state,
 		__assign_str(cgroup, path);
 		__entry->now = now->now;
 		__entry->vnow = now->vnow;
-		__entry->vrate = now->vrate;
+		__entry->vrate = iocg->ioc->vtime_base_rate;
 		__entry->last_period = last_period;
 		__entry->cur_period = cur_period;
 		__entry->vtime = vtime;
@@ -160,7 +160,7 @@ TRACE_EVENT(iocost_ioc_vrate_adj,
 
 	TP_fast_assign(
 		__assign_str(devname, ioc_name(ioc));
-		__entry->old_vrate = atomic64_read(&ioc->vtime_rate);
+		__entry->old_vrate = ioc->vtime_base_rate;
 		__entry->new_vrate = new_vrate;
 		__entry->busy_level = ioc->busy_level;
 		__entry->read_missed_ppm = missed_ppm[READ];
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 4/5] blk-iocost: Remove vrate member in struct ioc_now
@ 2022-10-18 12:19   ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel, shikemeng

If we trace vtime_base_rate instead of vtime_rate, there is nowhere
which accesses now->vrate except function ioc_now using now->vrate locally.
Just remove it.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
 block/blk-iocost.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index b0991b52e3dd..761295ed9c5a 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -556,7 +556,6 @@ struct ioc_now {
 	u64				now_ns;
 	u64				now;
 	u64				vnow;
-	u64				vrate;
 };
 
 struct iocg_wait {
@@ -1020,10 +1019,11 @@ static void ioc_adjust_base_vrate(struct ioc *ioc, u32 rq_wait_pct,
 static void ioc_now(struct ioc *ioc, struct ioc_now *now)
 {
 	unsigned seq;
+	u64 vrate;
 
 	now->now_ns = ktime_get();
 	now->now = ktime_to_us(now->now_ns);
-	now->vrate = atomic64_read(&ioc->vtime_rate);
+	vrate = atomic64_read(&ioc->vtime_rate);
 
 	/*
 	 * The current vtime is
@@ -1036,7 +1036,7 @@ static void ioc_now(struct ioc *ioc, struct ioc_now *now)
 	do {
 		seq = read_seqcount_begin(&ioc->period_seqcount);
 		now->vnow = ioc->period_at_vtime +
-			(now->now - ioc->period_at) * now->vrate;
+			(now->now - ioc->period_at) * vrate;
 	} while (read_seqcount_retry(&ioc->period_seqcount, seq));
 }
 
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 4/5] blk-iocost: Remove vrate member in struct ioc_now
@ 2022-10-18 12:19   ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj-DgEjT+Ai2ygdnm+yROfE0A, josef-DigfWCa+lFGyeJad7bwFQA,
	axboe-tSWWG44O7X1aa/9Udqfwiw
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-block-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	shikemeng-hv44wF8Li93QT0dZR+AlfA

If we trace vtime_base_rate instead of vtime_rate, there is nowhere
which accesses now->vrate except function ioc_now using now->vrate locally.
Just remove it.

Signed-off-by: Kemeng Shi <shikemeng-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Acked-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 block/blk-iocost.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index b0991b52e3dd..761295ed9c5a 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -556,7 +556,6 @@ struct ioc_now {
 	u64				now_ns;
 	u64				now;
 	u64				vnow;
-	u64				vrate;
 };
 
 struct iocg_wait {
@@ -1020,10 +1019,11 @@ static void ioc_adjust_base_vrate(struct ioc *ioc, u32 rq_wait_pct,
 static void ioc_now(struct ioc *ioc, struct ioc_now *now)
 {
 	unsigned seq;
+	u64 vrate;
 
 	now->now_ns = ktime_get();
 	now->now = ktime_to_us(now->now_ns);
-	now->vrate = atomic64_read(&ioc->vtime_rate);
+	vrate = atomic64_read(&ioc->vtime_rate);
 
 	/*
 	 * The current vtime is
@@ -1036,7 +1036,7 @@ static void ioc_now(struct ioc *ioc, struct ioc_now *now)
 	do {
 		seq = read_seqcount_begin(&ioc->period_seqcount);
 		now->vnow = ioc->period_at_vtime +
-			(now->now - ioc->period_at) * now->vrate;
+			(now->now - ioc->period_at) * vrate;
 	} while (read_seqcount_retry(&ioc->period_seqcount, seq));
 }
 
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 5/5] blk-iocost: Correct comment in blk_iocost_init
  2022-10-18 12:19 ` Kemeng Shi
@ 2022-10-18 12:19   ` Kemeng Shi
  -1 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel, shikemeng

There is no iocg_pd_init function. The pd_alloc_fn function pointer of
iocost policy is set with ioc_pd_init. Just correct it.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
 block/blk-iocost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 761295ed9c5a..96c1571a8a1d 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -2880,7 +2880,7 @@ static int blk_iocost_init(struct gendisk *disk)
 	spin_unlock_irq(&ioc->lock);
 
 	/*
-	 * rqos must be added before activation to allow iocg_pd_init() to
+	 * rqos must be added before activation to allow ioc_pd_init() to
 	 * lookup the ioc from q. This means that the rqos methods may get
 	 * called before policy activation completion, can't assume that the
 	 * target bio has an iocg associated and need to test for NULL iocg.
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 5/5] blk-iocost: Correct comment in blk_iocost_init
@ 2022-10-18 12:19   ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-10-18 12:19 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel, shikemeng

There is no iocg_pd_init function. The pd_alloc_fn function pointer of
iocost policy is set with ioc_pd_init. Just correct it.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
 block/blk-iocost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 761295ed9c5a..96c1571a8a1d 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -2880,7 +2880,7 @@ static int blk_iocost_init(struct gendisk *disk)
 	spin_unlock_irq(&ioc->lock);
 
 	/*
-	 * rqos must be added before activation to allow iocg_pd_init() to
+	 * rqos must be added before activation to allow ioc_pd_init() to
 	 * lookup the ioc from q. This means that the rqos methods may get
 	 * called before policy activation completion, can't assume that the
 	 * target bio has an iocg associated and need to test for NULL iocg.
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
  2022-10-18 12:19 ` Kemeng Shi
@ 2022-11-23  6:09   ` Kemeng Shi
  -1 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-11-23  6:09 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel

Friendly ping

on 10/18/2022 8:19 PM, Kemeng Shi wrote:
> This series contain a few patch to correct comment, correct trace of
> vtime_rate and so on. More detail can be found in the respective
> changelogs.
> 
> ---
> v2:
>  Thanks Tejun for review and comment!
>  Add Acked-by tag from Tejun.
>  Correct description in patch 3/5 and 4/5.
>  Drop "blk-iocost: Avoid to call current_hweight_max if iocg->inuse
> == iocg->active"
>  Drop "blk-iocost: Remove redundant initialization of struct ioc_gq"
>  Drop "blk-iocost: Get ioc_now inside weight_updated"
> ---
> 
> Kemeng Shi (5):
>   blk-iocost: Fix typo in comment
>   blk-iocost: Reset vtime_base_rate in ioc_refresh_params
>   blk-iocost: Trace vtime_base_rate instead of vtime_rate
>   blk-iocost: Remove vrate member in struct ioc_now
>   blk-iocost: Correct comment in blk_iocost_init
> 
>  block/blk-iocost.c            | 16 +++++++++-------
>  include/trace/events/iocost.h |  4 ++--
>  2 files changed, 11 insertions(+), 9 deletions(-)
> 

-- 
Best wishes
Kemeng Shi

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
@ 2022-11-23  6:09   ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-11-23  6:09 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel

Friendly ping

on 10/18/2022 8:19 PM, Kemeng Shi wrote:
> This series contain a few patch to correct comment, correct trace of
> vtime_rate and so on. More detail can be found in the respective
> changelogs.
> 
> ---
> v2:
>  Thanks Tejun for review and comment!
>  Add Acked-by tag from Tejun.
>  Correct description in patch 3/5 and 4/5.
>  Drop "blk-iocost: Avoid to call current_hweight_max if iocg->inuse
> == iocg->active"
>  Drop "blk-iocost: Remove redundant initialization of struct ioc_gq"
>  Drop "blk-iocost: Get ioc_now inside weight_updated"
> ---
> 
> Kemeng Shi (5):
>   blk-iocost: Fix typo in comment
>   blk-iocost: Reset vtime_base_rate in ioc_refresh_params
>   blk-iocost: Trace vtime_base_rate instead of vtime_rate
>   blk-iocost: Remove vrate member in struct ioc_now
>   blk-iocost: Correct comment in blk_iocost_init
> 
>  block/blk-iocost.c            | 16 +++++++++-------
>  include/trace/events/iocost.h |  4 ++--
>  2 files changed, 11 insertions(+), 9 deletions(-)
> 

-- 
Best wishes
Kemeng Shi

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
  2022-10-18 12:19 ` Kemeng Shi
                   ` (6 preceding siblings ...)
  (?)
@ 2022-12-01  1:45 ` Kemeng Shi
  2022-12-01  1:46   ` Jens Axboe
  -1 siblings, 1 reply; 22+ messages in thread
From: Kemeng Shi @ 2022-12-01  1:45 UTC (permalink / raw)
  To: tj, josef, axboe; +Cc: cgroups, linux-block, linux-kernel


Hi jens,
on 10/18/2022 8:19 PM, Kemeng Shi wrote:
> This series contain a few patch to correct comment, correct trace of
> vtime_rate and so on. More detail can be found in the respective
> changelogs.
> 
> ---
> v2:
>  Thanks Tejun for review and comment!
>  Add Acked-by tag from Tejun.
>  Correct description in patch 3/5 and 4/5.
>  Drop "blk-iocost: Avoid to call current_hweight_max if iocg->inuse
> == iocg->active"
>  Drop "blk-iocost: Remove redundant initialization of struct ioc_gq"
>  Drop "blk-iocost: Get ioc_now inside weight_updated"
> ---
> 
> Kemeng Shi (5):
>   blk-iocost: Fix typo in comment
>   blk-iocost: Reset vtime_base_rate in ioc_refresh_params
>   blk-iocost: Trace vtime_base_rate instead of vtime_rate
>   blk-iocost: Remove vrate member in struct ioc_now
>   blk-iocost: Correct comment in blk_iocost_init
> 
>  block/blk-iocost.c            | 16 +++++++++-------
>  include/trace/events/iocost.h |  4 ++--
>  2 files changed, 11 insertions(+), 9 deletions(-)
Could you apply this patchset?
By the way, my apply for an cloud variant of email was just passed
a few days ago. Is this mail still in spam?

Thanks.
-- 
Best wishes
Kemeng Shi


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
  2022-12-01  1:45 ` Kemeng Shi
@ 2022-12-01  1:46   ` Jens Axboe
  2022-12-01  2:20       ` Kemeng Shi
  0 siblings, 1 reply; 22+ messages in thread
From: Jens Axboe @ 2022-12-01  1:46 UTC (permalink / raw)
  To: Kemeng Shi, tj, josef; +Cc: cgroups, linux-block, linux-kernel

On 11/30/22 6:45?PM, Kemeng Shi wrote:
> 
> Hi jens,
> on 10/18/2022 8:19 PM, Kemeng Shi wrote:
>> This series contain a few patch to correct comment, correct trace of
>> vtime_rate and so on. More detail can be found in the respective
>> changelogs.
>>
>> ---
>> v2:
>>  Thanks Tejun for review and comment!
>>  Add Acked-by tag from Tejun.
>>  Correct description in patch 3/5 and 4/5.
>>  Drop "blk-iocost: Avoid to call current_hweight_max if iocg->inuse
>> == iocg->active"
>>  Drop "blk-iocost: Remove redundant initialization of struct ioc_gq"
>>  Drop "blk-iocost: Get ioc_now inside weight_updated"
>> ---
>>
>> Kemeng Shi (5):
>>   blk-iocost: Fix typo in comment
>>   blk-iocost: Reset vtime_base_rate in ioc_refresh_params
>>   blk-iocost: Trace vtime_base_rate instead of vtime_rate
>>   blk-iocost: Remove vrate member in struct ioc_now
>>   blk-iocost: Correct comment in blk_iocost_init
>>
>>  block/blk-iocost.c            | 16 +++++++++-------
>>  include/trace/events/iocost.h |  4 ++--
>>  2 files changed, 11 insertions(+), 9 deletions(-)
> Could you apply this patchset?
> By the way, my apply for an cloud variant of email was just passed
> a few days ago. Is this mail still in spam?

This one wasn't, but I've seen the huaweicloud.com emails fail
the same origination checks in the past.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
@ 2022-12-01  1:47   ` Jens Axboe
  0 siblings, 0 replies; 22+ messages in thread
From: Jens Axboe @ 2022-12-01  1:47 UTC (permalink / raw)
  To: josef, Kemeng Shi, tj; +Cc: linux-kernel, linux-block, cgroups

On Tue, 18 Oct 2022 20:19:27 +0800, Kemeng Shi wrote:
> This series contain a few patch to correct comment, correct trace of
> vtime_rate and so on. More detail can be found in the respective
> changelogs.
> 

Applied, thanks!

[1/5] blk-iocost: Fix typo in comment
      commit: e12d34fce7652a870fac62e9749a6623883d6fd8
[2/5] blk-iocost: Reset vtime_base_rate in ioc_refresh_params
      commit: c81d97a61c8c3c25a576c3db4c4dd34316256f05
[3/5] blk-iocost: Trace vtime_base_rate instead of vtime_rate
      commit: 0c0d362dc97d19d898219c13a357e167a9ee77ee
[4/5] blk-iocost: Remove vrate member in struct ioc_now
      commit: f44ed8722034ef7d214fa121ae2402100a3590e1
[5/5] blk-iocost: Correct comment in blk_iocost_init
      commit: b4c0482bfe89cd6c4f030314c86aae35642c44a5

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
@ 2022-12-01  1:47   ` Jens Axboe
  0 siblings, 0 replies; 22+ messages in thread
From: Jens Axboe @ 2022-12-01  1:47 UTC (permalink / raw)
  To: josef-DigfWCa+lFGyeJad7bwFQA, Kemeng Shi, tj-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-block-u79uwXL29TY76Z2rM5mHXA,
	cgroups-u79uwXL29TY76Z2rM5mHXA

On Tue, 18 Oct 2022 20:19:27 +0800, Kemeng Shi wrote:
> This series contain a few patch to correct comment, correct trace of
> vtime_rate and so on. More detail can be found in the respective
> changelogs.
> 

Applied, thanks!

[1/5] blk-iocost: Fix typo in comment
      commit: e12d34fce7652a870fac62e9749a6623883d6fd8
[2/5] blk-iocost: Reset vtime_base_rate in ioc_refresh_params
      commit: c81d97a61c8c3c25a576c3db4c4dd34316256f05
[3/5] blk-iocost: Trace vtime_base_rate instead of vtime_rate
      commit: 0c0d362dc97d19d898219c13a357e167a9ee77ee
[4/5] blk-iocost: Remove vrate member in struct ioc_now
      commit: f44ed8722034ef7d214fa121ae2402100a3590e1
[5/5] blk-iocost: Correct comment in blk_iocost_init
      commit: b4c0482bfe89cd6c4f030314c86aae35642c44a5

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
@ 2022-12-01  2:20       ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-12-01  2:20 UTC (permalink / raw)
  To: Jens Axboe, tj, josef; +Cc: cgroups, linux-block, linux-kernel



on 12/1/2022 9:46 AM, Jens Axboe wrote:
> On 11/30/22 6:45?PM, Kemeng Shi wrote:
>>
>> Hi jens,
>> on 10/18/2022 8:19 PM, Kemeng Shi wrote:
>>> This series contain a few patch to correct comment, correct trace of
>>> vtime_rate and so on. More detail can be found in the respective
>>> changelogs.
>>>
>>> ---
>>> v2:
>>>  Thanks Tejun for review and comment!
>>>  Add Acked-by tag from Tejun.
>>>  Correct description in patch 3/5 and 4/5.
>>>  Drop "blk-iocost: Avoid to call current_hweight_max if iocg->inuse
>>> == iocg->active"
>>>  Drop "blk-iocost: Remove redundant initialization of struct ioc_gq"
>>>  Drop "blk-iocost: Get ioc_now inside weight_updated"
>>> ---
>>>
>>> Kemeng Shi (5):
>>>   blk-iocost: Fix typo in comment
>>>   blk-iocost: Reset vtime_base_rate in ioc_refresh_params
>>>   blk-iocost: Trace vtime_base_rate instead of vtime_rate
>>>   blk-iocost: Remove vrate member in struct ioc_now
>>>   blk-iocost: Correct comment in blk_iocost_init
>>>
>>>  block/blk-iocost.c            | 16 +++++++++-------
>>>  include/trace/events/iocost.h |  4 ++--
>>>  2 files changed, 11 insertions(+), 9 deletions(-)
>> Could you apply this patchset?
>> By the way, my apply for an cloud variant of email was just passed
>> a few days ago. Is this mail still in spam?
> 
> This one wasn't, but I've seen the huaweicloud.com emails fail
> the same origination checks in the past.
I'm not sure if was there any fix to huaweicloud.com email. I will
use this huaweicloud emails to minimize the trouble before any
better solution is found. Sorry for the inconvenience.

-- 
Best wishes
Kemeng Shi


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
@ 2022-12-01  2:20       ` Kemeng Shi
  0 siblings, 0 replies; 22+ messages in thread
From: Kemeng Shi @ 2022-12-01  2:20 UTC (permalink / raw)
  To: Jens Axboe, tj-DgEjT+Ai2ygdnm+yROfE0A, josef-DigfWCa+lFGyeJad7bwFQA
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-block-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA



on 12/1/2022 9:46 AM, Jens Axboe wrote:
> On 11/30/22 6:45?PM, Kemeng Shi wrote:
>>
>> Hi jens,
>> on 10/18/2022 8:19 PM, Kemeng Shi wrote:
>>> This series contain a few patch to correct comment, correct trace of
>>> vtime_rate and so on. More detail can be found in the respective
>>> changelogs.
>>>
>>> ---
>>> v2:
>>>  Thanks Tejun for review and comment!
>>>  Add Acked-by tag from Tejun.
>>>  Correct description in patch 3/5 and 4/5.
>>>  Drop "blk-iocost: Avoid to call current_hweight_max if iocg->inuse
>>> == iocg->active"
>>>  Drop "blk-iocost: Remove redundant initialization of struct ioc_gq"
>>>  Drop "blk-iocost: Get ioc_now inside weight_updated"
>>> ---
>>>
>>> Kemeng Shi (5):
>>>   blk-iocost: Fix typo in comment
>>>   blk-iocost: Reset vtime_base_rate in ioc_refresh_params
>>>   blk-iocost: Trace vtime_base_rate instead of vtime_rate
>>>   blk-iocost: Remove vrate member in struct ioc_now
>>>   blk-iocost: Correct comment in blk_iocost_init
>>>
>>>  block/blk-iocost.c            | 16 +++++++++-------
>>>  include/trace/events/iocost.h |  4 ++--
>>>  2 files changed, 11 insertions(+), 9 deletions(-)
>> Could you apply this patchset?
>> By the way, my apply for an cloud variant of email was just passed
>> a few days ago. Is this mail still in spam?
> 
> This one wasn't, but I've seen the huaweicloud.com emails fail
> the same origination checks in the past.
I'm not sure if was there any fix to huaweicloud.com email. I will
use this huaweicloud emails to minimize the trouble before any
better solution is found. Sorry for the inconvenience.

-- 
Best wishes
Kemeng Shi


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
  2022-12-01  2:20       ` Kemeng Shi
@ 2022-12-01  2:28         ` Jens Axboe
  -1 siblings, 0 replies; 22+ messages in thread
From: Jens Axboe @ 2022-12-01  2:28 UTC (permalink / raw)
  To: Kemeng Shi, tj, josef; +Cc: cgroups, linux-block, linux-kernel

On 11/30/22 7:20 PM, Kemeng Shi wrote:
> 
> 
> on 12/1/2022 9:46 AM, Jens Axboe wrote:
>> On 11/30/22 6:45?PM, Kemeng Shi wrote:
>>>
>>> Hi jens,
>>> on 10/18/2022 8:19 PM, Kemeng Shi wrote:
>>>> This series contain a few patch to correct comment, correct trace of
>>>> vtime_rate and so on. More detail can be found in the respective
>>>> changelogs.
>>>>
>>>> ---
>>>> v2:
>>>>  Thanks Tejun for review and comment!
>>>>  Add Acked-by tag from Tejun.
>>>>  Correct description in patch 3/5 and 4/5.
>>>>  Drop "blk-iocost: Avoid to call current_hweight_max if iocg->inuse
>>>> == iocg->active"
>>>>  Drop "blk-iocost: Remove redundant initialization of struct ioc_gq"
>>>>  Drop "blk-iocost: Get ioc_now inside weight_updated"
>>>> ---
>>>>
>>>> Kemeng Shi (5):
>>>>   blk-iocost: Fix typo in comment
>>>>   blk-iocost: Reset vtime_base_rate in ioc_refresh_params
>>>>   blk-iocost: Trace vtime_base_rate instead of vtime_rate
>>>>   blk-iocost: Remove vrate member in struct ioc_now
>>>>   blk-iocost: Correct comment in blk_iocost_init
>>>>
>>>>  block/blk-iocost.c            | 16 +++++++++-------
>>>>  include/trace/events/iocost.h |  4 ++--
>>>>  2 files changed, 11 insertions(+), 9 deletions(-)
>>> Could you apply this patchset?
>>> By the way, my apply for an cloud variant of email was just passed
>>> a few days ago. Is this mail still in spam?
>>
>> This one wasn't, but I've seen the huaweicloud.com emails fail
>> the same origination checks in the past.
> I'm not sure if was there any fix to huaweicloud.com email. I will
> use this huaweicloud emails to minimize the trouble before any
> better solution is found. Sorry for the inconvenience.

Thanks, I'll let you know if I run into issues with the cloud
email.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost
@ 2022-12-01  2:28         ` Jens Axboe
  0 siblings, 0 replies; 22+ messages in thread
From: Jens Axboe @ 2022-12-01  2:28 UTC (permalink / raw)
  To: Kemeng Shi, tj, josef; +Cc: cgroups, linux-block, linux-kernel

On 11/30/22 7:20 PM, Kemeng Shi wrote:
> 
> 
> on 12/1/2022 9:46 AM, Jens Axboe wrote:
>> On 11/30/22 6:45?PM, Kemeng Shi wrote:
>>>
>>> Hi jens,
>>> on 10/18/2022 8:19 PM, Kemeng Shi wrote:
>>>> This series contain a few patch to correct comment, correct trace of
>>>> vtime_rate and so on. More detail can be found in the respective
>>>> changelogs.
>>>>
>>>> ---
>>>> v2:
>>>>  Thanks Tejun for review and comment!
>>>>  Add Acked-by tag from Tejun.
>>>>  Correct description in patch 3/5 and 4/5.
>>>>  Drop "blk-iocost: Avoid to call current_hweight_max if iocg->inuse
>>>> == iocg->active"
>>>>  Drop "blk-iocost: Remove redundant initialization of struct ioc_gq"
>>>>  Drop "blk-iocost: Get ioc_now inside weight_updated"
>>>> ---
>>>>
>>>> Kemeng Shi (5):
>>>>   blk-iocost: Fix typo in comment
>>>>   blk-iocost: Reset vtime_base_rate in ioc_refresh_params
>>>>   blk-iocost: Trace vtime_base_rate instead of vtime_rate
>>>>   blk-iocost: Remove vrate member in struct ioc_now
>>>>   blk-iocost: Correct comment in blk_iocost_init
>>>>
>>>>  block/blk-iocost.c            | 16 +++++++++-------
>>>>  include/trace/events/iocost.h |  4 ++--
>>>>  2 files changed, 11 insertions(+), 9 deletions(-)
>>> Could you apply this patchset?
>>> By the way, my apply for an cloud variant of email was just passed
>>> a few days ago. Is this mail still in spam?
>>
>> This one wasn't, but I've seen the huaweicloud.com emails fail
>> the same origination checks in the past.
> I'm not sure if was there any fix to huaweicloud.com email. I will
> use this huaweicloud emails to minimize the trouble before any
> better solution is found. Sorry for the inconvenience.

Thanks, I'll let you know if I run into issues with the cloud
email.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-12-01  2:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18 12:19 [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost Kemeng Shi
2022-10-18 12:19 ` Kemeng Shi
2022-10-18 12:19 ` [PATCH v2 1/5] blk-iocost: Fix typo in comment Kemeng Shi
2022-10-18 12:19   ` Kemeng Shi
2022-10-18 12:19 ` [PATCH v2 2/5] blk-iocost: Reset vtime_base_rate in ioc_refresh_params Kemeng Shi
2022-10-18 12:19   ` Kemeng Shi
2022-10-18 12:19 ` [PATCH v2 3/5] blk-iocost: Trace vtime_base_rate instead of vtime_rate Kemeng Shi
2022-10-18 12:19   ` Kemeng Shi
2022-10-18 12:19 ` [PATCH v2 4/5] blk-iocost: Remove vrate member in struct ioc_now Kemeng Shi
2022-10-18 12:19   ` Kemeng Shi
2022-10-18 12:19 ` [PATCH v2 5/5] blk-iocost: Correct comment in blk_iocost_init Kemeng Shi
2022-10-18 12:19   ` Kemeng Shi
2022-11-23  6:09 ` [PATCH v2 0/5] A few cleanup and bugfix patches for blk-iocost Kemeng Shi
2022-11-23  6:09   ` Kemeng Shi
2022-12-01  1:45 ` Kemeng Shi
2022-12-01  1:46   ` Jens Axboe
2022-12-01  2:20     ` Kemeng Shi
2022-12-01  2:20       ` Kemeng Shi
2022-12-01  2:28       ` Jens Axboe
2022-12-01  2:28         ` Jens Axboe
2022-12-01  1:47 ` Jens Axboe
2022-12-01  1:47   ` Jens Axboe

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.