From: Keith Busch <[email protected]>
To: Christoph Hellwig <[email protected]>
Cc: Keith Busch <[email protected]>,
[email protected], [email protected],
[email protected], [email protected],
[email protected], [email protected],
[email protected], Nitesh Shetty <[email protected]>,
Hannes Reinecke <[email protected]>
Subject: Re: [PATCHv8 1/6] block, fs: restore kiocb based write hint processing
Date: Tue, 22 Oct 2024 08:37:56 -0600 [thread overview]
Message-ID: <Zxe4xL-sM5yF2isM@kbusch-mbp> (raw)
In-Reply-To: <[email protected]>
On Tue, Oct 22, 2024 at 08:43:09AM +0200, Christoph Hellwig wrote:
> On Mon, Oct 21, 2024 at 09:47:47AM -0600, Keith Busch wrote:
> > On Fri, Oct 18, 2024 at 07:50:32AM +0200, Christoph Hellwig wrote:
> > > On Thu, Oct 17, 2024 at 09:09:32AM -0700, Keith Busch wrote:
> > > > {
> > > > *kiocb = (struct kiocb) {
> > > > .ki_filp = filp,
> > > > .ki_flags = filp->f_iocb_flags,
> > > > .ki_ioprio = get_current_ioprio(),
> > > > + .ki_write_hint = file_write_hint(filp),
> > >
> > > And we'll need to distinguish between the per-inode and per file
> > > hint. I.e. don't blindly initialize ki_write_hint to the per-inode
> > > one here, but make that conditional in the file operation.
> >
> > Maybe someone wants to do direct-io with partions where each partition
> > has a different default "hint" when not provided a per-io hint? I don't
> > know of such a case, but it doesn't sound terrible. In any case, I feel
> > if you're directing writes through these interfaces, you get to keep all
> > the pieces: user space controls policy, kernel just provides the
> > mechanisms to do it.
>
> Eww. You actually pointed out a real problem here: if a device
> has multiple partitions the write streams as of this series are
> shared by them, which breaks their use case as the applications or
> file systems in different partitions will get other users of the
> write stream randomly overlayed onto theirs.
>
> So either the available streams need to be split into smaller pools
> by partitions, or we just assigned them to the first partition to
> make these scheme work for partitioned devices.
>
> Either way mixing up the per-inode hint and the dynamic one remains
> a bad idea.
No doubt it's almost certainly not a good idea to mix different stream
usages, but that's not the kernels problem. It's user space policy. I
don't think the kernel needs to perform any heroic efforts to split
anything here. Just keep it simple.
next prev parent reply other threads:[~2024-10-22 14:37 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 16:09 [PATCHv8 0/6] write hints for nvme fdp Keith Busch
2024-10-17 16:09 ` [PATCHv8 1/6] block, fs: restore kiocb based write hint processing Keith Busch
2024-10-18 5:50 ` Christoph Hellwig
2024-10-21 15:47 ` Keith Busch
2024-10-21 17:09 ` Bart Van Assche
2024-10-21 19:35 ` Keith Busch
2024-10-22 6:43 ` Christoph Hellwig
2024-10-22 14:37 ` Keith Busch [this message]
2024-10-22 14:40 ` Christoph Hellwig
2024-10-18 16:11 ` Bart Van Assche
2024-10-17 16:09 ` [PATCHv8 2/6] block: use generic u16 for write hints Keith Busch
2024-10-18 5:46 ` Christoph Hellwig
2024-10-24 19:45 ` Keith Busch
2024-10-25 12:20 ` Christoph Hellwig
2024-10-18 6:00 ` Hannes Reinecke
2024-10-18 16:12 ` Bart Van Assche
2024-10-21 15:03 ` Keith Busch
2024-10-17 16:09 ` [PATCHv8 3/6] block: introduce max_write_hints queue limit Keith Busch
2024-10-18 5:51 ` Christoph Hellwig
2024-10-18 6:01 ` Hannes Reinecke
2024-10-18 16:18 ` Bart Van Assche
2024-10-21 15:02 ` Keith Busch
2024-10-17 16:09 ` [PATCHv8 4/6] fs: introduce per-io hint support flag Keith Busch
2024-10-18 5:52 ` Christoph Hellwig
2024-10-18 6:03 ` Hannes Reinecke
2024-10-17 16:09 ` [PATCHv8 5/6] io_uring: enable per-io hinting capability Keith Busch
2024-10-18 5:53 ` Christoph Hellwig
2024-10-18 6:03 ` Hannes Reinecke
2024-10-17 16:09 ` [PATCHv8 6/6] nvme: enable FDP support Keith Busch
2024-10-18 10:48 ` Kanchan Joshi
2024-10-21 15:08 ` Keith Busch
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=Zxe4xL-sM5yF2isM@kbusch-mbp \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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