All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
	linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org,
	adilger@dilger.ca, martin.petersen@oracle.com
Subject: Re: [PATCH 04/11] fs: add support for allowing applications to pass in write life time hints
Date: Thu, 15 Jun 2017 09:23:02 -0600	[thread overview]
Message-ID: <bb49b5a3-ac8e-84ce-1886-62deab29a3a4@kernel.dk> (raw)
In-Reply-To: <7f8e2e3c-fa15-6864-7afd-b82e5afb87b5@kernel.dk>

On 06/15/2017 08:21 AM, Jens Axboe wrote:
> On 06/15/2017 02:19 AM, Christoph Hellwig wrote:
>> I think Darrick has a very valid concern here - using RWF_* flags
>> to affect inode or fd-wide state is extremely counter productive.
>>
>> Combined with the fact that the streams need a special setup in NVMe
>> I'm tempted to say that the interface really should be fadvise or
>> similar, which would keep the setup out of the I/O path and make clear
>> it's a sticky interface.  For direct I/O RWF_* would make some sense,
>> but we'd still have to deal with the setup issue.
> 
> OK, which is exactly how I had implemented the interface 2 years ago.
> I can resurrect that part and dump the RWF_* flags. I agree the RWF_*
> flags are confusing for buffered IO, since they are persistent. For
> O_DIRECT, they make more sense. So the question is if we want to
> retain the RWF_WRITE_LIFE_* hints at all, or simply go back to the
> fadvise with something ala:
> 
> POSIX_FADV_WRITE_HINT_SET	Set write life time hint
> POSIX_FADV_WRITE_HINT_GET	Get write life time hint

And then I remembered why fadvise _sucks_. It returns the error value
directly. So 0 is success > 0 is some error. That does not work well
for adding a set/get interface. Additionally, with fadvise, we have
to overload either 'offset' or 'length' for the write hint for the
set operation. Not super pretty.

Any objections to making the auxiliary interface fcntl(2) based?
That would be a cleaner fit, imho.

-- 
Jens Axboe

  reply	other threads:[~2017-06-15 15:23 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15  3:45 [PATCHSET v4] Add support for write life time hints Jens Axboe
2017-06-15  3:45 ` [PATCH 01/11] block: add support for carrying stream information in a bio Jens Axboe
2017-06-15  3:45 ` [PATCH 02/11] blk-mq: expose stream write stats through debugfs Jens Axboe
2017-06-15  8:16   ` Christoph Hellwig
2017-06-15 14:24     ` Jens Axboe
2017-06-15  3:45 ` [PATCH 03/11] fs: add support for an inode to carry stream related data Jens Axboe
2017-06-15  8:17   ` Christoph Hellwig
2017-06-15 14:22     ` Jens Axboe
2017-06-15  3:45 ` [PATCH 04/11] fs: add support for allowing applications to pass in write life time hints Jens Axboe
2017-06-15  4:15   ` Darrick J. Wong
2017-06-15  4:33     ` Jens Axboe
2017-06-15  8:19       ` Christoph Hellwig
2017-06-15 14:21         ` Jens Axboe
2017-06-15 15:23           ` Jens Axboe [this message]
2017-06-16  7:30             ` Christoph Hellwig
2017-06-16 14:35               ` Jens Axboe
2017-06-16  7:33           ` Christoph Hellwig
2017-06-16 14:35             ` Jens Axboe
2017-06-16 14:53               ` Jens Axboe
2017-06-16 15:52               ` Christoph Hellwig
2017-06-16 15:59                 ` Jens Axboe
2017-06-16 16:14                   ` Jens Axboe
2017-06-16 18:00                     ` Christoph Hellwig
2017-06-16 18:02                   ` Christoph Hellwig
2017-06-16 19:35                     ` Jens Axboe
2017-06-15 11:24     ` Al Viro
2017-06-15  3:45 ` [PATCH 05/11] block: add helpers for setting/checking write hint validity Jens Axboe
2017-06-15  3:45 ` [PATCH 06/11] fs: add O_DIRECT support for sending down bio stream information Jens Axboe
2017-06-15  3:45 ` [PATCH 07/11] fs: add support for buffered writeback to pass down write hints Jens Axboe
2017-06-15  3:45 ` [PATCH 08/11] ext4: add support for passing in write hints for buffered writes Jens Axboe
2017-06-15  3:45 ` [PATCH 09/11] xfs: " Jens Axboe
2017-06-15  3:45 ` [PATCH 10/11] btrfs: " Jens Axboe
2017-06-15  3:45 ` [PATCH 11/11] nvme: add support for streams and directives Jens Axboe
2017-06-15  8:12 ` [PATCHSET v4] Add support for write life time hints Christoph Hellwig
2017-06-15 14:23   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2017-06-17 19:59 [PATCHSET v7] " Jens Axboe
2017-06-17 19:59 ` [PATCH 04/11] fs: add support for allowing applications to pass in " Jens Axboe
2017-06-19  6:27   ` Christoph Hellwig
2017-06-19 14:56     ` Jens Axboe
2017-06-19 16:02       ` Jens Axboe
2017-06-19 18:58         ` Christoph Hellwig
2017-06-19 19:00           ` Jens Axboe
2017-06-19 19:10             ` Jens Axboe
2017-06-19 20:33               ` Jens Axboe
2017-06-20  2:06                 ` Jens Axboe
2017-06-20  8:57                 ` Christoph Hellwig
2017-06-20 12:43                   ` Jens Axboe
2017-06-20 12:43                     ` Christoph Hellwig
2017-06-20 12:45                       ` Jens Axboe
2017-06-20 12:47                         ` Christoph Hellwig
2017-06-20 12:51                           ` Jens Axboe
2017-06-20 12:56                             ` Christoph Hellwig
2017-06-20 13:00                               ` Jens Axboe
2017-06-16 17:24 [PATCHSET v6] Add support for " Jens Axboe
2017-06-16 17:24 ` [PATCH 04/11] fs: add support for allowing applications to pass in " Jens Axboe
2017-06-14 19:05 [PATCHSET v3] Add support for " Jens Axboe
2017-06-14 19:05 ` [PATCH 04/11] fs: add support for allowing applications to pass in " Jens Axboe
2017-06-14 20:26   ` Christoph Hellwig
2017-06-14 20:37     ` Jens Axboe

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=bb49b5a3-ac8e-84ce-1886-62deab29a3a4@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=adilger@dilger.ca \
    --cc=darrick.wong@oracle.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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.