[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230306205818.5a2bc51a@gandalf.local.home>
Date: Mon, 6 Mar 2023 20:58:18 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Hillf Danton <hdanton@...a.com>
Cc: John Stultz <jstultz@...gle.com>,
LKML <linux-kernel@...r.kernel.org>, Wei Wang <wvw@...gle.com>,
Midas Chien <midaschieh@...gle.com>,
"Chunhui Li (李春辉)" <chunhui.li@...iatek.com>,
Kees Cook <keescook@...omium.org>,
Anton Vorontsov <anton@...msg.org>,
"Guilherme G. Piccoli" <gpiccoli@...lia.com>,
Tony Luck <tony.luck@...el.com>, linux-mm@...ck.org
Subject: Re: [PATCH v2] pstore: Revert pmsg_lock back to a normal mutex
On Tue, 7 Mar 2023 08:31:06 +0800
Hillf Danton <hdanton@...a.com> wrote:
> On Mon, 6 Mar 2023 10:28:44 -0500 Steven Rostedt <rostedt@...dmis.org>
> > On Mon, 6 Mar 2023 09:03:23 +0800 Hillf Danton <hdanton@...a.com> wrote:
> > >
> > > PS what sense made by spinning on owner until need_resched() with preempt
> > > disabled in the non-rt context?
> >
> > Not sure what the question you have here is? If need_resched() is set, we
> > want to schedule out.
>
> Given the critical section under mutex could be preempted, what is hard to
> understand is the wakeup of a ten-minute sleeper could not preempt a nice-10
> mutex spinner for instance.
But it can. Most wakeups are done by interrupts or softirqs. Both of which
will happen even if a task is running with preemption disabled.
-- Steve
Powered by blists - more mailing lists