[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b8440471-e78d-8112-2ab3-c2a948095fa8@kernel.dk>
Date: Thu, 4 Jun 2020 21:22:53 -0600
From: Jens Axboe <axboe@...nel.dk>
To: "Ahmed S. Darwish" <a.darwish@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
"Paul E. McKenney" <paulmck@...nel.org>,
"Sebastian A. Siewior" <bigeasy@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>,
Vivek Goyal <vgoyal@...hat.com>, linux-block@...r.kernel.org
Subject: Re: [PATCH v2 5/6] block: nr_sects_write(): Disable preemption on
seqcount write
On 6/3/20 8:49 AM, Ahmed S. Darwish wrote:
> For optimized block readers not holding a mutex, the "number of sectors"
> 64-bit value is protected from tearing on 32-bit architectures by a
> sequence counter.
>
> Disable preemption before entering that sequence counter's write side
> critical section. Otherwise, the read side can preempt the write side
> section and spin for the entire scheduler tick. If the reader belongs to
> a real-time scheduling class, it can spin forever and the kernel will
> livelock.
Applied, thanks.
--
Jens Axboe
Powered by blists - more mailing lists