[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201207115812.GC18365@C02TD0UTHF1T.local>
Date: Mon, 7 Dec 2020 11:58:12 +0000
From: Mark Rutland <mark.rutland@....com>
To: Alex Belits <abelits@...vell.com>
Cc: Prasun Kapoor <pkapoor@...vell.com>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"trix@...hat.com" <trix@...hat.com>,
"mingo@...nel.org" <mingo@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"peterx@...hat.com" <peterx@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"nitesh@...hat.com" <nitesh@...hat.com>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"mtosatti@...hat.com" <mtosatti@...hat.com>,
"will@...nel.org" <will@...nel.org>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"peterz@...radead.org" <peterz@...radead.org>,
"frederic@...nel.org" <frederic@...nel.org>,
"leon@...ebranch.com" <leon@...ebranch.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"pauld@...hat.com" <pauld@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [EXT] Re: [PATCH v5 7/9] task_isolation: don't interrupt CPUs
with tick_nohz_full_kick_cpu()
On Fri, Dec 04, 2020 at 12:54:29AM +0000, Alex Belits wrote:
>
> On Wed, 2020-12-02 at 14:20 +0000, Mark Rutland wrote:
> > External Email
> >
> > -------------------------------------------------------------------
> > ---
> > On Mon, Nov 23, 2020 at 05:58:22PM +0000, Alex Belits wrote:
> > > From: Yuri Norov <ynorov@...vell.com>
> > >
> > > For nohz_full CPUs the desirable behavior is to receive interrupts
> > > generated by tick_nohz_full_kick_cpu(). But for hard isolation it's
> > > obviously not desirable because it breaks isolation.
> > >
> > > This patch adds check for it.
> > >
> > > Signed-off-by: Yuri Norov <ynorov@...vell.com>
> > > [abelits@...vell.com: updated, only exclude CPUs running isolated
> > > tasks]
> > > Signed-off-by: Alex Belits <abelits@...vell.com>
> > > ---
> > > kernel/time/tick-sched.c | 4 +++-
> > > 1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> > > index a213952541db..6c8679e200f0 100644
> > > --- a/kernel/time/tick-sched.c
> > > +++ b/kernel/time/tick-sched.c
> > > @@ -20,6 +20,7 @@
> > > #include <linux/sched/clock.h>
> > > #include <linux/sched/stat.h>
> > > #include <linux/sched/nohz.h>
> > > +#include <linux/isolation.h>
> > > #include <linux/module.h>
> > > #include <linux/irq_work.h>
> > > #include <linux/posix-timers.h>
> > > @@ -268,7 +269,8 @@ static void tick_nohz_full_kick(void)
> > > */
> > > void tick_nohz_full_kick_cpu(int cpu)
> > > {
> > > - if (!tick_nohz_full_cpu(cpu))
> > > + smp_rmb();
> >
> > What does this barrier pair with? The commit message doesn't mention
> > it,
> > and it's not clear in-context.
>
> With barriers in task_isolation_kernel_enter()
> and task_isolation_exit_to_user_mode().
Please add a comment in the code as to what it pairs with.
Thanks,
Mark.
Powered by blists - more mailing lists