All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Bean Huo (beanhuo)" <beanhuo@micron.com>,
	Jens Axboe <axboe@kernel.dk>,
	"Luca Porzio (lporzio)" <lporzio@micron.com>,
	Manjong Lee <mj0123.lee@samsung.com>,
	"david@fromorbit.com" <david@fromorbit.com>,
	"hch@lst.de" <hch@lst.de>,
	"kbusch@kernel.org" <kbusch@kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"sagi@grimberg.me" <sagi@grimberg.me>,
	"song@kernel.org" <song@kernel.org>,
	"seunghwan.hyun@samsung.com" <seunghwan.hyun@samsung.com>,
	"sookwan7.kim@samsung.com" <sookwan7.kim@samsung.com>,
	"nanich.lee@samsung.com" <nanich.lee@samsung.com>,
	"woosung2.lee@samsung.com" <woosung2.lee@samsung.com>,
	"yt0928.kim@samsung.com" <yt0928.kim@samsung.com>,
	"junho89.kim@samsung.com" <junho89.kim@samsung.com>,
	"jisoo2146.oh@samsung.com" <jisoo2146.oh@samsung.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [EXT] Re: [PATCH 2/2] block: remove the per-bio/request write hint.
Date: Thu, 10 Mar 2022 21:31:55 -0800	[thread overview]
Message-ID: <YireyyQvUnC7cik+@sol.localdomain> (raw)
In-Reply-To: <9d645cf0-1685-437a-23e4-b2a01553bba5@acm.org>

On Thu, Mar 10, 2022 at 02:18:19PM -0800, Bart Van Assche wrote:
> On 3/10/22 13:52, Bean Huo (beanhuo) wrote:
> > Yes, in upstream linux and upstream android, there is no such code. But as we know,
> > mobile customers have used bio->bi_write_hint in their products for years. And the
> > group ID is set according to bio->bi_write_hint before passing the CDB to UFS.
> > 
> > 
> > 	lrbp = &hba->lrb[tag];
> >                WARN_ON(lrbp->cmd);
> >               + if(cmd->cmnd[0] == WRITE_10)
> >                +{
> >                  +             cmd->cmnd[6] = (0x1f& cmd->request->bio->bi_write_hint);
> >                +}
> >                lrbp->cmd = cmd;
> >                lrbp->sense_bufflen = UFS_SENSE_SIZE;
> >                lrbp->sense_buffer = cmd->sense_buffer;
> > 
> > I don't know why they don't push these changes to the community, maybe
> > it's because changes across the file system and block layers are unacceptable to the
> > block layer and FS. but for sure we should now warn them to push to the
> > community as soon as possible.
> 
> Thanks Bean for having shared this information. I think the above code sets the GROUP
> NUMBER information in the WRITE(10) command and also that the following text from the
> UFS specification applies to that information:
> <quote>
> GROUP NUMBER: Notifies the Target device that the data linked to a ContextID:
>  -----------------------------------------------------------------------------------------
>     GROUP NUMBER Value     |  Function
>  -----------------------------------------------------------------------------------------
>  00000b                    | Default, no Context ID is associated with the read operation.
>  00001b to 01111b (0XXXXb) | Context ID. (XXXX I from 0001b to 1111b ‐ Context ID value)
>  10000b                    | Data has System Data characteristics
>  10001b to 11111b          | Reserved
>  -----------------------------------------------------------------------------------------
> 
> In case the GROUP NUMBER is set to a reserved value, the operation shall fail and a status
> response of CHECK CONDITION will be returned along with the sense key set to ILLEGAL REQUEST.
> </quote>
> 
> Since there is a desire to remove the write hint information from struct bio, is there
> any other information the "system data characteristics" information can be derived from?
> How about e.g. deriving that information from request flags like REQ_SYNC, REQ_META and/or
> REQ_IDLE?
> 

[+Cc linux-f2fs-devel]

I think the f2fs developers will need to chime in here, as it looks like f2fs
uses the write hints for different data categories like hot/cold/warm.  I'm not
sure those can be fully represented by other bio flags.

Either way, the good news is that it sounds like this "GROUP NUMBER" thing is
part of the UFS standard.  So whatever the best way to support it is, it can
just be submitted upstream like any other standard UFS feature.  Why hasn't that
been done?

- Eric

WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "woosung2.lee@samsung.com" <woosung2.lee@samsung.com>,
	"david@fromorbit.com" <david@fromorbit.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"seunghwan.hyun@samsung.com" <seunghwan.hyun@samsung.com>,
	"song@kernel.org" <song@kernel.org>, "hch@lst.de" <hch@lst.de>,
	"Bean Huo \(beanhuo\)" <beanhuo@micron.com>,
	"sagi@grimberg.me" <sagi@grimberg.me>,
	"jisoo2146.oh@samsung.com" <jisoo2146.oh@samsung.com>,
	"nanich.lee@samsung.com" <nanich.lee@samsung.com>,
	"yt0928.kim@samsung.com" <yt0928.kim@samsung.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"sookwan7.kim@samsung.com" <sookwan7.kim@samsung.com>,
	"kbusch@kernel.org" <kbusch@kernel.org>,
	Jaegeuk Kim <jaegeuk@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net,
	"junho89.kim@samsung.com" <junho89.kim@samsung.com>,
	Manjong Lee <mj0123.lee@samsung.com>
Subject: Re: [f2fs-dev] [EXT] Re: [PATCH 2/2] block: remove the per-bio/request write hint.
Date: Thu, 10 Mar 2022 21:31:55 -0800	[thread overview]
Message-ID: <YireyyQvUnC7cik+@sol.localdomain> (raw)
In-Reply-To: <9d645cf0-1685-437a-23e4-b2a01553bba5@acm.org>

On Thu, Mar 10, 2022 at 02:18:19PM -0800, Bart Van Assche wrote:
> On 3/10/22 13:52, Bean Huo (beanhuo) wrote:
> > Yes, in upstream linux and upstream android, there is no such code. But as we know,
> > mobile customers have used bio->bi_write_hint in their products for years. And the
> > group ID is set according to bio->bi_write_hint before passing the CDB to UFS.
> > 
> > 
> > 	lrbp = &hba->lrb[tag];
> >                WARN_ON(lrbp->cmd);
> >               + if(cmd->cmnd[0] == WRITE_10)
> >                +{
> >                  +             cmd->cmnd[6] = (0x1f& cmd->request->bio->bi_write_hint);
> >                +}
> >                lrbp->cmd = cmd;
> >                lrbp->sense_bufflen = UFS_SENSE_SIZE;
> >                lrbp->sense_buffer = cmd->sense_buffer;
> > 
> > I don't know why they don't push these changes to the community, maybe
> > it's because changes across the file system and block layers are unacceptable to the
> > block layer and FS. but for sure we should now warn them to push to the
> > community as soon as possible.
> 
> Thanks Bean for having shared this information. I think the above code sets the GROUP
> NUMBER information in the WRITE(10) command and also that the following text from the
> UFS specification applies to that information:
> <quote>
> GROUP NUMBER: Notifies the Target device that the data linked to a ContextID:
>  -----------------------------------------------------------------------------------------
>     GROUP NUMBER Value     |  Function
>  -----------------------------------------------------------------------------------------
>  00000b                    | Default, no Context ID is associated with the read operation.
>  00001b to 01111b (0XXXXb) | Context ID. (XXXX I from 0001b to 1111b ‐ Context ID value)
>  10000b                    | Data has System Data characteristics
>  10001b to 11111b          | Reserved
>  -----------------------------------------------------------------------------------------
> 
> In case the GROUP NUMBER is set to a reserved value, the operation shall fail and a status
> response of CHECK CONDITION will be returned along with the sense key set to ILLEGAL REQUEST.
> </quote>
> 
> Since there is a desire to remove the write hint information from struct bio, is there
> any other information the "system data characteristics" information can be derived from?
> How about e.g. deriving that information from request flags like REQ_SYNC, REQ_META and/or
> REQ_IDLE?
> 

[+Cc linux-f2fs-devel]

I think the f2fs developers will need to chime in here, as it looks like f2fs
uses the write hints for different data categories like hot/cold/warm.  I'm not
sure those can be fully represented by other bio flags.

Either way, the good news is that it sounds like this "GROUP NUMBER" thing is
part of the UFS standard.  So whatever the best way to support it is, it can
just be submitted upstream like any other standard UFS feature.  Why hasn't that
been done?

- Eric


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2022-03-11  5:32 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 17:55 [PATCH 1/2] nvme: remove support or stream based temperature hint Christoph Hellwig
2022-03-04 17:55 ` [PATCH 2/2] block: remove the per-bio/request write hint Christoph Hellwig
2022-03-04 19:24   ` Jens Axboe
2022-03-04 22:12   ` Dave Chinner
2022-03-05  5:19     ` Christoph Hellwig
2022-03-05  6:09       ` Number of parity disks Kengo.M
2022-03-05  8:56         ` Piergiorgio Sartor
2022-03-05 21:40       ` [PATCH 2/2] block: remove the per-bio/request write hint Dave Chinner
2022-03-05 23:55         ` Bart Van Assche
2022-03-06 17:11         ` Jens Axboe
2022-03-06 18:01           ` Christoph Hellwig
2022-03-06 18:06             ` Jens Axboe
2022-03-06 23:17               ` Dave Chinner
     [not found]                 ` <CGME20220309042324epcas1p111312e20f4429dc3a17172458284a923@epcas1p1.samsung.com>
2022-03-09 13:31                   ` Manjong Lee
2022-03-09  8:24                     ` Paul Menzel
2022-03-10 11:34                     ` [EXT] " Luca Porzio (lporzio)
2022-03-10 12:15                       ` Jens Axboe
2022-03-10 18:50                         ` Luca Porzio (lporzio)
2022-03-10 19:10                           ` Jens Axboe
2022-03-10 19:34                             ` Bart Van Assche
2022-03-10 21:52                               ` Bean Huo (beanhuo)
2022-03-10 22:10                                 ` Jens Axboe
2022-03-11 16:45                                   ` Bart Van Assche
2022-03-11 16:56                                     ` Jens Axboe
2022-03-14  7:40                                       ` Avi Shchislowski
2022-03-14  8:00                                         ` hch
2022-03-14 19:50                                         ` Eric Biggers
2022-03-14 19:58                                         ` [EXT] " Jens Axboe
2022-03-15 15:36                                           ` Luca Porzio (lporzio)
2022-03-15 15:44                                             ` Jens Axboe
2022-03-10 22:18                                 ` Bart Van Assche
2022-03-11  5:31                                   ` Eric Biggers [this message]
2022-03-11  5:31                                     ` [f2fs-dev] " Eric Biggers
2022-03-11  9:21                                   ` Luca Porzio (lporzio)
2022-03-10 14:21                       ` hch
2022-03-10 18:51                         ` Luca Porzio (lporzio)
2022-03-10 19:14                           ` hch
2022-03-11  5:06                           ` Eric Biggers
2022-03-11  9:23                             ` Luca Porzio (lporzio)
2022-03-04 19:34 ` [PATCH 1/2] nvme: remove support or stream based temperature hint Keith Busch
2022-03-04 19:36   ` Christoph Hellwig
2022-03-04 19:38     ` Jens Axboe
2022-03-04 20:20 ` 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=YireyyQvUnC7cik+@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=jaegeuk@kernel.org \
    --cc=jisoo2146.oh@samsung.com \
    --cc=junho89.kim@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-raid@vger.kernel.org \
    --cc=lporzio@micron.com \
    --cc=mj0123.lee@samsung.com \
    --cc=nanich.lee@samsung.com \
    --cc=sagi@grimberg.me \
    --cc=seunghwan.hyun@samsung.com \
    --cc=song@kernel.org \
    --cc=sookwan7.kim@samsung.com \
    --cc=woosung2.lee@samsung.com \
    --cc=yt0928.kim@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.