From: Uladzislau Rezki <urezki@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Uladzislau Rezki <urezki@gmail.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Joel Fernandes <joel@joelfernandes.org>,
Alison Chaiken <achaiken@aurora.tech>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>, RCU <rcu@vger.kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Neeraj Upadhyay <neeraj.iitr10@gmail.com>,
Oleksiy Avramchenko <oleksiy.avramchenko@sony.com>
Subject: Re: [PATCH] rcu/nocb: Add an option to ON/OFF an offloading from RT context
Date: Wed, 11 May 2022 15:39:56 +0200 [thread overview]
Message-ID: <Ynu8rM42aSyGN7li@pc638.lan> (raw)
In-Reply-To: <20220510100135.62a4f7df@gandalf.local.home>
> On Mon, 9 May 2022 20:28:26 +0200
> Uladzislau Rezki <urezki@gmail.com> wrote:
>
> > I see that Paul would like to keep it for CONFIG_PREEMPT_RT, because it
> > was mainly designed for that kind of kernels. So we can align with Alison
> > patch and her decision, so i do not see any issues. So far RT folk seems
> > does not mind in having "callback-kthreads" as SCHED_FIFO :)
>
> That's because RT folks set the threads they care about to a higher RT
> priority than the kthreads. ;-)
>
That explains many things :)
I have one question, it is partly related to the topic that is in question
and to this thread also. I was tracing a "long" duration of the offloading
kthreads which actually invoke them one by one. And the picture was like
below from ftrace point of view:
<snip>
rcuop/6-54 [000] .N.. 183.753018: rcu_invoke_callback: rcu_preempt rhp=0xffffff88ffd440b0 func=__d_free.cfi_jt
rcuop/6-54 [000] .N.. 183.753020: rcu_invoke_callback: rcu_preempt rhp=0xffffff892ffd8400 func=inode_free_by_rcu.cfi_jt
rcuop/6-54 [000] .N.. 183.753021: rcu_invoke_callback: rcu_preempt rhp=0xffffff89327cd708 func=i_callback.cfi_jt
...
rcuop/6-54 [000] .N.. 183.755941: rcu_invoke_callback: rcu_preempt rhp=0xffffff8993c5a968 func=i_callback.cfi_jt
rcuop/6-54 [000] .N.. 183.755942: rcu_invoke_callback: rcu_preempt rhp=0xffffff8993c4bd20 func=__d_free.cfi_jt
rcuop/6-54 [000] dN.. 183.755944: rcu_batch_end: rcu_preempt CBs-invoked=2112 idle=>c<>c<>c<>c<
rcuop/6-54 [000] dN.. 183.755946: rcu_utilization: Start context switch
rcuop/6-54 [000] dN.. 183.755946: rcu_utilization: End context switch
<snip>
i spent some time in order to understand why the context was not switched,
even though the "rcuop" kthread was marked as TIF_NEED_RESCHED and an IPI
was sent to the CPU_0 to reschedule. The last "." in latency field shows
that a context has not disabled any preemption. So everything should be fine.
An explanation is that a local_bh_disable() modifies the current_thread_info()->preempt.count
so a task becomes non preemtable but the ftrace does not provide any signal about
it. So i was fooled for some time by my tracer logs.
Do you have any thoughts about it? Should it be solved or signaled
somehow that a task in fact is not preemtable if a counter > 0?
Thanks!
--
Uladzislau Rezki
next prev parent reply other threads:[~2022-05-11 13:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 10:16 [PATCH] rcu/nocb: Add an option to ON/OFF an offloading from RT context Uladzislau Rezki (Sony)
2022-05-05 19:09 ` Paul E. McKenney
2022-05-06 16:22 ` Uladzislau Rezki
2022-05-06 18:24 ` Paul E. McKenney
2022-05-07 9:11 ` Uladzislau Rezki
2022-05-07 22:32 ` Paul E. McKenney
2022-05-08 6:28 ` Joel Fernandes
2022-05-08 21:32 ` Paul E. McKenney
2022-05-09 0:17 ` Joel Fernandes
2022-05-09 3:37 ` Paul E. McKenney
2022-05-09 17:17 ` Joel Fernandes
2022-05-09 18:14 ` Paul E. McKenney
2022-05-09 18:28 ` Uladzislau Rezki
2022-05-09 18:39 ` Paul E. McKenney
2022-05-09 18:43 ` Uladzislau Rezki
2022-05-10 14:09 ` Steven Rostedt
2022-05-10 14:24 ` Paul E. McKenney
2022-05-10 14:35 ` Uladzislau Rezki
2022-05-10 14:01 ` Steven Rostedt
2022-05-11 13:39 ` Uladzislau Rezki [this message]
2022-05-11 14:29 ` Steven Rostedt
2022-05-11 14:51 ` Uladzislau Rezki
2022-05-11 14:53 ` Uladzislau Rezki
2022-05-11 17:17 ` Uladzislau Rezki
2022-05-16 16:22 ` Steven Rostedt
2022-05-16 16:42 ` Uladzislau Rezki
2022-05-10 14:07 ` Sebastian Andrzej Siewior
2022-05-10 17:14 ` Paul E. McKenney
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=Ynu8rM42aSyGN7li@pc638.lan \
--to=urezki@gmail.com \
--cc=achaiken@aurora.tech \
--cc=bigeasy@linutronix.de \
--cc=frederic@kernel.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neeraj.iitr10@gmail.com \
--cc=oleksiy.avramchenko@sony.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 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.