[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2408885e-517d-dc98-e05a-b79de0c66c38@quicinc.com>
Date: Tue, 27 Feb 2024 22:07:08 +0530
From: Mukesh Ojha <quic_mojha@...cinc.com>
To: John Ogness <john.ogness@...utronix.de>, <pmladek@...e.com>,
<rostedt@...dmis.org>, <senozhatsky@...omium.org>
CC: <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] printk: Update @console_may_schedule in
console_trylock_spinning()
On 2/26/2024 6:32 PM, John Ogness wrote:
> On 2024-02-26, Mukesh Ojha <quic_mojha@...cinc.com> wrote:
>> what if console_trylock_spinning() gets the lock which makes
>> console_may_schedule =1 and it is still schedulable ?
>
> I am afraid I do not understand the question.
>
> console_trylock_spinning() is only called from the printk caller
> context. In this context, console_may_schedule is always set to 0.
>
> Only if another context acquires the console lock per sleeping wait,
> console_lock(), can console_may_schedule be set to 1.
>
> Note that the value of console_may_schedule is only relevant for the
> console lock owner when console_unlock() is called. That is why its
> value is set when locking the console (or, with this patch, when
> transferring console lock ownerhip).
I overlooked it, thanks.
Patch LGTM.
Reviewed-by: Mukesh Ojha <quic_mojha@...cinc.com>
-Mukesh
>
> John
Powered by blists - more mailing lists