* [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests
@ 2021-10-29 9:40 Li Zhijian
2021-10-29 9:40 ` [PATCH 1/6] refscale: add missing '\n' to flush message out Li Zhijian
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Li Zhijian @ 2021-10-29 9:40 UTC (permalink / raw)
To: dave, joel, josh, mathieu.desnoyers, paulmck, rostedt, rcu
Cc: philip.li, lizhijian, jiangshanlai, linux-kernel, Li Zhijian
- we added '\n' to the macros directly like what torture does, see
include/linux/torture.h
- SCFTORTOUT is unused any more, remove it
- follow up https://lkml.org/lkml/2021/10/24/439, covert all other residuals
Li Zhijian (6):
refscale: add missing '\n' to flush message out
scftorture: add missing '\n' to flush message out
scftorture: Remove unused SCFTORTOUT
scftorture: always log error message
rcuscale: alwaly log error message
locktorture,rcutorture,torture: always log error message
include/linux/torture.h | 9 ++-------
kernel/locking/locktorture.c | 4 ++--
kernel/rcu/rcuscale.c | 14 +++++++-------
kernel/rcu/rcutorture.c | 8 ++++----
kernel/rcu/refscale.c | 11 +++++++----
kernel/scftorture.c | 16 ++++++----------
kernel/torture.c | 4 ++--
7 files changed, 30 insertions(+), 36 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/6] refscale: add missing '\n' to flush message out
2021-10-29 9:40 [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Li Zhijian
@ 2021-10-29 9:40 ` Li Zhijian
2021-10-29 9:40 ` [PATCH 2/6] scftorture: " Li Zhijian
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Li Zhijian @ 2021-10-29 9:40 UTC (permalink / raw)
To: dave, joel, josh, mathieu.desnoyers, paulmck, rostedt, rcu
Cc: philip.li, lizhijian, jiangshanlai, linux-kernel, Li Zhijian
add '\n' to macros directly like what torture does to flush message
for each calls
Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
---
kernel/rcu/refscale.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
index f055d168365a..ffe9e44c886c 100644
--- a/kernel/rcu/refscale.c
+++ b/kernel/rcu/refscale.c
@@ -44,7 +44,10 @@
pr_alert("%s" SCALE_FLAG s, scale_type, ## x)
#define VERBOSE_SCALEOUT(s, x...) \
- do { if (verbose) pr_alert("%s" SCALE_FLAG s, scale_type, ## x); } while (0)
+ do { \
+ if (verbose) \
+ pr_alert("%s" SCALE_FLAG s "\n", scale_type, ## x); \
+ } while (0)
static atomic_t verbose_batch_ctr;
@@ -54,12 +57,12 @@ do { \
(verbose_batched <= 0 || \
!(atomic_inc_return(&verbose_batch_ctr) % verbose_batched))) { \
schedule_timeout_uninterruptible(1); \
- pr_alert("%s" SCALE_FLAG s, scale_type, ## x); \
+ pr_alert("%s" SCALE_FLAG s "\n", scale_type, ## x); \
} \
} while (0)
#define SCALEOUT_ERRSTRING(s, x...) \
- do { pr_alert("%s" SCALE_FLAG "!!! " s, scale_type, ## x); } while (0)
+ do { pr_alert("%s" SCALE_FLAG "!!! " s "\n", scale_type, ## x); } while (0)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Joel Fernandes (Google) <joel@joelfernandes.org>");
@@ -842,7 +845,7 @@ ref_scale_init(void)
goto unwind;
}
- VERBOSE_SCALEOUT("Starting %d reader threads\n", nreaders);
+ VERBOSE_SCALEOUT("Starting %d reader threads", nreaders);
for (i = 0; i < nreaders; i++) {
firsterr = torture_create_kthread(ref_scale_reader, (void *)i,
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/6] scftorture: add missing '\n' to flush message out
2021-10-29 9:40 [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Li Zhijian
2021-10-29 9:40 ` [PATCH 1/6] refscale: add missing '\n' to flush message out Li Zhijian
@ 2021-10-29 9:40 ` Li Zhijian
2021-10-29 9:40 ` [PATCH 3/6] scftorture: remove unused SCFTORTOUT Li Zhijian
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Li Zhijian @ 2021-10-29 9:40 UTC (permalink / raw)
To: dave, joel, josh, mathieu.desnoyers, paulmck, rostedt, rcu
Cc: philip.li, lizhijian, jiangshanlai, linux-kernel, Li Zhijian
add '\n' to macros directly like what torture does to flush message
for each calls
Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
---
kernel/scftorture.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/scftorture.c b/kernel/scftorture.c
index 64a08288b1a6..f60a7a240f91 100644
--- a/kernel/scftorture.c
+++ b/kernel/scftorture.c
@@ -42,10 +42,10 @@
pr_alert(SCFTORT_FLAG s, ## x)
#define VERBOSE_SCFTORTOUT(s, x...) \
- do { if (verbose) pr_alert(SCFTORT_FLAG s, ## x); } while (0)
+ do { if (verbose) pr_alert(SCFTORT_FLAG s "\n", ## x); } while (0)
#define VERBOSE_SCFTORTOUT_ERRSTRING(s, x...) \
- do { if (verbose) pr_alert(SCFTORT_FLAG "!!! " s, ## x); } while (0)
+ do { if (verbose) pr_alert(SCFTORT_FLAG "!!! " s "\n", ## x); } while (0)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Paul E. McKenney <paulmck@kernel.org>");
@@ -629,7 +629,7 @@ static int __init scf_torture_init(void)
goto unwind;
}
- VERBOSE_SCFTORTOUT("Starting %d smp_call_function() threads\n", nthreads);
+ VERBOSE_SCFTORTOUT("Starting %d smp_call_function() threads", nthreads);
atomic_set(&n_started, nthreads);
for (i = 0; i < nthreads; i++) {
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/6] scftorture: remove unused SCFTORTOUT
2021-10-29 9:40 [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Li Zhijian
2021-10-29 9:40 ` [PATCH 1/6] refscale: add missing '\n' to flush message out Li Zhijian
2021-10-29 9:40 ` [PATCH 2/6] scftorture: " Li Zhijian
@ 2021-10-29 9:40 ` Li Zhijian
2021-10-29 9:40 ` [PATCH 4/6] scftorture: always log error message Li Zhijian
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Li Zhijian @ 2021-10-29 9:40 UTC (permalink / raw)
To: dave, joel, josh, mathieu.desnoyers, paulmck, rostedt, rcu
Cc: philip.li, lizhijian, jiangshanlai, linux-kernel, Li Zhijian
no one refers to it any more.
Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
---
kernel/scftorture.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kernel/scftorture.c b/kernel/scftorture.c
index f60a7a240f91..5fb15492999b 100644
--- a/kernel/scftorture.c
+++ b/kernel/scftorture.c
@@ -38,9 +38,6 @@
#define SCFTORT_STRING "scftorture"
#define SCFTORT_FLAG SCFTORT_STRING ": "
-#define SCFTORTOUT(s, x...) \
- pr_alert(SCFTORT_FLAG s, ## x)
-
#define VERBOSE_SCFTORTOUT(s, x...) \
do { if (verbose) pr_alert(SCFTORT_FLAG s "\n", ## x); } while (0)
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/6] scftorture: always log error message
2021-10-29 9:40 [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Li Zhijian
` (2 preceding siblings ...)
2021-10-29 9:40 ` [PATCH 3/6] scftorture: remove unused SCFTORTOUT Li Zhijian
@ 2021-10-29 9:40 ` Li Zhijian
2021-11-02 16:06 ` Paul E. McKenney
2021-10-29 9:40 ` [PATCH 5/6] rcuscale: alwaly " Li Zhijian
` (2 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Li Zhijian @ 2021-10-29 9:40 UTC (permalink / raw)
To: dave, joel, josh, mathieu.desnoyers, paulmck, rostedt, rcu
Cc: philip.li, lizhijian, jiangshanlai, linux-kernel, Li Zhijian
Generally, error message should be logged anyhow.
Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
---
kernel/scftorture.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/kernel/scftorture.c b/kernel/scftorture.c
index 5fb15492999b..8ef7888d78cc 100644
--- a/kernel/scftorture.c
+++ b/kernel/scftorture.c
@@ -41,8 +41,7 @@
#define VERBOSE_SCFTORTOUT(s, x...) \
do { if (verbose) pr_alert(SCFTORT_FLAG s "\n", ## x); } while (0)
-#define VERBOSE_SCFTORTOUT_ERRSTRING(s, x...) \
- do { if (verbose) pr_alert(SCFTORT_FLAG "!!! " s "\n", ## x); } while (0)
+#define SCFTORTOUT_ERRSTRING(s, x...) pr_alert(SCFTORT_FLAG "!!! " s "\n", ## x)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Paul E. McKenney <paulmck@kernel.org>");
@@ -583,14 +582,14 @@ static int __init scf_torture_init(void)
if (weight_single1 == 0 && weight_single_rpc1 == 0 && weight_single_wait1 == 0 &&
weight_many1 == 0 && weight_many_wait1 == 0 &&
weight_all1 == 0 && weight_all_wait1 == 0) {
- VERBOSE_SCFTORTOUT_ERRSTRING("all zero weights makes no sense");
+ SCFTORTOUT_ERRSTRING("all zero weights makes no sense");
firsterr = -EINVAL;
goto unwind;
}
if (IS_BUILTIN(CONFIG_SCF_TORTURE_TEST))
scf_sel_add(weight_resched1, SCF_PRIM_RESCHED, false);
else if (weight_resched1)
- VERBOSE_SCFTORTOUT_ERRSTRING("built as module, weight_resched ignored");
+ SCFTORTOUT_ERRSTRING("built as module, weight_resched ignored");
scf_sel_add(weight_single1, SCF_PRIM_SINGLE, false);
scf_sel_add(weight_single_rpc1, SCF_PRIM_SINGLE_RPC, true);
scf_sel_add(weight_single_wait1, SCF_PRIM_SINGLE, true);
@@ -621,7 +620,7 @@ static int __init scf_torture_init(void)
nthreads = num_online_cpus();
scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL);
if (!scf_stats_p) {
- VERBOSE_SCFTORTOUT_ERRSTRING("out of memory");
+ SCFTORTOUT_ERRSTRING("out of memory");
firsterr = -ENOMEM;
goto unwind;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/6] rcuscale: alwaly log error message
2021-10-29 9:40 [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Li Zhijian
` (3 preceding siblings ...)
2021-10-29 9:40 ` [PATCH 4/6] scftorture: always log error message Li Zhijian
@ 2021-10-29 9:40 ` Li Zhijian
2021-10-29 16:40 ` Davidlohr Bueso
2021-11-02 16:09 ` Paul E. McKenney
2021-10-29 9:40 ` [PATCH 6/6] locktorture,rcutorture,torture: always " Li Zhijian
2021-10-29 16:41 ` [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Davidlohr Bueso
6 siblings, 2 replies; 12+ messages in thread
From: Li Zhijian @ 2021-10-29 9:40 UTC (permalink / raw)
To: dave, joel, josh, mathieu.desnoyers, paulmck, rostedt, rcu
Cc: philip.li, lizhijian, jiangshanlai, linux-kernel, Li Zhijian
Generally, error message should be logged anyhow.
Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
---
kernel/rcu/rcuscale.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
index 2cc34a22a506..5c8449a8827a 100644
--- a/kernel/rcu/rcuscale.c
+++ b/kernel/rcu/rcuscale.c
@@ -50,8 +50,8 @@ MODULE_AUTHOR("Paul E. McKenney <paulmck@linux.ibm.com>");
pr_alert("%s" SCALE_FLAG " %s\n", scale_type, s)
#define VERBOSE_SCALEOUT_STRING(s) \
do { if (verbose) pr_alert("%s" SCALE_FLAG " %s\n", scale_type, s); } while (0)
-#define VERBOSE_SCALEOUT_ERRSTRING(s) \
- do { if (verbose) pr_alert("%s" SCALE_FLAG "!!! %s\n", scale_type, s); } while (0)
+#define SCALEOUT_ERRSTRING(s) \
+ pr_alert("%s" SCALE_FLAG "!!! %s\n", scale_type, s)
/*
* The intended use cases for the nreaders and nwriters module parameters
@@ -514,11 +514,11 @@ rcu_scale_cleanup(void)
* during the mid-boot phase, so have to wait till the end.
*/
if (rcu_gp_is_expedited() && !rcu_gp_is_normal() && !gp_exp)
- VERBOSE_SCALEOUT_ERRSTRING("All grace periods expedited, no normal ones to measure!");
+ SCALEOUT_ERRSTRING("All grace periods expedited, no normal ones to measure!");
if (rcu_gp_is_normal() && gp_exp)
- VERBOSE_SCALEOUT_ERRSTRING("All grace periods normal, no expedited ones to measure!");
+ SCALEOUT_ERRSTRING("All grace periods normal, no expedited ones to measure!");
if (gp_exp && gp_async)
- VERBOSE_SCALEOUT_ERRSTRING("No expedited async GPs, so went with async!");
+ SCALEOUT_ERRSTRING("No expedited async GPs, so went with async!");
if (torture_cleanup_begin())
return;
@@ -845,7 +845,7 @@ rcu_scale_init(void)
reader_tasks = kcalloc(nrealreaders, sizeof(reader_tasks[0]),
GFP_KERNEL);
if (reader_tasks == NULL) {
- VERBOSE_SCALEOUT_ERRSTRING("out of memory");
+ SCALEOUT_ERRSTRING("out of memory");
firsterr = -ENOMEM;
goto unwind;
}
@@ -865,7 +865,7 @@ rcu_scale_init(void)
kcalloc(nrealwriters, sizeof(*writer_n_durations),
GFP_KERNEL);
if (!writer_tasks || !writer_durations || !writer_n_durations) {
- VERBOSE_SCALEOUT_ERRSTRING("out of memory");
+ SCALEOUT_ERRSTRING("out of memory");
firsterr = -ENOMEM;
goto unwind;
}
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/6] locktorture,rcutorture,torture: always log error message
2021-10-29 9:40 [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Li Zhijian
` (4 preceding siblings ...)
2021-10-29 9:40 ` [PATCH 5/6] rcuscale: alwaly " Li Zhijian
@ 2021-10-29 9:40 ` Li Zhijian
2021-10-29 16:41 ` [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Davidlohr Bueso
6 siblings, 0 replies; 12+ messages in thread
From: Li Zhijian @ 2021-10-29 9:40 UTC (permalink / raw)
To: dave, joel, josh, mathieu.desnoyers, paulmck, rostedt, rcu
Cc: philip.li, lizhijian, jiangshanlai, linux-kernel, Li Zhijian
Generally, error message should be logged anyhow.
Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
---
include/linux/torture.h | 9 ++-------
kernel/locking/locktorture.c | 4 ++--
kernel/rcu/rcutorture.c | 8 ++++----
kernel/torture.c | 4 ++--
4 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/include/linux/torture.h b/include/linux/torture.h
index 0910c5803f35..1d2e6c4c38fa 100644
--- a/include/linux/torture.h
+++ b/include/linux/torture.h
@@ -38,13 +38,8 @@ do { \
pr_alert("%s" TORTURE_FLAG " %s\n", torture_type, s); \
} \
} while (0)
-#define VERBOSE_TOROUT_ERRSTRING(s) \
-do { \
- if (verbose) { \
- verbose_torout_sleep(); \
- pr_alert("%s" TORTURE_FLAG "!!! %s\n", torture_type, s); \
- } \
-} while (0)
+#define TOROUT_ERRSTRING(s) \
+ pr_alert("%s" TORTURE_FLAG "!!! %s\n", torture_type, s)
void verbose_torout_sleep(void);
/* Definitions for online/offline exerciser. */
diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
index 7c5a4a087cc7..6752ce3ac424 100644
--- a/kernel/locking/locktorture.c
+++ b/kernel/locking/locktorture.c
@@ -1047,7 +1047,7 @@ static int __init lock_torture_init(void)
sizeof(writer_tasks[0]),
GFP_KERNEL);
if (writer_tasks == NULL) {
- VERBOSE_TOROUT_ERRSTRING("writer_tasks: Out of memory");
+ TOROUT_ERRSTRING("writer_tasks: Out of memory");
firsterr = -ENOMEM;
goto unwind;
}
@@ -1058,7 +1058,7 @@ static int __init lock_torture_init(void)
sizeof(reader_tasks[0]),
GFP_KERNEL);
if (reader_tasks == NULL) {
- VERBOSE_TOROUT_ERRSTRING("reader_tasks: Out of memory");
+ TOROUT_ERRSTRING("reader_tasks: Out of memory");
kfree(writer_tasks);
writer_tasks = NULL;
firsterr = -ENOMEM;
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index ab4215266ebe..9197ce5c7a7d 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -2717,7 +2717,7 @@ static int rcu_torture_read_exit(void *unused)
&trs, "%s",
"rcu_torture_read_exit_child");
if (IS_ERR(tsp)) {
- VERBOSE_TOROUT_ERRSTRING("out of memory");
+ TOROUT_ERRSTRING("out of memory");
errexit = true;
tsp = NULL;
break;
@@ -3044,7 +3044,7 @@ rcu_torture_init(void)
sizeof(fakewriter_tasks[0]),
GFP_KERNEL);
if (fakewriter_tasks == NULL) {
- VERBOSE_TOROUT_ERRSTRING("out of memory");
+ TOROUT_ERRSTRING("out of memory");
firsterr = -ENOMEM;
goto unwind;
}
@@ -3060,7 +3060,7 @@ rcu_torture_init(void)
rcu_torture_reader_mbchk = kcalloc(nrealreaders, sizeof(*rcu_torture_reader_mbchk),
GFP_KERNEL);
if (!reader_tasks || !rcu_torture_reader_mbchk) {
- VERBOSE_TOROUT_ERRSTRING("out of memory");
+ TOROUT_ERRSTRING("out of memory");
firsterr = -ENOMEM;
goto unwind;
}
@@ -3079,7 +3079,7 @@ rcu_torture_init(void)
if (nrealnocbers > 0) {
nocb_tasks = kcalloc(nrealnocbers, sizeof(nocb_tasks[0]), GFP_KERNEL);
if (nocb_tasks == NULL) {
- VERBOSE_TOROUT_ERRSTRING("out of memory");
+ TOROUT_ERRSTRING("out of memory");
firsterr = -ENOMEM;
goto unwind;
}
diff --git a/kernel/torture.c b/kernel/torture.c
index bb8f411c974b..ef27a6c82451 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -570,7 +570,7 @@ int torture_shuffle_init(long shuffint)
shuffle_idle_cpu = -1;
if (!alloc_cpumask_var(&shuffle_tmp_mask, GFP_KERNEL)) {
- VERBOSE_TOROUT_ERRSTRING("Failed to alloc mask");
+ TOROUT_ERRSTRING("Failed to alloc mask");
return -ENOMEM;
}
@@ -934,7 +934,7 @@ int _torture_create_kthread(int (*fn)(void *arg), void *arg, char *s, char *m,
*tp = kthread_run(fn, arg, "%s", s);
if (IS_ERR(*tp)) {
ret = PTR_ERR(*tp);
- VERBOSE_TOROUT_ERRSTRING(f);
+ TOROUT_ERRSTRING(f);
*tp = NULL;
}
torture_shuffle_task_register(*tp);
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 5/6] rcuscale: alwaly log error message
2021-10-29 9:40 ` [PATCH 5/6] rcuscale: alwaly " Li Zhijian
@ 2021-10-29 16:40 ` Davidlohr Bueso
2021-11-02 16:09 ` Paul E. McKenney
1 sibling, 0 replies; 12+ messages in thread
From: Davidlohr Bueso @ 2021-10-29 16:40 UTC (permalink / raw)
To: Li Zhijian
Cc: joel, josh, mathieu.desnoyers, paulmck, rostedt, rcu, philip.li,
lizhijian, jiangshanlai, linux-kernel
For the subject you have a typo, I guess you meant 'always'.
Thanks,
Davidlohr
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests
2021-10-29 9:40 [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Li Zhijian
` (5 preceding siblings ...)
2021-10-29 9:40 ` [PATCH 6/6] locktorture,rcutorture,torture: always " Li Zhijian
@ 2021-10-29 16:41 ` Davidlohr Bueso
6 siblings, 0 replies; 12+ messages in thread
From: Davidlohr Bueso @ 2021-10-29 16:41 UTC (permalink / raw)
To: Li Zhijian
Cc: joel, josh, mathieu.desnoyers, paulmck, rostedt, rcu, philip.li,
lizhijian, jiangshanlai, linux-kernel
On Fri, 29 Oct 2021, Li Zhijian wrote:
>- we added '\n' to the macros directly like what torture does, see
>include/linux/torture.h
>- SCFTORTOUT is unused any more, remove it
>- follow up https://lkml.org/lkml/2021/10/24/439, covert all other residuals
>
>
>Li Zhijian (6):
> refscale: add missing '\n' to flush message out
> scftorture: add missing '\n' to flush message out
> scftorture: Remove unused SCFTORTOUT
> scftorture: always log error message
> rcuscale: alwaly log error message
> locktorture,rcutorture,torture: always log error message
No particular objection from me.
Acked-by: Davidlohr Bueso <dbueso@suse.de>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/6] scftorture: always log error message
2021-10-29 9:40 ` [PATCH 4/6] scftorture: always log error message Li Zhijian
@ 2021-11-02 16:06 ` Paul E. McKenney
2021-11-03 8:24 ` Li Zhijian
0 siblings, 1 reply; 12+ messages in thread
From: Paul E. McKenney @ 2021-11-02 16:06 UTC (permalink / raw)
To: Li Zhijian
Cc: dave, joel, josh, mathieu.desnoyers, rostedt, rcu, philip.li,
lizhijian, jiangshanlai, linux-kernel
On Fri, Oct 29, 2021 at 05:40:27PM +0800, Li Zhijian wrote:
> Generally, error message should be logged anyhow.
>
> Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
I have queued the patches up to this point for the v5.17 merge window
(not the current one, but the next one).
This one does not apply. It looks like you created it against mainline
rather than -rcu. You can learn about the -rcu tree and its habits here:
https://mirrors.edge.kernel.org/pub/linux/kernel/people/paulmck/rcutodo.html
Please port this patch to -rcu so that I can pull it in without
conflicting with patches in -rcu.
Thanx, Paul
> ---
> kernel/scftorture.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/scftorture.c b/kernel/scftorture.c
> index 5fb15492999b..8ef7888d78cc 100644
> --- a/kernel/scftorture.c
> +++ b/kernel/scftorture.c
> @@ -41,8 +41,7 @@
> #define VERBOSE_SCFTORTOUT(s, x...) \
> do { if (verbose) pr_alert(SCFTORT_FLAG s "\n", ## x); } while (0)
>
> -#define VERBOSE_SCFTORTOUT_ERRSTRING(s, x...) \
> - do { if (verbose) pr_alert(SCFTORT_FLAG "!!! " s "\n", ## x); } while (0)
> +#define SCFTORTOUT_ERRSTRING(s, x...) pr_alert(SCFTORT_FLAG "!!! " s "\n", ## x)
>
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Paul E. McKenney <paulmck@kernel.org>");
> @@ -583,14 +582,14 @@ static int __init scf_torture_init(void)
> if (weight_single1 == 0 && weight_single_rpc1 == 0 && weight_single_wait1 == 0 &&
> weight_many1 == 0 && weight_many_wait1 == 0 &&
> weight_all1 == 0 && weight_all_wait1 == 0) {
> - VERBOSE_SCFTORTOUT_ERRSTRING("all zero weights makes no sense");
> + SCFTORTOUT_ERRSTRING("all zero weights makes no sense");
> firsterr = -EINVAL;
> goto unwind;
> }
> if (IS_BUILTIN(CONFIG_SCF_TORTURE_TEST))
> scf_sel_add(weight_resched1, SCF_PRIM_RESCHED, false);
> else if (weight_resched1)
> - VERBOSE_SCFTORTOUT_ERRSTRING("built as module, weight_resched ignored");
> + SCFTORTOUT_ERRSTRING("built as module, weight_resched ignored");
> scf_sel_add(weight_single1, SCF_PRIM_SINGLE, false);
> scf_sel_add(weight_single_rpc1, SCF_PRIM_SINGLE_RPC, true);
> scf_sel_add(weight_single_wait1, SCF_PRIM_SINGLE, true);
> @@ -621,7 +620,7 @@ static int __init scf_torture_init(void)
> nthreads = num_online_cpus();
> scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL);
> if (!scf_stats_p) {
> - VERBOSE_SCFTORTOUT_ERRSTRING("out of memory");
> + SCFTORTOUT_ERRSTRING("out of memory");
> firsterr = -ENOMEM;
> goto unwind;
> }
> --
> 2.32.0
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 5/6] rcuscale: alwaly log error message
2021-10-29 9:40 ` [PATCH 5/6] rcuscale: alwaly " Li Zhijian
2021-10-29 16:40 ` Davidlohr Bueso
@ 2021-11-02 16:09 ` Paul E. McKenney
1 sibling, 0 replies; 12+ messages in thread
From: Paul E. McKenney @ 2021-11-02 16:09 UTC (permalink / raw)
To: Li Zhijian
Cc: dave, joel, josh, mathieu.desnoyers, rostedt, rcu, philip.li,
lizhijian, jiangshanlai, linux-kernel
On Fri, Oct 29, 2021 at 05:40:28PM +0800, Li Zhijian wrote:
> Generally, error message should be logged anyhow.
>
> Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
And I queued this one, thank you!
The last patch also need to be ported to -rcu. Please port it and
the other one and resubmit them.
Thanx, Paul
> ---
> kernel/rcu/rcuscale.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
> index 2cc34a22a506..5c8449a8827a 100644
> --- a/kernel/rcu/rcuscale.c
> +++ b/kernel/rcu/rcuscale.c
> @@ -50,8 +50,8 @@ MODULE_AUTHOR("Paul E. McKenney <paulmck@linux.ibm.com>");
> pr_alert("%s" SCALE_FLAG " %s\n", scale_type, s)
> #define VERBOSE_SCALEOUT_STRING(s) \
> do { if (verbose) pr_alert("%s" SCALE_FLAG " %s\n", scale_type, s); } while (0)
> -#define VERBOSE_SCALEOUT_ERRSTRING(s) \
> - do { if (verbose) pr_alert("%s" SCALE_FLAG "!!! %s\n", scale_type, s); } while (0)
> +#define SCALEOUT_ERRSTRING(s) \
> + pr_alert("%s" SCALE_FLAG "!!! %s\n", scale_type, s)
>
> /*
> * The intended use cases for the nreaders and nwriters module parameters
> @@ -514,11 +514,11 @@ rcu_scale_cleanup(void)
> * during the mid-boot phase, so have to wait till the end.
> */
> if (rcu_gp_is_expedited() && !rcu_gp_is_normal() && !gp_exp)
> - VERBOSE_SCALEOUT_ERRSTRING("All grace periods expedited, no normal ones to measure!");
> + SCALEOUT_ERRSTRING("All grace periods expedited, no normal ones to measure!");
> if (rcu_gp_is_normal() && gp_exp)
> - VERBOSE_SCALEOUT_ERRSTRING("All grace periods normal, no expedited ones to measure!");
> + SCALEOUT_ERRSTRING("All grace periods normal, no expedited ones to measure!");
> if (gp_exp && gp_async)
> - VERBOSE_SCALEOUT_ERRSTRING("No expedited async GPs, so went with async!");
> + SCALEOUT_ERRSTRING("No expedited async GPs, so went with async!");
>
> if (torture_cleanup_begin())
> return;
> @@ -845,7 +845,7 @@ rcu_scale_init(void)
> reader_tasks = kcalloc(nrealreaders, sizeof(reader_tasks[0]),
> GFP_KERNEL);
> if (reader_tasks == NULL) {
> - VERBOSE_SCALEOUT_ERRSTRING("out of memory");
> + SCALEOUT_ERRSTRING("out of memory");
> firsterr = -ENOMEM;
> goto unwind;
> }
> @@ -865,7 +865,7 @@ rcu_scale_init(void)
> kcalloc(nrealwriters, sizeof(*writer_n_durations),
> GFP_KERNEL);
> if (!writer_tasks || !writer_durations || !writer_n_durations) {
> - VERBOSE_SCALEOUT_ERRSTRING("out of memory");
> + SCALEOUT_ERRSTRING("out of memory");
> firsterr = -ENOMEM;
> goto unwind;
> }
> --
> 2.32.0
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/6] scftorture: always log error message
2021-11-02 16:06 ` Paul E. McKenney
@ 2021-11-03 8:24 ` Li Zhijian
0 siblings, 0 replies; 12+ messages in thread
From: Li Zhijian @ 2021-11-03 8:24 UTC (permalink / raw)
To: paulmck
Cc: dave, joel, josh, mathieu.desnoyers, rostedt, rcu, philip.li,
lizhijian, jiangshanlai, linux-kernel
On 03/11/2021 00:06, Paul E. McKenney wrote:
> On Fri, Oct 29, 2021 at 05:40:27PM +0800, Li Zhijian wrote:
>> Generally, error message should be logged anyhow.
>>
>> Signed-off-by: Li Zhijian<zhijianx.li@intel.com>
> I have queued the patches up to this point for the v5.17 merge window
> (not the current one, but the next one).
>
> This one does not apply. It looks like you created it against mainline
> rather than -rcu. You can learn about the -rcu tree and its habits here:
>
> https://mirrors.edge.kernel.org/pub/linux/kernel/people/paulmck/rcutodo.html
>
> Please port this patch to -rcu so that I can pull it in without
> conflicting with patches in -rcu.
Glad to know this, i will rebase the rest 2 patches and resubmit them soon.
Thanks
Zhijian
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-11-03 8:25 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 9:40 [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Li Zhijian
2021-10-29 9:40 ` [PATCH 1/6] refscale: add missing '\n' to flush message out Li Zhijian
2021-10-29 9:40 ` [PATCH 2/6] scftorture: " Li Zhijian
2021-10-29 9:40 ` [PATCH 3/6] scftorture: remove unused SCFTORTOUT Li Zhijian
2021-10-29 9:40 ` [PATCH 4/6] scftorture: always log error message Li Zhijian
2021-11-02 16:06 ` Paul E. McKenney
2021-11-03 8:24 ` Li Zhijian
2021-10-29 9:40 ` [PATCH 5/6] rcuscale: alwaly " Li Zhijian
2021-10-29 16:40 ` Davidlohr Bueso
2021-11-02 16:09 ` Paul E. McKenney
2021-10-29 9:40 ` [PATCH 6/6] locktorture,rcutorture,torture: always " Li Zhijian
2021-10-29 16:41 ` [PATCH 0/6] minor fixes and cleanups in rcuscale and torture tests Davidlohr Bueso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).