linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	Vishal Moola <vishal.moola@gmail.com>,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] Page Cache Allowing Hard Interrupts
Date: Tue, 10 Aug 2021 13:33:28 +0100	[thread overview]
Message-ID: <YRJyGMLAFKoB1qUQ@infradead.org> (raw)
In-Reply-To: <YRJsiapS/M3BOH9D@casper.infradead.org>

On Tue, Aug 10, 2021 at 01:09:45PM +0100, Matthew Wilcox wrote:
> On Tue, Aug 10, 2021 at 09:15:28AM +0100, Christoph Hellwig wrote:
> > Stupid question, but where do we ever do page cache interaction from
> > soft irq context?
> 
> test_clear_page_writeback() happens in _some_ interrupt context (ie
> the io completion path).  We had been under the impression that it was
> always actually softirq context, and so this patch was safe.  However,
> it's now clear that some drivers are calling it from hardirq context.
> Writeback completions are clearly not latency sensitive and so can
> be delayed from hardirq to softirq context without any problem, so I
> think fixing this is just going to be a matter of tagging requests as
> "complete in softirq context" and ensuring that blk_mq_raise_softirq()
> is called for them.
> 
> Assuming that DIO write completions _are_ latency-sensitive, of course.
> Maybe all write completions could be run in softirqs.

I really don't really see any benefit in introducing softirqs into
the game.  If we want to simplify the locking and do not care too much
about latency, we should just defer to workqueue/thread context.
For example XFS already does that for all writeback except for pure
overwrites.  Those OTOH can be latency critical for O_SYNC writes, but
you're apparently looking into that already.

  reply	other threads:[~2021-08-10 12:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 21:36 [RFC PATCH] Page Cache Allowing Hard Interrupts Vishal Moola
2021-08-10  8:15 ` Christoph Hellwig
2021-08-10 12:09   ` Matthew Wilcox
2021-08-10 12:33     ` Christoph Hellwig [this message]
2021-08-10 14:08       ` Matthew Wilcox

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=YRJyGMLAFKoB1qUQ@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vishal.moola@gmail.com \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).