All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Ahmed S. Darwish" <a.darwish@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	"Sebastian A. Siewior" <bigeasy@linutronix.de>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Vivek Goyal <vgoyal@redhat.com>,
	linux-block@vger.kernel.org
Subject: Re: [PATCH v2 5/6] block: nr_sects_write(): Disable preemption on seqcount write
Date: Thu, 4 Jun 2020 21:22:53 -0600	[thread overview]
Message-ID: <b8440471-e78d-8112-2ab3-c2a948095fa8@kernel.dk> (raw)
In-Reply-To: <20200603144949.1122421-6-a.darwish@linutronix.de>

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


  reply	other threads:[~2020-06-05  3:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 14:49 [PATCH v2 0/6] seqlock: seqcount_t call sites bugfixes Ahmed S. Darwish
2020-06-03 14:49 ` Ahmed S. Darwish
2020-06-03 14:49 ` [PATCH v2 1/6] net: core: device_rename: Use rwsem instead of a seqcount Ahmed S. Darwish
2020-06-05 14:11   ` Sasha Levin
2020-06-03 14:49 ` [PATCH v2 2/6] net: phy: fixed_phy: Remove unused seqcount Ahmed S. Darwish
2020-06-03 16:19   ` Andrew Lunn
2020-06-03 14:49 ` [PATCH v2 3/6] u64_stats: Document writer non-preemptibility requirement Ahmed S. Darwish
2020-06-03 14:49 ` [PATCH v2 4/6] net: mdiobus: Disable preemption upon u64_stats update Ahmed S. Darwish
2020-06-03 14:49 ` [PATCH v2 5/6] block: nr_sects_write(): Disable preemption on seqcount write Ahmed S. Darwish
2020-06-05  3:22   ` Jens Axboe [this message]
2020-06-05 14:10   ` Sasha Levin
2020-06-03 14:49 ` [PATCH v2 6/6] dma-buf: Remove custom seqcount lockdep class key Ahmed S. Darwish
2020-06-03 14:49   ` Ahmed S. Darwish
2020-06-04  8:49   ` Daniel Vetter
2020-06-04  8:49     ` Daniel Vetter
2020-06-04  7:28 ` [PATCH v2 0/6] seqlock: seqcount_t call sites bugfixes Daniel Vetter
2020-06-04  7:28   ` Daniel Vetter
2020-06-04  8:41   ` Ahmed S. Darwish
2020-06-04  8:41     ` Ahmed S. Darwish
2020-06-04 22:50 ` David Miller
2020-06-04 22:50   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8440471-e78d-8112-2ab3-c2a948095fa8@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=a.darwish@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=vgoyal@redhat.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.