Linux-f2fs-devel Archive on lore.kernel.org
 help / color / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Mike Snitzer <snitzer@redhat.com>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-block@vger.kernel.org, dm-devel@redhat.com,
	linux-scsi@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [f2fs-dev] [PATCH v2 8/9] scsi: sd_zbc: Cleanup sd_zbc_alloc_report_buffer()
Date: Mon, 11 Nov 2019 02:22:55 -0800
Message-ID: <20191111102255.GB727@infradead.org> (raw)
In-Reply-To: <20191111023930.638129-9-damien.lemoal@wdc.com>

On Mon, Nov 11, 2019 at 11:39:29AM +0900, Damien Le Moal wrote:
> There is no need to arbitrarily limit the size of a report zone to the
> number of zones defined by SD_ZBC_REPORT_MAX_ZONES. Rather, simply
> calculate the report buffer size needed for the requested number of
> zones without exceeding the device total number of zones. This buffer
> size limitation to the hardware maximum transfer size and page mapping
> capabilities is kept unchanged. Starting with this initial buffer size,
> the allocation is optimized by iterating over decreasing buffer size
> until the allocation succeeds (each iteration is allowed to fail fast
> using the __GFP_NORETRY flag). This ensures forward progress for zone
> reports and avoids failures of zones revalidation under memory pressure.
> 
> While at it, also replace the hard coded 512 B sector size with the
> SECTOR_SIZE macro.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>

Looks fine even with the __vmalloc usage:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

  parent reply index

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11  2:39 [f2fs-dev] [PATCH v2 0/9] Zoned block device enhancements and zone report rework Damien Le Moal
2019-11-11  2:39 ` [f2fs-dev] [PATCH v2 1/9] block: Enhance blk_revalidate_disk_zones() Damien Le Moal
2019-11-11  2:39 ` [f2fs-dev] [PATCH v2 2/9] block: cleanup the !zoned case in blk_revalidate_disk_zones Damien Le Moal
2019-11-11  2:39 ` [f2fs-dev] [PATCH v2 3/9] block: Simplify report zones execution Damien Le Moal
2019-11-11  2:39 ` [f2fs-dev] [PATCH v2 4/9] block: Remove partition support for zoned block devices Damien Le Moal
2019-11-11  6:55   ` Hannes Reinecke
2019-11-11  2:39 ` [f2fs-dev] [PATCH v2 5/9] null_blk: clean up the block device operations Damien Le Moal
2019-11-11  2:39 ` [f2fs-dev] [PATCH v2 6/9] null_blk: clean up report zones Damien Le Moal
2019-11-11  2:39 ` [f2fs-dev] [PATCH v2 7/9] null_blk: Add zone_nr_conv to features Damien Le Moal
2019-11-11  2:39 ` [f2fs-dev] [PATCH v2 8/9] scsi: sd_zbc: Cleanup sd_zbc_alloc_report_buffer() Damien Le Moal
2019-11-11  6:56   ` Hannes Reinecke
2019-11-11 10:22   ` Christoph Hellwig [this message]
2019-11-13  1:46   ` Martin K. Petersen
2019-11-11  2:39 ` [f2fs-dev] [PATCH v2 9/9] block: rework zone reporting Damien Le Moal
2019-11-13  2:16 ` [f2fs-dev] [PATCH v2 0/9] Zoned block device enhancements and zone report rework Jens Axboe
2019-11-13  2:40   ` Damien Le Moal
2019-11-13  7:06   ` Christoph Hellwig

Reply instructions:

You may reply publically 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=20191111102255.GB727@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@wdc.com \
    --cc=dm-devel@redhat.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=snitzer@redhat.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

Linux-f2fs-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-f2fs-devel/0 linux-f2fs-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-f2fs-devel linux-f2fs-devel/ https://lore.kernel.org/linux-f2fs-devel \
		linux-f2fs-devel@lists.sourceforge.net
	public-inbox-index linux-f2fs-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/net.sourceforge.lists.linux-f2fs-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git