From: Jens Axboe <axboe@kernel.dk>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org,
Damien Le Moal <Damien.LeMoal@wdc.com>,
Christoph Hellwig <hch@lst.de>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH] block: soft limit zone-append sectors as well
Date: Wed, 7 Oct 2020 07:58:25 -0600 [thread overview]
Message-ID: <a04275e3-48e9-a2e7-c28e-8fce0827a06e@kernel.dk> (raw)
In-Reply-To: <2358a1f93c2c2f9f7564eb77334a7ea679453deb.1602062387.git.johannes.thumshirn@wdc.com>
On 10/7/20 3:20 AM, Johannes Thumshirn wrote:
> Martin rightfully noted that for normal filesystem IO we have soft limits
> in place, to prevent them from getting too big and not lead to
> unpredictable latencies. For zone append we only have the hardware limit
> in place.
>
> Cap the max sectors we submit via zone-append to the maximal number of
> sectors if the second limit is lower.
>
> Link: https://lore.kernel.org/linux-btrfs/yq1k0w8g3rw.fsf@ca-mkp.ca.oracle.com
> Reported-by: Martin K. Petersen <martin.petersen@oracle.com>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
> include/linux/blkdev.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index cf80e61b4c5e..967cd76f16d4 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -1406,7 +1406,10 @@ static inline unsigned int queue_max_segment_size(const struct request_queue *q)
>
> static inline unsigned int queue_max_zone_append_sectors(const struct request_queue *q)
> {
> - return q->limits.max_zone_append_sectors;
> +
> + struct queue_limits *l = q->limits;
> +
> + return min(l->max_zone_append_sectors, l->max_sectors);
As the test robot points out, this won't even compile... How much
testing did you do with this?
--
Jens Axboe
next prev parent reply other threads:[~2020-10-07 13:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 9:20 [PATCH] block: soft limit zone-append sectors as well Johannes Thumshirn
2020-10-07 11:21 ` Damien Le Moal
2020-10-07 11:40 ` kernel test robot
2020-10-07 12:14 ` Christoph Hellwig
2020-10-07 12:25 ` Martin K. Petersen
2020-10-07 12:28 ` Johannes Thumshirn
2020-10-07 13:58 ` Jens Axboe [this message]
2020-10-07 14:19 ` Johannes Thumshirn
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=a04275e3-48e9-a2e7-c28e-8fce0827a06e@kernel.dk \
--to=axboe@kernel.dk \
--cc=Damien.LeMoal@wdc.com \
--cc=hch@lst.de \
--cc=johannes.thumshirn@wdc.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox