RE: [PATCH v2] block: fix rdma queue mapping

2018-10-29 Thread Saleem, Shiraz
>Subject: Re: [PATCH v2] block: fix rdma queue mapping > > >> Sagi - From what I can tell, i40iw is also exposed to this same issue >> if the IRQ affinity is configured by user. > >managed affinity does not allow setting smp_affinity from userspace. OK. But our device IRQs are not set-up as to be

Re: [PATCH blktests] Fix build failure for discontiguous-io on 32-bit platforms

2018-10-29 Thread Theodore Y. Ts'o
On Mon, Oct 29, 2018 at 02:32:34PM -0700, Bart Van Assche wrote: > > Well the potential integer truncation that could happen is here: > > > > case 'l': len = strtoul(optarg, NULL, 0); break; > > If the data type of 'len' would be changed into unsigned long, how could that >

Re: [PATCH blktests] Fix build failure for discontiguous-io on 32-bit platforms

2018-10-29 Thread Bart Van Assche
On Mon, 2018-10-29 at 17:08 -0400, Theodore Y. Ts'o wrote: > On Mon, Oct 29, 2018 at 09:26:43AM -0700, Bart Van Assche wrote: > > > > Have you considered to change the data type of 'len' from size_t into > > unsigned long > > instead of inserting this cast? That would make it clear that no

Re: [PATCH blktests] Fix build failure for discontiguous-io on 32-bit platforms

2018-10-29 Thread Theodore Y. Ts'o
On Mon, Oct 29, 2018 at 09:26:43AM -0700, Bart Van Assche wrote: > > Have you considered to change the data type of 'len' from size_t into > unsigned long > instead of inserting this cast? That would make it clear that no integer > truncation > happens in the iov.append() call. Well the

Re: [PATCH 23/28] block: kill lld busy

2018-10-29 Thread Jens Axboe
On 10/29/18 9:51 AM, Mike Snitzer wrote: > On Mon, Oct 29 2018 at 10:25am -0400, > Jens Axboe wrote: > >> On 10/29/18 1:10 AM, Hannes Reinecke wrote: >>> On 10/25/18 11:10 PM, Jens Axboe wrote: Nobody sets the helper, so we always return 0. Kill it. Signed-off-by: Jens Axboe

Re: [PATCH blktests] Fix build failure for discontiguous-io on 32-bit platforms

2018-10-29 Thread Bart Van Assche
On Mon, 2018-10-29 at 12:15 -0400, Theodore Ts'o wrote: > Signed-off-by: Theodore Ts'o > --- > src/discontiguous-io.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/discontiguous-io.cpp b/src/discontiguous-io.cpp > index 5e0ee0f..a59c18d 100644 > ---

[PATCH blktests] Add use of logger so that syslog files show when each test starts

2018-10-29 Thread Theodore Ts'o
Signed-off-by: Theodore Ts'o --- check | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check b/check index f6c3537..ebd87c0 100755 --- a/check +++ b/check @@ -319,6 +319,7 @@ _call_test() { local dmesg_marker="" CHECK_DMESG=0 fi + $LOGGER_PROG

[PATCH blktests] Fix build failure for discontiguous-io on 32-bit platforms

2018-10-29 Thread Theodore Ts'o
Signed-off-by: Theodore Ts'o --- src/discontiguous-io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discontiguous-io.cpp b/src/discontiguous-io.cpp index 5e0ee0f..a59c18d 100644 --- a/src/discontiguous-io.cpp +++ b/src/discontiguous-io.cpp @@ -291,7 +291,7 @@ int

Re: [PATCH] null_blk: Add conventional zone configuration for zoned support

2018-10-29 Thread Jens Axboe
On 10/29/18 5:11 AM, Matias Bjorling wrote: > Looks good to me. One nitpick, might be better to rename the sysfs > attribute nr_conv_zones to zone_nr_conv or similar to keep the zone > attributes grouped together. Yeah I agree, that's the only real way to inject some sanity into having a

[PATCH V2 3/3] block: make sure writesame bio is aligned with logical block size

2018-10-29 Thread Ming Lei
Obviously the created writesame bio has to be aligned with logical block size, and use bio_allowed_max_sectors() to retrieve this number. Fixes: b49a0871be31a745b2ef ("block: remove split code in blkdev_issue_{discard,write_same}") Cc: Rui Salvaterra Cc: sta...@vger.kernel.org Cc: Mike Snitzer

[PATCH V2 2/3] block: cleanup __blkdev_issue_discard()

2018-10-29 Thread Ming Lei
Cleanup __blkdev_issue_discard() a bit: - remove local variable of 'end_sect' - remove code block of 'fail' Cc: Rui Salvaterra Cc: Mike Snitzer Cc: Christoph Hellwig Cc: Xiao Ni Cc: Mariusz Dabrowski Signed-off-by: Ming Lei --- block/blk-lib.c | 23 ++- 1 file changed,

[PATCH V2 0/3] block: make sure discard/writesame bio is aligned with logical block size

2018-10-29 Thread Ming Lei
Hi, The 1st & 3rd patch fixes bio size alignment issue. The 2nd patch cleans up __blkdev_issue_discard() a bit. V2: - introduce helper of bio_allowed_max_sectors() - add commit log for patch 2 Ming Lei (3): block: make sure discard bio is aligned with logical block size

[PATCH V2 1/3] block: make sure discard bio is aligned with logical block size

2018-10-29 Thread Ming Lei
Obviously the created discard bio has to be aligned with logical block size. This patch introduces the helper of bio_allowed_max_sectors() for this purpose. Fixes: 744889b7cbb56a6 ("block: don't deal with discard limit in blkdev_issue_discard()") Fixes: a22c4d7e34402cc ("block: re-add

Re: [PATCH v2 4/5] lightnvm: Disable interleaved metadata

2018-10-29 Thread Javier Gonzalez
> On 22 Oct 2018, at 12.36, Igor Konopko wrote: > > Currently pblk and lightnvm does only check for size > of OOB metadata and does not care wheather this meta > is located in separate buffer or is interleaved with > data in single buffer. > > In reality only the first scenario is supported,

Re: [PATCH v2 3/5] lightnvm: Flexible DMA pool entry size

2018-10-29 Thread Javier Gonzalez
> On 22 Oct 2018, at 12.36, Igor Konopko wrote: > > Currently whole lightnvm and pblk uses single DMA pool, > for which entry size is always equal to PAGE_SIZE. > PPA list always needs 8b*64, so there is only 56b*64 > space for OOB meta. Since NVMe OOB meta can be bigger, > such as 128b, this

Re: [PATCH] null_blk: Add conventional zone configuration for zoned support

2018-10-29 Thread Matias Bjorling
On 10/22/2018 01:25 PM, Masato Suzuki wrote: > Allow the creation of conventional zones by adding the nr_conv_zones > configuration attribute. This new attribute is used only for zoned devices and > indicates the number of conventional zones to create. The default value is 0. > Since host-managed

Re: [PATCH v2 2/5] lightnvm: pblk: Helpers for OOB metadata

2018-10-29 Thread Javier Gonzalez
> On 22 Oct 2018, at 12.36, Igor Konopko wrote: > > Currently pblk assumes that size of OOB metadata on drive is always > equal to size of pblk_sec_meta struct. This commit add helpers which will > allow to handle different sizes of OOB metadata on drive. Probably want to mention the constrain

Re: [PATCH v2 1/5] lightnvm: pblk: Move lba list to partial read context

2018-10-29 Thread Javier Gonzalez
> On 22 Oct 2018, at 12.36, Igor Konopko wrote: > > Currently DMA allocated memory is reused on partial read > for lba_list_mem and lba_list_media arrays. In preparation > for dynamic DMA pool sizes we need to move this arrays > into pblk_pr_ctx structures. > > Signed-off-by: Igor Konopko >

Re: [PATCH 01/14] blk-mq: kill q->mq_map

2018-10-29 Thread jianchao.wang
On 10/29/18 11:00 AM, Jens Axboe wrote: > On 10/28/18 8:40 PM, jianchao.wang wrote: >> >> >> On 10/29/18 10:02 AM, jianchao.wang wrote: >>> Hi Jens >>> >>> On 10/28/18 12:52 AM, Jens Axboe wrote: On 10/27/18 10:48 AM, Jens Axboe wrote: > On 10/27/18 8:19 AM, jianchao.wang wrote: >>

Re: [PATCH] null_blk: Add conventional zone configuration for zoned support

2018-10-29 Thread Damien Le Moal
On 2018/10/22 20:25, Masato Suzuki wrote: > Allow the creation of conventional zones by adding the nr_conv_zones > configuration attribute. This new attribute is used only for zoned devices and > indicates the number of conventional zones to create. The default value is 0. > Since host-managed

Re: [PATCH 14/14] nvme: add separate poll queue map

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: Adds support for defining a variable number of poll queues, currently configurable with the 'poll_queues' module parameter. Defaults to a single poll queue. And now we finally have poll support without triggering interrupts! Signed-off-by: Jens Axboe

Re: [PATCH 13/14] block: add REQ_HIPRI and inherit it from IOCB_HIPRI

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: We use IOCB_HIPRI to poll for IO in the caller instead of scheduling. This information is not available for (or after) IO submission. The driver may make different queue choices based on the type of IO, so make the fact that we will poll for this IO known

Re: [PATCH 12/14] nvme: utilize two queue maps, one for reads and one for writes

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: NVMe does round-robin between queues by default, which means that sharing a queue map for both reads and writes can be problematic in terms of read servicing. It's much easier to flood the queue with writes and reduce the read servicing. Implement two

Re: [PATCH 10/14] blk-mq: initial support for multiple queue maps

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: Add a queue offset to the tag map. This enables users to map iteratively, for each queue map type they support. Bump maximum number of supported maps to 2, we're now fully able to support more than 1 map. Signed-off-by: Jens Axboe ---

Re: [PATCH 09/14] blk-mq: ensure that plug lists don't straddle hardware queues

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: Since we insert per hardware queue, we have to ensure that every request on the plug list being inserted belongs to the same hardware queue. Signed-off-by: Jens Axboe --- block/blk-mq.c | 27 +-- 1 file changed, 25

Re: [PATCH 08/14] blk-mq: separate number of hardware queues from nr_cpu_ids

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: With multiple maps, nr_cpu_ids is no longer the maximum number of hardware queues we support on a given devices. The initializer of the tag_set can have set ->nr_hw_queues larger than the available number of CPUs, since we can exceed that with multiple

Re: [PATCH 07/14] blk-mq: support multiple hctx maps

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: Add support for the tag set carrying multiple queue maps, and for the driver to inform blk-mq how many it wishes to support through setting set->nr_maps. This adds an mq_ops helper for drivers that support more than 1 map, mq_ops->flags_to_type(). The

Re: [PATCH 06/14] blk-mq: add 'type' attribute to the sysfs hctx directory

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: It can be useful for a user to verify what type a given hardware queue is, expose this information in sysfs. Signed-off-by: Jens Axboe --- block/blk-mq-sysfs.c | 10 ++ 1 file changed, 10 insertions(+) Reviewed-by: Hannes Reinecke Cheers,

Re: [PATCH 05/14] blk-mq: allow software queue to map to multiple hardware queues

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: The mapping used to be dependent on just the CPU location, but now it's a tuple of { type, cpu} instead. This is a prep patch for allowing a single software queue to map to multiple hardware queues. No functional changes in this patch. Signed-off-by: Jens

Re: [PATCH 04/14] blk-mq: pass in request/bio flags to queue mapping

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: Prep patch for being able to place request based not just on CPU location, but also on the type of request. Signed-off-by: Jens Axboe --- block/blk-flush.c | 7 +++--- block/blk-mq-debugfs.c | 4 +++- block/blk-mq-sched.c | 16 ++

Re: [PATCH 03/14] blk-mq: provide dummy blk_mq_map_queue_type() helper

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: Doesn't do anything right now, but it's needed as a prep patch to get the interfaces right. Signed-off-by: Jens Axboe --- block/blk-mq.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/blk-mq.h b/block/blk-mq.h index

Re: [PATCH 02/14] blk-mq: abstract out queue map

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: This is in preparation for allowing multiple sets of maps per queue, if so desired. Signed-off-by: Jens Axboe --- block/blk-mq-cpumap.c | 10 block/blk-mq-pci.c| 10 block/blk-mq-rdma.c

Re: [PATCH 01/14] blk-mq: kill q->mq_map

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: It's just a pointer to set->mq_map, use that instead. Signed-off-by: Jens Axboe --- block/blk-mq.c | 13 - block/blk-mq.h | 4 +++- include/linux/blkdev.h | 2 -- 3 files changed, 7 insertions(+), 12 deletions(-)