On Fri, Sep 01, 2017 at 08:07:04PM +, Bart Van Assche wrote:
> On Sat, 2017-09-02 at 02:49 +0800, Ming Lei wrote:
> > + if ((flags & BLK_MQ_REQ_PREEMPT) && blk_queue_is_freezing(q))
> > + blk_queue_enter_live(q);
> > + else
> > + ret = blk_queue_enter(q, !(gfp_mask & __G
This patch prevents that lockdep reports the following complaint:
==
WARNING: possible circular locking dependency detected
4.12.0-rc1-dbg+ #1 Not tainted
--
rmdir/12053 is trying to acquire loc
On Sat, 2017-09-02 at 02:49 +0800, Ming Lei wrote:
> + if ((flags & BLK_MQ_REQ_PREEMPT) && blk_queue_is_freezing(q))
> + blk_queue_enter_live(q);
> + else
> + ret = blk_queue_enter(q, !(gfp_mask & __GFP_DIRECT_RECLAIM));
Why did you repost this patch series without
Simply quiesing SCSI device and waiting for completeion of IO
dispatched to SCSI queue isn't safe, it is easy to use up
requests because all these allocated requests can't be dispatched
when device is put in QIUESCE. Then no request can be allocated
for RQF_PREEMPT, and system may hang somewhere, s
The two APIs are required to allow request allocation for
RQF_PREEMPT when queue is frozen.
The following two points have to be guaranteed for one queue:
1) preempt freezing can be started only after all pending
normal & preempt freezing are completed
2) normal freezing can't be started if there
REQF_PREEMPT is a bit special because it is required to be
dispatched to lld even when SCSI device is quiesced.
So this patch introduces __blk_get_request() to allow block
layer to allocate request when queue is frozen, since we
will freeze queue before quiescing SCSI device in the
following patch
This usage is basically same with blk-mq, so that we can
support to freeze queue easily.
Signed-off-by: Ming Lei
---
block/blk-core.c | 8
1 file changed, 8 insertions(+)
diff --git a/block/blk-core.c b/block/blk-core.c
index ce2d3b6f6c62..85b15833a7a5 100644
--- a/block/blk-core.c
+++
The only change on legacy is that blk_drain_queue() is run
from blk_freeze_queue(), which is called in blk_cleanup_queue().
So this patch removes the explicite __blk_drain_queue() in
blk_cleanup_queue().
Signed-off-by: Ming Lei
---
block/blk-core.c | 17 +++--
block/blk-mq.c
This patch just makes it explicitely.
Reviewed-by: Johannes Thumshirn
Signed-off-by: Ming Lei
---
block/blk-mq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 8cf1f7cbef2b..4c532d8612e1 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.
This APIs will be used by legacy path too.
Signed-off-by: Ming Lei
---
block/bfq-iosched.c | 2 +-
block/blk-cgroup.c | 4 ++--
block/blk-mq.c | 17 -
block/blk-mq.h | 1 -
block/elevator.c | 2 +-
drivers/block/loop.c | 8
Hi,
The current SCSI quiesce isn't safe and easy to trigger I/O deadlock.
Once SCSI device is put into QUIESCE, no new request except for RQF_PREEMPT
can be dispatched to SCSI successfully, and scsi_device_quiesce() just simply
waits for completion of I/Os dispatched to SCSI stack. It isn't enoug
We will support to freeze queue on block legacy path too.
Signed-off-by: Ming Lei
---
block/blk-cgroup.c | 4 ++--
block/blk-mq.c | 10 +-
block/elevator.c | 2 +-
drivers/block/loop.c | 8
drivers/nvme/host/core.c | 4 ++--
include/linux/blk-mq.h
Hi,
The current SCSI quiesce isn't safe and easy to trigger I/O deadlock.
Once SCSI device is put into QUIESCE, no new request except for RQF_PREEMPT
can be dispatched to SCSI successfully, and scsi_device_quiesce() just simply
waits for completion of I/Os dispatched to SCSI stack. It isn't enoug
Hi,
The current SCSI quiesce isn't safe and easy to trigger I/O deadlock.
Once SCSI device is put into QUIESCE, no new request except for RQF_PREEMPT
can be dispatched to SCSI successfully, and scsi_device_quiesce() just simply
waits for completion of I/Os dispatched to SCSI stack. It isn't enoug
We will support to freeze queue on block legacy path too.
Signed-off-by: Ming Lei
---
block/blk-cgroup.c | 4 ++--
block/blk-mq.c | 10 +-
block/elevator.c | 2 +-
drivers/block/loop.c | 8
drivers/nvme/host/core.c | 4 ++--
include/linux/blk-mq.h
On Fri, 2017-09-01 at 20:36 +0900, Damien Le Moal wrote:
> +static struct scsi_disk *__zoned_scsi_disk(struct request_queue *q)
> +{
> + struct scsi_device *sdp;
> + struct scsi_disk *sdkp;
> +
> + if (!blk_queue_is_zoned(q)) {
> + pr_err("zoned: Not a zoned block de
On Fri, Sep 01, 2017 at 03:43:39PM +, Bart Van Assche wrote:
> On Fri, 2017-09-01 at 11:55 +0800, Ming Lei wrote:
> > On Thu, Aug 31, 2017 at 10:50:25PM +, Bart Van Assche wrote:
> > > On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote:
> > > > @@ -1413,9 +1414,17 @@ static struct request
>
On Fri, 2017-09-01 at 20:36 +0900, Damien Le Moal wrote:
> In the case of a ZBC disk used with scsi-mq, zone write locking does
> not prevent write reordering in sequential zones. Unlike the legacy
> case, zone locking can only be done after the command request is
> removed from the scheduler dispa
On Fri, 2017-09-01 at 20:36 +0900, Damien Le Moal wrote:
> Zoned block devices have no write constraints for conventional zones
> so write locking of conventional zones is not necessary and can hurt
> performance. To avoid this, introduce the seq_zones bitmap to indicate
> if a zone is a sequential
On Fri, 2017-09-01 at 20:36 +0900, Damien Le Moal wrote:
> The three values starting at byte 8 of the Zoned Block Device
> Characteristics VPD page B6h are 32 bits values, not 64bits. So use
> get_unaligned_be32() to retrieve the values and not get_unaligned_be64()
Reviewed-by: Bart Van Assche
On Fri, 2017-09-01 at 20:36 +0900, Damien Le Moal wrote:
> Introduce sd_zbc.h for zbc related declarations (avoid cluttering sd.h).
>
> Fix comments style in sd_zbc.c (do not use documentation format) and
> add/fix comments to enhance explanations. Also remove a useless blank
> line in sd_zbc_read
On Fri, 2017-09-01 at 20:36 +0900, Damien Le Moal wrote:
> +/* Zone types of REPORT ZONES zone descriptors */
> +enum zbc_zone_type {
> + ZBC_ZONE_TYPE_CONV = 0x1,
> + ZBC_ZONE_TYPE_SEQWRITE_REQ = 0x2,
> + ZBC_ZONE_TYPE_SEQWRITE_PREF = 0x3,
> + /* 0x4 to 0xf ar
On Fri, Sep 01, 2017 at 06:59:15AM -0700, Tejun Heo wrote:
> Hello, Ming.
>
> > +/**
> > + * percpu_ref_is_dead - test whether a percpu refcount is killed
> > + * @ref: percpu_ref to test
> > + *
> > + * Returns %true if @ref is dead
> > + *
> > + * This function is safe to call as long as @ref is
On Fri, 2017-09-01 at 20:36 +0900, Damien Le Moal wrote:
> --- a/include/linux/blk-mq.h
> +++ b/include/linux/blk-mq.h
> @@ -284,6 +284,16 @@ void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set
> *set, int nr_hw_queues);
> void blk_mq_quiesce_queue_nowait(struct request_queue *q);
>
> /*
> +
On Fri, 2017-09-01 at 20:36 +0900, Damien Le Moal wrote:
> diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
> index 14542308d25b..a369174a9679 100644
> --- a/include/linux/blk-mq.h
> +++ b/include/linux/blk-mq.h
> @@ -5,6 +5,21 @@
> #include
> #include
>
> +#ifdef CONFIG_BLK_DEBUG
On Tue, Aug 29, 2017 at 04:41:13PM +0800, Li Wei wrote:
> add ufs node document for Hisilicon
>
> Signed-off-by: Li Wei
> ---
> Documentation/devicetree/bindings/ufs/ufs-hisi.txt | 35
> ++
> 1 file changed, 35 insertions(+)
> create mode 100644 Documentation/devicetree/bin
On Fri, 2017-09-01 at 06:59 -0700, Tejun Heo wrote:
> > +/**
> > + * percpu_ref_is_dead - test whether a percpu refcount is killed
> > + * @ref: percpu_ref to test
> > + *
> > + * Returns %true if @ref is dead
> > + *
> > + * This function is safe to call as long as @ref is between init and exit.
>
On Fri, 2017-09-01 at 11:55 +0800, Ming Lei wrote:
> On Thu, Aug 31, 2017 at 10:50:25PM +, Bart Van Assche wrote:
> > On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote:
> > > @@ -1413,9 +1414,17 @@ static struct request *blk_old_get_request(struct
> > > request_queue *q,
> > > /* create ioc
Hello, Ming.
> +/**
> + * percpu_ref_is_dead - test whether a percpu refcount is killed
> + * @ref: percpu_ref to test
> + *
> + * Returns %true if @ref is dead
> + *
> + * This function is safe to call as long as @ref is between init and exit.
> + */
> +static inline bool percpu_ref_is_dead(struc
On Fri, Sep 01, 2017 at 08:33:40PM +0800, Ming Lei wrote:
> Given it is the only case that blk_mq_run_hw_queues() is run on
> !q->mq_ops now, I suggest to check q->mq_ops outside, otherwise
> it can be a bit overkill.
Fair enough,
Reviewed-by: Johannes Thumshirn
--
Johannes Thumshirn
On Fri, Sep 01, 2017 at 10:16:34AM +0200, Johannes Thumshirn wrote:
> Hi Ming,
>
> On Fri, Sep 01, 2017 at 01:27:23AM +0800, Ming Lei wrote:
> > - blk_mq_run_hw_queues(q, false);
> > + if (q->mq_ops)
> > + blk_mq_run_hw_queues(q, false);
>
> What speaks again
Zoned block devices have no write constraints for conventional zones
so write locking of conventional zones is not necessary and can hurt
performance. To avoid this, introduce the seq_zones bitmap to indicate
if a zone is a sequential one. Use this information to allow any write
to be issued to con
The zoned I/O scheduler is mostly identical to mq-deadline and retains
the same configuration attributes. The main difference is that the
zoned scheduler will ensure that at any time at most only one write
request (command) per sequential zone is in flight (has been issued to
the disk) in order to
Move standard macro definitions for the zone types and zone conditions
to scsi_proto.h together with the definitions related to the
REPORT ZONES command.
While at it, define all values in the enums to be clear.
Signed-off-by: Damien Le Moal
---
drivers/scsi/sd_zbc.c | 18 --
In the case of a ZBC disk used with scsi-mq, zone write locking does
not prevent write reordering in sequential zones. Unlike the legacy
case, zone locking can only be done after the command request is
removed from the scheduler dispatch queue. That is, at the time of
zone locking, the write comman
The three values starting at byte 8 of the Zoned Block Device
Characteristics VPD page B6h are 32 bits values, not 64bits. So use
get_unaligned_be32() to retrieve the values and not get_unaligned_be64()
Fixes: 89d947561077 ("sd: Implement support for ZBC devices")
Cc:
Signed-off-by: Damien Le Mo
The functions blk_mq_sched_free_hctx_data(), blk_mq_sched_try_merge(),
blk_mq_sched_try_insert_merge() and blk_mq_sched_request_inserted() are
all exported symbols but declared only internally in
block/blk-mq-sched.h. Move their declaration to include/linux/blk-mq.h
to make them available to block
Introduce sd_zbc.h for zbc related declarations (avoid cluttering sd.h).
Fix comments style in sd_zbc.c (do not use documentation format) and
add/fix comments to enhance explanations. Also remove a useless blank
line in sd_zbc_read_zones().
Rearrange sd_zbc_setup() to include use_16_for_rw and us
__blk_mq_debugfs_rq_show() and blk_mq_debugfs_rq_show() are exported
symbols but declared in the block internal file block/blk-mq-debugfs.h.
Move the declaration of these functions to the public linux/blk-mq.h
file to make these functions available to other modules.
While at it, also move the defi
This series implements support for ZBC disks used through the blk-mq/scsi-mq
I/O path.
The current scsi level support of ZBC disks guarantees write request ordering
using a per-zone write lock which prevents issuing simultaneously multiple
write commands to a zone, doing so avoid reordering of seq
2017-08-30 18:55 GMT+02:00 Viswas G :
> Hi Jack,
>
> This is a customer requirement. Since the SAS addresses of all the phys were
> same , when the attached SAS addresses are different, it was forming only one
> domain. If we assign different SAS addresses, this will cause duplicate
> domain un
Martin,
On 9/1/17 12:36, Martin K. Petersen wrote:
>
> Damien,
>
>> +if (sdkp->max_ws_blocks &&
>> +sdkp->physical_block_size > logical_block_size) {
>> +/*
>> + * Reporting a maximum number of blocks that is not aligned
>> + * on the device physic
* Mpt3sas driver uses the NVMe Encapsulated Request message to
send an NVMe command to an NVMe device attached to the IOC.
* Normal I/O commands like reads and writes are passed to the
controller as SCSI commands and the controller has the ability
to translate the commands to NVMe equivalent.
* T
Hi Martin,
On Fri, Sep 1, 2017 at 8:52 AM, Martin K. Petersen
wrote:
>
> Hi Suganath,
>
>> Let me explain - NVME device fast path is possible in two ways. IEEE
>> SGL and PRP SGL. Due to h/w constraint we choose IEEE SGL only for
>> smaller IO size. Both above is true h/w Fast Path and no firmw
On Fri, Sep 01, 2017 at 02:00:48PM +0800, Dison River wrote:
> newFwSize = ALIGN(karg.newImageSize, 4);
This is an integer overflow, but it's harmless... As a static checker
developer this is where I would print a warning:
drivers/message/fusion/mptctl.c:1748 mptctl_replace_fw() warn: potenti
Hi Ming,
On Fri, Sep 01, 2017 at 01:27:23AM +0800, Ming Lei wrote:
> - blk_mq_run_hw_queues(q, false);
> + if (q->mq_ops)
> + blk_mq_run_hw_queues(q, false);
What speaks against putting the if (q->mq_ops) directly into
blk_mq_run_hw_queues() so we can't
Looks fine,
Reviewed-by: Christoph Hellwig
Looks good,
Reviewed-by: Johannes Thumshirn
--
Johannes Thumshirn Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG N
48 matches
Mail list logo