All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Christoph Hellwig <hch@lst.de>, Keith Busch <keith.busch@intel.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH 4/4] nvme: support ranged discard requests
Date: Wed, 15 Feb 2017 12:42:02 +0200	[thread overview]
Message-ID: <ee295e42-4f8b-ebf3-f750-a30e4b69f914@grimberg.me> (raw)
In-Reply-To: <20170207193439.GA26834@lst.de>



On 07/02/17 21:34, Christoph Hellwig wrote:
> On Tue, Feb 07, 2017 at 01:34:54PM -0500, Keith Busch wrote:
>> On Tue, Feb 07, 2017 at 05:46:58PM +0100, Christoph Hellwig wrote:
>>> @@ -1233,6 +1243,8 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
>>>  	if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
>>>  		vwc = true;
>>>  	blk_queue_write_cache(q, vwc, vwc);
>>> +	blk_queue_max_discard_segments(q,
>>> +			PAGE_SIZE / sizeof(struct nvme_dsm_range));
>>
>> We need to use ctrl->page_size rather than PAGE_SIZE.
>
> We need the PAGE_SIZE upper bound because the "special" bvec only
> allows a single page payload.

Shouldn't this be enforced in blk_queue_max_discard_segments() then?

WARNING: multiple messages have this Message-ID (diff)
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH 4/4] nvme: support ranged discard requests
Date: Wed, 15 Feb 2017 12:42:02 +0200	[thread overview]
Message-ID: <ee295e42-4f8b-ebf3-f750-a30e4b69f914@grimberg.me> (raw)
In-Reply-To: <20170207193439.GA26834@lst.de>



On 07/02/17 21:34, Christoph Hellwig wrote:
> On Tue, Feb 07, 2017@01:34:54PM -0500, Keith Busch wrote:
>> On Tue, Feb 07, 2017@05:46:58PM +0100, Christoph Hellwig wrote:
>>> @@ -1233,6 +1243,8 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
>>>  	if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
>>>  		vwc = true;
>>>  	blk_queue_write_cache(q, vwc, vwc);
>>> +	blk_queue_max_discard_segments(q,
>>> +			PAGE_SIZE / sizeof(struct nvme_dsm_range));
>>
>> We need to use ctrl->page_size rather than PAGE_SIZE.
>
> We need the PAGE_SIZE upper bound because the "special" bvec only
> allows a single page payload.

Shouldn't this be enforced in blk_queue_max_discard_segments() then?

  reply	other threads:[~2017-02-15 10:42 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 16:46 support for multi-range discard requests Christoph Hellwig
2017-02-07 16:46 ` Christoph Hellwig
2017-02-07 16:46 ` [PATCH 1/4] block: move req_set_nomerge to blk.h Christoph Hellwig
2017-02-07 16:46   ` Christoph Hellwig
2017-02-15 10:29   ` Sagi Grimberg
2017-02-15 10:29     ` Sagi Grimberg
2017-02-07 16:46 ` [PATCH 2/4] block: enumify ELEVATOR_*_MERGE Christoph Hellwig
2017-02-07 16:46   ` Christoph Hellwig
2017-02-15 10:31   ` Sagi Grimberg
2017-02-15 10:31     ` Sagi Grimberg
2017-02-07 16:46 ` [PATCH 3/4] block: optionally merge discontiguous discard bios into a single request Christoph Hellwig
2017-02-07 16:46   ` Christoph Hellwig
2017-02-08 10:54   ` Ming Lei
2017-02-08 10:54     ` Ming Lei
2017-02-08 11:57     ` Christoph Hellwig
2017-02-08 11:57       ` Christoph Hellwig
2017-02-15 10:36   ` Sagi Grimberg
2017-02-15 10:36     ` Sagi Grimberg
2017-02-07 16:46 ` [PATCH 4/4] nvme: support ranged discard requests Christoph Hellwig
2017-02-07 16:46   ` Christoph Hellwig
2017-02-07 18:34   ` Keith Busch
2017-02-07 18:34     ` Keith Busch
2017-02-07 19:34     ` Christoph Hellwig
2017-02-07 19:34       ` Christoph Hellwig
2017-02-15 10:42       ` Sagi Grimberg [this message]
2017-02-15 10:42         ` Sagi Grimberg
2017-02-08 13:13 support for multi-range discard requests V2 Christoph Hellwig
2017-02-08 13:13 ` [PATCH 4/4] nvme: support ranged discard requests Christoph Hellwig
2017-02-08 13:13   ` Christoph Hellwig
2017-02-08 13:32   ` Andrey Kuzmin
2017-02-08 13:36     ` Christoph Hellwig
2017-02-08 13:36       ` Christoph Hellwig
2017-02-08 13:46 support for multi-range discard requests V3 Christoph Hellwig
2017-02-08 13:46 ` [PATCH 4/4] nvme: support ranged discard requests Christoph Hellwig
2017-02-08 13:46   ` Christoph Hellwig
2017-02-15 10:45   ` Sagi Grimberg
2017-02-15 10:45     ` Sagi Grimberg

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=ee295e42-4f8b-ebf3-f750-a30e4b69f914@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /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.