From: Christoph Hellwig <[email protected]>
To: Pierre Labat <[email protected]>
Cc: Keith Busch <[email protected]>, Christoph Hellwig <[email protected]>,
Kanchan Joshi <[email protected]>,
Keith Busch <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>
Subject: Re: [EXT] Re: [PATCHv11 0/9] write hints with nvme fdp and scsi streams
Date: Wed, 13 Nov 2024 05:47:36 +0100 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <DS0PR08MB854131CDA4CDDF2451CEB71DAB592@DS0PR08MB8541.namprd08.prod.outlook.com>
On Tue, Nov 12, 2024 at 06:18:21PM +0000, Pierre Labat wrote:
> Overall, it seems to me that the difficulty here comes from 2 things:
> 1) The write hints may have different semantics (temperature, FDP placement, and whatever will come next).
Or rather trying to claim all these are "write hints" is simply the wrong
approach :)
> 2) Different software layers may want to use the hints, and if several do that at the same time on the same storage that may result in a mess.
That's a very nice but almost to harmless way to phrase it.
> About 1)
> Seems to me that having a different interface for each semantic is an overkill, extra code to maintain. And extra work when a new semantic comes along.
> To keep things simple, keep one set of interfaces (per IO interface, per file interface) for all write hints semantics, and carry the difference in semantic in the hint itself.
> For example, with 32 bits hints, store the semantic in 8 bits and the use the rest in the context of that semantic.
This is very similar to what the never followed up upon Kanchan did.
I think this is a lot better than blindly overloading a generic
"write hint", but still suffers from problems:
a) the code is a lot more complex and harder to maintain than just two
different values
b) it still keeps the idea that a simple temperature hint and write
stream or placement identifiers are someting comparable, which they
really aren't.
> About 2)
> Provide a simple way to the user to decide which layer generate write hints.
> As an example, as some of you pointed out, what if the filesystem wants to generate write hints to optimize its [own] data handling by the storage, and at the same time the application using the FS understand the storage and also wants to optimize using write hints.
> Both use cases are legit, I think.
> To handle that in a simple way, why not have a filesystem mount parameter enabling/disabling the use of write hints by the FS?
The file system is, and always has been, the entity in charge of
resource allocation of the underlying device. Bypassing it will get
you in trouble, and a simple mount option isn't really changing that
(it's also not exactly a scalable interface).
If an application wants to micro-manage placement decisions it should not
use a file system, or at least not a normal one with Posix semantics.
That being said we'd demonstrated that applications using proper grouping
of data by file and the simple temperature hints can get very good result
from file systems that can interpret them, without a lot of work in the
file system. I suspect for most applications that actually want files
that is actually going to give better results than trying to do the
micro-management that tries to bypass the file system.
I'm not sure if Keith was just ranting last night, but IFF the assumption
here is that file systems are just used as dumb containers and applications
manage device level placement inside them we have a much deeper problem
than just interface semantics.
next prev parent reply other threads:[~2024-11-13 4:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 19:36 [PATCHv11 0/9] write hints with nvme fdp and scsi streams Keith Busch
2024-11-08 19:36 ` [PATCHv11 1/9] block: use generic u16 for write hints Keith Busch
2024-11-08 19:36 ` [PATCHv11 2/9] block: introduce max_write_hints queue limit Keith Busch
2024-11-08 19:36 ` [PATCHv11 3/9] statx: add write hint information Keith Busch
2024-11-08 19:36 ` [PATCHv11 4/9] block: allow ability to limit partition write hints Keith Busch
2024-11-08 19:36 ` [PATCHv11 5/9] block, fs: add write hint to kiocb Keith Busch
2024-11-08 19:36 ` [PATCHv11 6/9] io_uring: enable per-io hinting capability Keith Busch
2024-11-08 19:36 ` [PATCHv11 7/9] block: export placement hint feature Keith Busch
2024-11-11 10:29 ` [PATCHv11 0/9] write hints with nvme fdp and scsi streams Christoph Hellwig
2024-11-11 16:27 ` Keith Busch
2024-11-11 16:34 ` Christoph Hellwig
2024-11-12 13:26 ` Kanchan Joshi
2024-11-12 13:34 ` Christoph Hellwig
2024-11-12 14:25 ` Keith Busch
2024-11-12 16:50 ` Christoph Hellwig
2024-11-12 17:19 ` Christoph Hellwig
2024-11-12 18:18 ` [EXT] " Pierre Labat
2024-11-13 4:47 ` Christoph Hellwig [this message]
2024-11-13 23:51 ` Dave Chinner
2024-11-14 3:09 ` Martin K. Petersen
2024-11-14 6:07 ` Christoph Hellwig
2024-11-15 16:28 ` Keith Busch
2024-11-15 16:53 ` Christoph Hellwig
2024-11-18 23:37 ` Keith Busch
2024-11-19 7:15 ` Christoph Hellwig
2024-11-20 17:21 ` Darrick J. Wong
2024-11-20 18:11 ` Keith Busch
2024-11-21 7:17 ` Christoph Hellwig
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 \
[email protected] \
[email protected] \
[email protected] \
[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