lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 8 Jan 2021 08:45:14 +0000
From:   Ran Wang <ran.wang_1@....com>
To:     Sebastian Siewior <bigeasy@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>
CC:     Thomas Gleixner <tglx@...utronix.de>,
        Jiafei Pan <jiafei.pan@....com>,
        "linux-rt-users@...r.kernel.org" <linux-rt-users@...r.kernel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] [RFC] rt: kernel/sched/core: fix kthread_park() pending
 too long when CPU un-plugged

Hi Sebastian, Peter

Thursday, January 7, 2021 11:29 PM, Sebastian Siewior wrote:
> 
> On 2021-01-07 11:45:39 [+0100], Peter Zijlstra wrote:
> > On Thu, Jan 07, 2021 at 05:18:41PM +0800, Ran Wang wrote:
> > > +
> > > +			if (IS_ENABLED(CONFIG_PREEMPT_RT) &&
> > > +			    !strncmp(p->comm, "ksoftirqd/", 10))
> > > +				schedule_hrtimeout(&to,
> > > +					HRTIMER_MODE_REL | HRTIMER_MODE_HARD);
> > > +			else
> > > +				schedule_hrtimeout(&to, HRTIMER_MODE_REL);
> >
> > This is horrific, why did you not self-censor and spare me the mental
> > anguish of having to formulate a CoC compliant response?
> >
> > It also violates coding style, but given the total lack of any sense,
> > that seems like a minor detail.
> >
> > Why can't we use HRTIMER_MODE_HARD unconditionally?
> 
> I had a similar patch in -RT and dropped it in v5.10-rc7-rt16.
> It was added because RT couldn't boot since creating the boot-threads didn't work before the ksoftirqd was up. This was fixed by commit
>    26c7295be0c5e ("kthread: Do not preempt current task if it is going to call schedule()")

I tried applying above commit to linux-5.6.y-rt, it could resolve my problem on LX2160ARDB, THANKS!

> and live was good again.
> tglx (also) suggested to add HRTIMER_MODE_HARD unconditionally (it looked at SYSTEM_STATE back then) and I was only worried some
> abuse via userland.

Got it.

Regards,
Ran

> This sleep can be triggered by ptrace/strace() and with brief testing I can trigger the sleep there but I don't get it anywhere near where I
> would notice it with cyclictest.
> 
> Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ