All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Fernandes <joel@joelfernandes.org>
To: paulmck@kernel.org
Cc: Pingfan Liu <kernelfans@gmail.com>,
	Frederic Weisbecker <frederic@kernel.org>,
	rcu@vger.kernel.org, David Woodhouse <dwmw@amazon.co.uk>,
	Neeraj Upadhyay <quic_neeraju@quicinc.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: Re: [PATCHv2 3/3] rcu: coordinate tick dependency during concurrent offlining
Date: Sun, 2 Oct 2022 12:59:29 -0400	[thread overview]
Message-ID: <E0988E86-3DC5-4CB5-B073-503A9214ED57@joelfernandes.org> (raw)
In-Reply-To: <20221002165749.GU4196@paulmck-ThinkPad-P17-Gen-1>



> On Oct 2, 2022, at 12:57 PM, Paul E. McKenney <paulmck@kernel.org> wrote:
> 
> On Sun, Oct 02, 2022 at 12:30:52PM -0400, Joel Fernandes wrote:
>> 
>> 
>>>> On Oct 2, 2022, at 12:24 PM, Paul E. McKenney <paulmck@kernel.org> wrote:
>>> 
>>> On Sun, Oct 02, 2022 at 12:11:07PM -0400, Joel Fernandes wrote:
>>>> 
>>>> 
>>>>> On 10/2/2022 10:06 AM, Pingfan Liu wrote:
>>>>> On Fri, Sep 30, 2022 at 9:04 PM Joel Fernandes <joel@joelfernandes.org> wrote:
>>>>>> 
>>>>>> On Thu, Sep 29, 2022 at 4:21 AM Pingfan Liu <kernelfans@gmail.com> wrote:
>>>>>>> 
>>>>>>> On Thu, Sep 29, 2022 at 4:19 PM Pingfan Liu <kernelfans@gmail.com> wrote:
>>>>>>>> 
>>>>>>> [...]
>>>>>>>> "
>>>>>>>> 
>>>>>>>> I have no idea whether this is related to the reverted commit.
>>>>>>>> 
>>>>>>> 
>>>>>>> I have started another test against clean v6.0-rc7 to see whether this
>>>>>>> is an issue with the mainline.
>>>>>> 
>>>>>> I am not sure what exactly you are reverting (you could clarify that),
>>>>> 
>>>>> commit 96926686deab ("rcu: Make CPU-hotplug removal operations enable tick").
>>>>> But due to conflict, "git revert" can not work directly. So I applied
>>>>> it by hand.
>>>>> 
>>>>>> but if you are just removing the entire TICK_DEP_BIT_RCU, I do
>>>>>> remember (and mentioned on IRC to others recently) that without this
>>>>>> NOHZ_FULL has a hard time ending grace-periods because the forcing of
>>>>>> tick is needed for this configuration if we are spinning in the kernel
>>>>>> with the tick turned off. That seems to align with your TREE04
>>>>>> (NOHZ_FULL) configuration.
>>>>>> 
>>>>> 
>>>>> Yes, that is the scenario.
>>>>> 
>>>>>> Also, the commit Frederic suggested to revert seems to be a cosmetic
>>>>>> optimization in the interrupt-entry path. That should not change
>>>>>> functionality I believe. So I did not fully follow why reverting that
>>>>>> is relevant (maybe Frederic can clarify?).
>>>>>> 
>>>>> 
>>>>> Leave this question to Frederic.
>>>> 
>>>> I take this comment back, Sorry. Indeed the commits Frederic mentioned will make
>>>> a functional change to CPU hotplug path.
>>>> 
>>>> Sorry for the noise.
>>>> 
>>>> Excited to see exact reason why TICK_DEP_BIT_RCU matters in the hotplug paths. I
>>>> might jump into the investigation with you guys, but I have to make time for
>>>> Lazy-RCU v7 next :)
>>> 
>>> One historical reason was that a nohz_full CPU could enter the kernel with
>>> the tick still disabled, and stay that way indefinitely.  Among other
>>> things, this can interfere with the grace-period wait in the offlining
>>> code path.
>> 
>> Thanks for clarification/confirmation, that was my hunch as well. Does the emergency forcing on of the tick not suffice for that? If I understand you are sending an IPI to set the same tick dependency if grace periods are being held too long. Another potential fix instead of setting tick dependency in hotplug, then, could be to reduce the time before which emergency IPIs are sent to free up nohz_full CPUs, I think.
> 
> Why not try modifying it to work this way and seeing what (if anything)
> breaks?  If nothing breaks, then there is still the option of digging
> into the code.

Yes happy to try :)

> 
> In both cases, after Lazy-RCU v7, of course.  ;-)

Sounds good and thanks for understanding ;)

Thanks,

 - Joel

> 
>                                Thanx, Paul

  reply	other threads:[~2022-10-02 16:59 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  5:58 [PATCHv2 0/3] rcu: Enhance the capability to cope with concurrent cpu offlining/onlining Pingfan Liu
2022-09-15  5:58 ` [PATCHv2 1/3] rcu: Keep qsmaskinitnext fresh when rcutree_online_cpu() Pingfan Liu
2022-09-15  6:11   ` Pingfan Liu
2022-09-16 14:52   ` Frederic Weisbecker
2022-09-19 10:24     ` Pingfan Liu
2022-09-19 10:51       ` Frederic Weisbecker
2022-09-20  3:45         ` Pingfan Liu
2022-09-20  9:23           ` Frederic Weisbecker
2022-10-01  2:26             ` Joel Fernandes
2022-10-02 12:34               ` Pingfan Liu
2022-10-02 15:52                 ` Joel Fernandes
2022-09-20 10:31   ` Frederic Weisbecker
2022-09-21 11:56     ` Pingfan Liu
2022-09-15  5:58 ` [PATCHv2 2/3] rcu: Resort to cpu_dying_mask for affinity when offlining Pingfan Liu
2022-09-16 14:23   ` Frederic Weisbecker
2022-09-19  4:33     ` Pingfan Liu
2022-09-19 10:34       ` Frederic Weisbecker
2022-09-20  3:16         ` Pingfan Liu
2022-09-20  9:00           ` Frederic Weisbecker
2022-09-20  9:38   ` Frederic Weisbecker
2022-09-21 11:48     ` Pingfan Liu
2022-09-15  5:58 ` [PATCHv2 3/3] rcu: coordinate tick dependency during concurrent offlining Pingfan Liu
2022-09-16 13:42   ` Frederic Weisbecker
2022-09-20  7:26     ` Pingfan Liu
2022-09-20  9:46       ` Frederic Weisbecker
2022-09-20 19:13         ` Paul E. McKenney
2022-09-22  9:29           ` Pingfan Liu
2022-09-22 13:54             ` Paul E. McKenney
2022-09-23 22:13               ` Frederic Weisbecker
2022-09-26  6:34               ` Pingfan Liu
2022-09-26 22:23                 ` Paul E. McKenney
2022-09-27  9:59                   ` Pingfan Liu
2022-09-29  8:19                     ` Pingfan Liu
2022-09-29  8:20                       ` Pingfan Liu
2022-09-30 13:04                         ` Joel Fernandes
2022-10-02 14:06                           ` Pingfan Liu
2022-10-02 16:11                             ` Joel Fernandes
2022-10-02 16:24                               ` Paul E. McKenney
2022-10-02 16:30                                 ` Joel Fernandes
2022-10-02 16:57                                   ` Paul E. McKenney
2022-10-02 16:59                                     ` Joel Fernandes [this message]
2022-09-30 15:44                       ` Paul E. McKenney
2022-10-02 13:29                         ` Pingfan Liu
2022-10-02 15:08                           ` Frederic Weisbecker
2022-10-02 16:20                             ` Paul E. McKenney
2022-10-02 16:20                           ` Paul E. McKenney
     [not found]                             ` <CAFgQCTtgLfc0NeYqyWk4Ew-pA9rMREjRjWSnQhYLv-V5117s9Q@mail.gmail.com>
2022-10-27 17:46                               ` Paul E. McKenney
2022-10-31  3:24                                 ` Pingfan Liu
2022-11-03 16:51                                   ` Paul E. McKenney
2022-11-07 16:07                                     ` Paul E. McKenney
2022-11-09 18:55                                       ` Joel Fernandes
2022-11-18 12:08                                         ` Pingfan Liu
2022-11-18 23:30                                           ` Paul E. McKenney
2022-11-21  3:48                                             ` Pingfan Liu
2022-11-21 17:14                                               ` Paul E. McKenney
2022-11-17 14:39                                       ` Frederic Weisbecker
2022-11-18  1:45                                         ` Pingfan Liu
     [not found]                             ` <CAFgQCTtNetv7v_Law=abPtngC8Gv6OGcGz9M_wWMxz_GAEWDUQ@mail.gmail.com>
2022-10-27 18:13                               ` Paul E. McKenney
2022-10-31  2:10                                 ` Pingfan Liu
2022-09-26 16:13   ` Joel Fernandes
2022-09-27  9:42     ` Pingfan Liu

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=E0988E86-3DC5-4CB5-B073-503A9214ED57@joelfernandes.org \
    --to=joel@joelfernandes.org \
    --cc=Jason@zx2c4.com \
    --cc=dwmw@amazon.co.uk \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=kernelfans@gmail.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=quic_neeraju@quicinc.com \
    --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 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.