From: Christoph Hellwig <hch@lst.de>
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: Christoph Hellwig <hch@lst.de>,
axboe@kernel.dk, kbusch@kernel.org, sagi@grimberg.me,
martin.petersen@oracle.com,
James.Bottomley@HansenPartnership.com, brauner@kernel.org,
viro@zeniv.linux.org.uk, jack@suse.cz, jaegeuk@kernel.org,
jlayton@kernel.org, chuck.lever@oracle.com, bvanassche@acm.org,
linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
gost.dev@samsung.com, vishak.g@samsung.com,
javier.gonz@samsung.com, Nitesh Shetty <nj.shetty@samsung.com>
Subject: Re: [PATCH v5 4/5] sd: limit to use write life hints
Date: Wed, 18 Sep 2024 08:42:58 +0200 [thread overview]
Message-ID: <20240918064258.GA32627@lst.de> (raw)
In-Reply-To: <b438dddd-f940-dd2b-2a6c-a2dbbc4ee67f@samsung.com>
> > If the device (or file system, which really needs to be in control
> > for actual files vs just block devices) does not support all 256
> > we need to reduce them to less than that. The kernel can help with
> > that a bit if the streams have meanings (collapsing temperature levels
> > that are close), but not at all if they don't have meanings.
>
> Current patch (nvme) does what you mentioned above.
> Pasting the fragment that maps potentially large placement-hints to the
> last valid placement-id.
>
> +static inline void nvme_assign_placement_id(struct nvme_ns *ns,
> + struct request *req,
> + struct nvme_command *cmd)
> +{
> + u8 h = umin(ns->head->nr_plids - 1,
> + WRITE_PLACEMENT_HINT(req->write_hint));
> +
> + cmd->rw.control |= cpu_to_le16(NVME_RW_DTYPE_DPLCMT);
> + cmd->rw.dsmgmt |= cpu_to_le32(ns->head->plids[h] << 16);
> +}
>
> But this was just an implementation choice (and not a failure avoidance
> fallback).
And it completely fucks thing up as I said. If I have an application
that wants to separate streams I need to know how many stream I
have available, and not fold all higher numbers into the last one
available.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: vishak.g@samsung.com, jack@suse.cz,
linux-nvme@lists.infradead.org,
James.Bottomley@HansenPartnership.com,
Christoph Hellwig <hch@lst.de>,
sagi@grimberg.me, linux-scsi@vger.kernel.org,
gost.dev@samsung.com, Nitesh Shetty <nj.shetty@samsung.com>,
linux-block@vger.kernel.org, viro@zeniv.linux.org.uk,
kbusch@kernel.org, jaegeuk@kernel.org, bvanassche@acm.org,
axboe@kernel.dk, brauner@kernel.org, martin.petersen@oracle.com,
jlayton@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
chuck.lever@oracle.com, linux-fsdevel@vger.kernel.org,
javier.gonz@samsung.com
Subject: Re: [f2fs-dev] [PATCH v5 4/5] sd: limit to use write life hints
Date: Wed, 18 Sep 2024 08:42:58 +0200 [thread overview]
Message-ID: <20240918064258.GA32627@lst.de> (raw)
In-Reply-To: <b438dddd-f940-dd2b-2a6c-a2dbbc4ee67f@samsung.com>
> > If the device (or file system, which really needs to be in control
> > for actual files vs just block devices) does not support all 256
> > we need to reduce them to less than that. The kernel can help with
> > that a bit if the streams have meanings (collapsing temperature levels
> > that are close), but not at all if they don't have meanings.
>
> Current patch (nvme) does what you mentioned above.
> Pasting the fragment that maps potentially large placement-hints to the
> last valid placement-id.
>
> +static inline void nvme_assign_placement_id(struct nvme_ns *ns,
> + struct request *req,
> + struct nvme_command *cmd)
> +{
> + u8 h = umin(ns->head->nr_plids - 1,
> + WRITE_PLACEMENT_HINT(req->write_hint));
> +
> + cmd->rw.control |= cpu_to_le16(NVME_RW_DTYPE_DPLCMT);
> + cmd->rw.dsmgmt |= cpu_to_le32(ns->head->plids[h] << 16);
> +}
>
> But this was just an implementation choice (and not a failure avoidance
> fallback).
And it completely fucks thing up as I said. If I have an application
that wants to separate streams I need to know how many stream I
have available, and not fold all higher numbers into the last one
available.
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2024-09-18 6:43 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240910151040epcas5p3f47fa7ea37a35f8b44dd9174689e1bb9@epcas5p3.samsung.com>
2024-09-10 15:01 ` [PATCH v5 0/5] data placement hints and FDP Kanchan Joshi
2024-09-10 15:01 ` [f2fs-dev] " Kanchan Joshi
2024-09-10 15:01 ` [PATCH v5 1/5] fs, block: refactor enum rw_hint Kanchan Joshi
2024-09-10 15:01 ` [f2fs-dev] " Kanchan Joshi
2024-09-12 12:53 ` Christoph Hellwig
2024-09-12 12:53 ` [f2fs-dev] " Christoph Hellwig
2024-09-12 15:50 ` Kanchan Joshi
2024-09-12 15:50 ` [f2fs-dev] " Kanchan Joshi
2024-09-12 20:30 ` Bart Van Assche
2024-09-12 20:30 ` [f2fs-dev] " Bart Van Assche via Linux-f2fs-devel
2024-09-13 7:22 ` Kanchan Joshi
2024-09-13 7:22 ` [f2fs-dev] " Kanchan Joshi
2024-09-10 15:01 ` [PATCH v5 2/5] fcntl: rename rw_hint_* to rw_lifetime_hint_* Kanchan Joshi
2024-09-10 15:01 ` [f2fs-dev] " Kanchan Joshi
2024-09-12 12:54 ` Christoph Hellwig
2024-09-12 12:54 ` [f2fs-dev] " Christoph Hellwig
2024-09-12 15:51 ` Kanchan Joshi
2024-09-12 15:51 ` [f2fs-dev] " Kanchan Joshi
2024-09-10 15:01 ` [PATCH v5 3/5] fcntl: add F_{SET/GET}_RW_HINT_EX Kanchan Joshi
2024-09-10 15:01 ` [f2fs-dev] " Kanchan Joshi
2024-09-10 18:48 ` Jens Axboe
2024-09-10 18:48 ` [f2fs-dev] " Jens Axboe
2024-09-11 15:50 ` Kanchan Joshi
2024-09-11 15:50 ` [f2fs-dev] " Kanchan Joshi
2024-09-12 13:01 ` Christoph Hellwig
2024-09-12 13:01 ` [f2fs-dev] " Christoph Hellwig
2024-09-12 15:53 ` Kanchan Joshi
2024-09-12 15:53 ` [f2fs-dev] " Kanchan Joshi
2024-09-12 20:36 ` Bart Van Assche
2024-09-12 20:36 ` [f2fs-dev] " Bart Van Assche via Linux-f2fs-devel
2024-09-13 7:15 ` Kanchan Joshi
2024-09-13 7:15 ` [f2fs-dev] " Kanchan Joshi
2024-09-10 15:01 ` [PATCH v5 4/5] sd: limit to use write life hints Kanchan Joshi
2024-09-10 15:01 ` [f2fs-dev] " Kanchan Joshi
2024-09-12 13:02 ` Christoph Hellwig
2024-09-12 13:02 ` [f2fs-dev] " Christoph Hellwig
2024-09-12 16:31 ` Kanchan Joshi
2024-09-12 16:31 ` [f2fs-dev] " Kanchan Joshi
2024-09-13 8:06 ` Christoph Hellwig
2024-09-13 8:06 ` [f2fs-dev] " Christoph Hellwig
2024-09-16 13:49 ` Kanchan Joshi
2024-09-16 13:49 ` [f2fs-dev] " Kanchan Joshi
2024-09-17 6:20 ` Christoph Hellwig
2024-09-17 6:20 ` [f2fs-dev] " Christoph Hellwig
2024-09-17 16:03 ` Kanchan Joshi
2024-09-17 16:03 ` [f2fs-dev] " Kanchan Joshi
2024-09-17 17:00 ` Kanchan Joshi
2024-09-17 17:00 ` [f2fs-dev] " Kanchan Joshi
2024-09-18 6:42 ` Christoph Hellwig [this message]
2024-09-18 6:42 ` Christoph Hellwig
2024-09-18 8:12 ` Kanchan Joshi
2024-09-18 8:12 ` [f2fs-dev] " Kanchan Joshi
2024-09-18 12:01 ` Christoph Hellwig
2024-09-18 12:01 ` [f2fs-dev] " Christoph Hellwig
2024-09-24 9:24 ` Kanchan Joshi
2024-09-24 9:24 ` [f2fs-dev] " Kanchan Joshi
2024-09-24 9:28 ` Christoph Hellwig
2024-09-24 9:28 ` [f2fs-dev] " Christoph Hellwig
2024-09-10 15:02 ` [PATCH v5 5/5] nvme: enable FDP support Kanchan Joshi
2024-09-10 15:02 ` [f2fs-dev] " Kanchan Joshi
2025-01-29 0:56 ` [f2fs-dev] [PATCH v5 0/5] data placement hints and FDP patchwork-bot+f2fs
2025-01-29 0:56 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
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=20240918064258.GA32627@lst.de \
--to=hch@lst.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=bvanassche@acm.org \
--cc=chuck.lever@oracle.com \
--cc=gost.dev@samsung.com \
--cc=jack@suse.cz \
--cc=jaegeuk@kernel.org \
--cc=javier.gonz@samsung.com \
--cc=jlayton@kernel.org \
--cc=joshi.k@samsung.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nj.shetty@samsung.com \
--cc=sagi@grimberg.me \
--cc=viro@zeniv.linux.org.uk \
--cc=vishak.g@samsung.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.