mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Han, Jiangong" <Jiangong.Han@windriver.com>
To: paulmck@kernel.org
Cc: dave@stgolabs.net, josh@joshtriplett.org, rostedt@goodmis.org,
	mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com,
	joel@joelfernandes.org, linux-kernel@vger.kernel.org,
	rcu@vger.kernel.org
Subject: Re: [PATCH] rcu-scale: change rcu-scale report.
Date: Tue, 22 Jun 2021 18:56:24 +0800	[thread overview]
Message-ID: <405e1757-45c7-583c-6e1f-1ed54cd935ac@windriver.com> (raw)
In-Reply-To: <127fc462-375e-7e1a-2ecc-dd647f3bcb89@windriver.com>

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

Thanks for you time.
Br,
Jiangong.


在 2021/6/22 下午6:48, Han, 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
>
> ----------------------------------
>
>
>
>  2021/6/10 上午4:37, Paul E. McKenney 写道:
>> [Please note: This e-mail is from an EXTERNAL e-mail address]
>>
>> On Sat, Jun 05, 2021 at 03:00:19PM +0800, Jiangong.Han wrote:
>>> 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
>>>
>>> Signed-off-by: Jiangong.Han <jiangong.han@windriver.com>
>> 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
>>
>>> ---
>>>   kernel/rcu/rcuscale.c | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
>>> index dca51fe9c73f..2cc34a22a506 100644
>>> --- a/kernel/rcu/rcuscale.c
>>> +++ b/kernel/rcu/rcuscale.c
>>> @@ -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
>>>

      reply	other threads:[~2021-06-22 10:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-05  7:00 Jiangong.Han
2021-06-09 20:37 ` Paul E. McKenney
2021-06-22 10:48   ` Han, Jiangong
2021-06-22 10:56     ` Han, Jiangong [this message]

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=405e1757-45c7-583c-6e1f-1ed54cd935ac@windriver.com \
    --to=jiangong.han@windriver.com \
    --cc=dave@stgolabs.net \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®