Skip to contentSkip to conversation

rcu-scale: change rcu-scale report.

PATCH In review Jiangong.Han 2 participants 4 messages Jun 5, 2021 – Jun 22, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcu-scale: change rcu-scale report.

The report on rcu-scale shows there are N grace periods, and gps are listed from 0 to N-1.
This commit make writer_n_durations stores the counts of gps, change the listed gps index begin from 1 to N.

From

    [ 8306.087880] rcu-scale: writer 0 gps: 133
    ......
    [ 8307.864630] rcu-scale:    0 writer-duration:     0 44003961
    [ 8307.935711] rcu-scale:    0 writer-duration:     1 32003582
    ......
    [ 8316.472860] rcu-scale:    0 writer-duration:   131 28004391
    [ 8316.538498] rcu-scale:    0 writer-duration:   132 27996410

to

    [ 8306.087880] rcu-scale: writer 0 gps: 133
    ......
    [ 8307.864630] rcu-scale:    0 writer-duration:     1 44003961
    [ 8307.935711] rcu-scale:    0 writer-duration:     2 32003582
    ......
    [ 8316.472860] rcu-scale:    0 writer-duration:   132 28004391
    [ 8316.538498] rcu-scale:    0 writer-duration:   133 27996410
---
 kernel/rcu/rcuscale.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/rcu/rcuscale.c +2 -2
index dca51fe9c73f..2cc34a22a506 100644
@@ -487,7 +487,7 @@ rcu_scale_writer(void *arg)
 	if (gp_async) {
 		cur_ops->gp_barrier();
 	}
-	writer_n_durations[me] = i_max;
+	writer_n_durations[me] = i_max + 1;
 	torture_kthread_stopping("rcu_scale_writer");
 	return 0;
 }
@@ -561,7 +561,7 @@ rcu_scale_cleanup(void)
 			wdpp = writer_durations[i];
 			if (!wdpp)
 				continue;
-			for (j = 0; j <= writer_n_durations[i]; j++) {
+			for (j = 0; j < writer_n_durations[i]; j++) {
 				wdp = &wdpp[j];
 				pr_alert("%s%s %4d writer-duration: %5d %llu\n",
 					scale_type, SCALE_FLAG,
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 23 lines · Jiangong.Han

The report on rcu-scale shows there are N grace periods, and gps are listed from 0 to N-1.
This commit make writer_n_durations stores the counts of gps, change the listed gps index begin from 1 to N.

From

    [ 8306.087880] rcu-scale: writer 0 gps: 133
    ......
    [ 8307.864630] rcu-scale:    0 writer-duration:     0 44003961
    [ 8307.935711] rcu-scale:    0 writer-duration:     1 32003582
    ......
    [ 8316.472860] rcu-scale:    0 writer-duration:   131 28004391
    [ 8316.538498] rcu-scale:    0 writer-duration:   132 27996410

to

    [ 8306.087880] rcu-scale: writer 0 gps: 133
    ......
    [ 8307.864630] rcu-scale:    0 writer-duration:     1 44003961
    [ 8307.935711] rcu-scale:    0 writer-duration:     2 32003582
    ......
    [ 8316.472860] rcu-scale:    0 writer-duration:   132 28004391
    [ 8316.538498] rcu-scale:    0 writer-duration:   133 27996410
Quoted 1 line

You lost me on this one. Why is this helpful? And how does the change shown below actually result in the output shown above, given that rcu_scale_cleanup() still starts j at zero?

Thanx, Paul

Quoted 29 lines
---
 kernel/rcu/rcuscale.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/rcu/rcuscale.c +2 -2
index dca51fe9c73f..2cc34a22a506 100644
@@ -487,7 +487,7 @@ rcu_scale_writer(void *arg)
 	if (gp_async) {
 		cur_ops->gp_barrier();
 	}
-	writer_n_durations[me] = i_max;
+	writer_n_durations[me] = i_max + 1;
 	torture_kthread_stopping("rcu_scale_writer");
 	return 0;
 }
@@ -561,7 +561,7 @@ rcu_scale_cleanup(void)
 			wdpp = writer_durations[i];
 			if (!wdpp)
 				continue;
-			for (j = 0; j <= writer_n_durations[i]; j++) {
+			for (j = 0; j < writer_n_durations[i]; j++) {
 				wdp = &wdpp[j];
 				pr_alert("%s%s %4d writer-duration: %5d %llu\n",
 					scale_type, SCALE_FLAG,
Signature · 1 line
2.17.1
#2 lore raw

Sorry, my the comment is wrong, and the correct comment should be like below, and I had modify this, and I had resend one more applying review patch email for this.

Thanks for you time.

Br,

Jiangong.

----------------------------------
    rcu-scale: rcu-scale returns one less than the real number of gps in the dmesg report.

    The dmesg report on rcu-scale shows there are N grace periods, and gps are listed from 0 to N.
    This commit make writer_n_durations stores the counts of gps, and shows there are N+1 gps, change the listed gps index begin from 0 to N.

    From

        [ 8306.087880] rcu-scale: writer 0 gps: 133
        ......
        [ 8307.864630] rcu-scale:    0 writer-duration:     0 44003961
        [ 8307.935711] rcu-scale:    0 writer-duration:     1 32003582
        ......
        [ 8316.472860] rcu-scale:    0 writer-duration:   132 28004391
        [ 8316.538498] rcu-scale:    0 writer-duration:   133 27996410

    to

        [ 8306.087880] rcu-scale: writer 0 gps: 134
        ......
        [ 8307.864630] rcu-scale:    0 writer-duration:     0 44003961
        [ 8307.935711] rcu-scale:    0 writer-duration:     1 32003582
        ......
        [ 8316.472860] rcu-scale:    0 writer-duration:   132 28004391
        [ 8316.538498] rcu-scale:    0 writer-duration:   133 27996410

----------------------------------

Quoted 62 lines · Paul E. McKenney

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 23 lines · Jiangong.Han

The report on rcu-scale shows there are N grace periods, and gps are listed from 0 to N-1.
This commit make writer_n_durations stores the counts of gps, change the listed gps index begin from 1 to N.

From

     [ 8306.087880] rcu-scale: writer 0 gps: 133
     ......
     [ 8307.864630] rcu-scale:    0 writer-duration:     0 44003961
     [ 8307.935711] rcu-scale:    0 writer-duration:     1 32003582
     ......
     [ 8316.472860] rcu-scale:    0 writer-duration:   131 28004391
     [ 8316.538498] rcu-scale:    0 writer-duration:   132 27996410

to

     [ 8306.087880] rcu-scale: writer 0 gps: 133
     ......
     [ 8307.864630] rcu-scale:    0 writer-duration:     1 44003961
     [ 8307.935711] rcu-scale:    0 writer-duration:     2 32003582
     ......
     [ 8316.472860] rcu-scale:    0 writer-duration:   132 28004391
     [ 8316.538498] rcu-scale:    0 writer-duration:   133 27996410
Quoted 1 line

You lost me on this one. Why is this helpful? And how does the change shown below actually result in the output shown above, given that rcu_scale_cleanup() still starts j at zero?

Thanx, Paul

Quoted 29 lines
---
  kernel/rcu/rcuscale.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
kernel/rcu/rcuscale.c +2 -3
index dca51fe9c73f..2cc34a22a506 100644
@@ -487,7 +487,7 @@ rcu_scale_writer(void *arg)
       if (gp_async) {
               cur_ops->gp_barrier();
       }
-     writer_n_durations[me] = i_max;
+     writer_n_durations[me] = i_max + 1;
       torture_kthread_stopping("rcu_scale_writer");
       return 0;
  }
@@ -561,7 +561,7 @@ rcu_scale_cleanup(void)
                       wdpp = writer_durations[i];
                       if (!wdpp)
                               continue;
-                     for (j = 0; j <= writer_n_durations[i]; j++) {
+                     for (j = 0; j < writer_n_durations[i]; j++) {
                               wdp = &wdpp[j];
                               pr_alert("%s%s %4d writer-duration: %5d %llu\n",
                                       scale_type, SCALE_FLAG,
--

2.17.1

#3 lore raw

and the new edition for reviewing is here: https://lkml.org/lkml/2021/6/22/327

Thanks for you time.
Br,
Jiangong.

Quoted 101 lines · Jiangong

Sorry, my the comment is wrong, and the correct comment should be like below, and I had modify this, and I had resend one more applying review patch email for this.

Thanks for you time.

Br,

Jiangong.

----------------------------------
    rcu-scale: rcu-scale returns one less than the real number of gps in the dmesg report.

    The dmesg report on rcu-scale shows there are N grace periods, and gps are listed from 0 to N.
    This commit make writer_n_durations stores the counts of gps, and shows there are N+1 gps, change the listed gps index begin from 0 to N.

    From

        [ 8306.087880] rcu-scale: writer 0 gps: 133
        ......
        [ 8307.864630] rcu-scale:    0 writer-duration:     0 44003961
        [ 8307.935711] rcu-scale:    0 writer-duration:     1 32003582
        ......
        [ 8316.472860] rcu-scale:    0 writer-duration:   132 28004391
        [ 8316.538498] rcu-scale:    0 writer-duration:   133 27996410

    to

        [ 8306.087880] rcu-scale: writer 0 gps: 134
        ......
        [ 8307.864630] rcu-scale:    0 writer-duration:     0 44003961
        [ 8307.935711] rcu-scale:    0 writer-duration:     1 32003582
        ......
        [ 8316.472860] rcu-scale:    0 writer-duration:   132 28004391
        [ 8316.538498] rcu-scale:    0 writer-duration:   133 27996410

----------------------------------

Quoted 62 lines · Paul E. McKenney

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 23 lines · Jiangong.Han

The report on rcu-scale shows there are N grace periods, and gps are listed from 0 to N-1.
This commit make writer_n_durations stores the counts of gps, change the listed gps index begin from 1 to N.

From

     [ 8306.087880] rcu-scale: writer 0 gps: 133
     ......
     [ 8307.864630] rcu-scale:    0 writer-duration:     0 44003961
     [ 8307.935711] rcu-scale:    0 writer-duration:     1 32003582
     ......
     [ 8316.472860] rcu-scale:    0 writer-duration:   131 28004391
     [ 8316.538498] rcu-scale:    0 writer-duration:   132 27996410

to

     [ 8306.087880] rcu-scale: writer 0 gps: 133
     ......
     [ 8307.864630] rcu-scale:    0 writer-duration:     1 44003961
     [ 8307.935711] rcu-scale:    0 writer-duration:     2 32003582
     ......
     [ 8316.472860] rcu-scale:    0 writer-duration:   132 28004391
     [ 8316.538498] rcu-scale:    0 writer-duration:   133 27996410
Quoted 1 line

You lost me on this one.  Why is this helpful?  And how does the change shown below actually result in the output shown above, given that rcu_scale_cleanup() still starts j at zero?

                                                         Thanx, Paul

Quoted 29 lines

---
  kernel/rcu/rcuscale.c | 4 ++--

  1 file changed, 2 insertions(+), 2 deletions(-)
kernel/rcu/rcuscale.c +2 -2
index dca51fe9c73f..2cc34a22a506 100644
@@ -487,7 +487,7 @@ rcu_scale_writer(void *arg)
        if (gp_async) {
                cur_ops->gp_barrier();
        }
-     writer_n_durations[me] = i_max;
+     writer_n_durations[me] = i_max + 1;
        torture_kthread_stopping("rcu_scale_writer");
        return 0;
   }
@@ -561,7 +561,7 @@ rcu_scale_cleanup(void)
                        wdpp = writer_durations[i];
                        if (!wdpp)
                                continue;
-                     for (j = 0; j <= writer_n_durations[i]; j++) {
+                     for (j = 0; j < writer_n_durations[i]; j++) {
                                wdp = &wdpp[j];
                                pr_alert("%s%s %4d writer-duration: %5d %llu\n",
                                        scale_type, SCALE_FLAG,
Signature · 1 line
2.17.1