mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: paulmck@kernel.org
Cc: Frederic Weisbecker <frederic@kernel.org>,
	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>,
	Joel Fernandes <joel@joelfernandes.org>,
	rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Uladzislau Rezki (Sony)" <urezki@gmail.com>
Subject: Re: [PATCH] rcu-tasks: Delay rcu_tasks_verify_self_tests() to avoid missed callbacks
Date: Mon, 13 Jun 2022 14:54:52 -0400	[thread overview]
Message-ID: <a2b40ed8-54e8-50c8-557e-99fba8d3f270@redhat.com> (raw)
In-Reply-To: <20220613175600.GG1790663@paulmck-ThinkPad-P17-Gen-1>

On 6/13/22 13:56, Paul E. McKenney wrote:
> On Mon, Jun 13, 2022 at 12:01:24PM -0400, Waiman Long wrote:
>> On 6/10/22 16:58, Paul E. McKenney wrote:
>>> On Fri, Jun 10, 2022 at 02:42:12PM -0400, Waiman Long wrote:
>>>> Even though rcu_tasks selftest is initiated early in the boot process,
>>>> the verification done at late initcall time may not be late enough to
>>>> catch all the callbacks especially on systems with just a few cpus and
>>>> small memory.
>>>>
>>>> After 12 bootup's On a s390x system, 1 of them had failed rcu_tasks
>>>> verification test.
>>>>
>>>> [    8.183013] call_rcu_tasks() has been failed.
>>>> [    8.183041] WARNING: CPU: 0 PID: 1 at kernel/rcu/tasks.h:1696 rcu_tasks_verify_self_tests+0x64/0xd0
>>>> [    8.203246] Callback from call_rcu_tasks() invoked.
>>>>
>>>> In this particular case, the callback missed the check by about
>>>> 20ms. Similar rcu_tasks selftest failures are also seen in ppc64le
>>>> systems.
>>>>
>>>> [    0.313391] call_rcu_tasks() has been failed.
>>>> [    0.313407] WARNING: CPU: 0 PID: 1 at kernel/rcu/tasks.h:1696 rcu_tasks_verify_self_tests+0x5c/0xa0
>>>> [    0.335569] Callback from call_rcu_tasks() invoked.
>>>>
>>>> Avoid this missed callback by delaying the verification using
>>>> delayed_work. The delay is set to be about 0.1s which hopefully will
>>>> be long enough to catch all the callbacks on systems with few cpus and
>>>> small memory.
>>>>
>>>> Fixes: bfba7ed084f8 ("rcu-tasks: Add RCU-tasks self tests")
>>>> Signed-off-by: Waiman Long <longman@redhat.com>
>>> Good catch, thank you!
>>>
>>> A few days ago, I queued this:
>>>
>>> 2585014188d5 ("rcu-tasks: Be more patient for RCU Tasks boot-time testing")
>>>
>>> This is shown in full at the end of this email.  Does this fix this
>>> problem for you?
>> I think your patch should fix the false positive warning and it give plenty
>> of time for this to happen.
>>
>> I do have one question though. rcu_tasks_verify_selft_tests() is called from
>> do_initcalls(). Since it may not be the last late initcall, does that mean
>> other late initcalls queued after that may be delayed by a second or more?
> Indeed.  Which is why I would welcome the workqueues portion of your
> patch on top of the above patch in -rcu.  ;-)

Sure. I will work on such a follow-up patch.

Cheers,
Longman


      reply	other threads:[~2022-06-13 20:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 18:42 Waiman Long
2022-06-10 20:58 ` Paul E. McKenney
2022-06-13 16:01   ` Waiman Long
2022-06-13 17:56     ` Paul E. McKenney
2022-06-13 18:54       ` Waiman Long [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=a2b40ed8-54e8-50c8-557e-99fba8d3f270@redhat.com \
    --to=longman@redhat.com \
    --cc=frederic@kernel.org \
    --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=quic_neeraju@quicinc.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=urezki@gmail.com \
    /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®