Re: [PATCH rfc 2/5] irq-am: add some debugfs exposure on tuning state

2018-02-06 Thread kbuild test robot
Hi Sagi, I love your patch! Yet something to improve: [auto build test ERROR on v4.15] [also build test ERROR on next-20180206] [cannot apply to linus/master rdma/for-next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

[PATCH 6/6] blockdev: Avoid two active bdev inodes for one device

2018-02-06 Thread Jan Kara
When blkdev_open() races with device removal and creation it can happen that unhashed bdev inode gets associated with newly created gendisk like: CPU0CPU1 blkdev_open() bdev = bd_acquire() del_gendisk()

[PATCH 3/6] genhd: Add helper put_disk_and_module()

2018-02-06 Thread Jan Kara
Add a proper counterpart to get_disk_and_module() - put_disk_and_module(). Currently it is opencoded in several places. Signed-off-by: Jan Kara --- block/blk-cgroup.c| 11 ++- block/genhd.c | 20 fs/block_dev.c| 19

[PATCH 2/6] genhd: Rename get_disk() to get_disk_and_module()

2018-02-06 Thread Jan Kara
Rename get_disk() to get_disk_and_module() to make sure what the function does. It's not a great name but at least it is now clear that put_disk() is not it's counterpart. Signed-off-by: Jan Kara --- block/genhd.c | 10 -- drivers/block/amiflop.c | 2 +-

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Paolo Valente
> Il giorno 06 feb 2018, alle ore 14:40, Holger Hoffstätte > ha scritto: > > > The plot thickens! > Yep, the culprit seems clearer, though ... > Just as I was about to post that I didn't have any problems - because > I didn't have any - I decided to do a

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Oleksandr Natalenko
Hi. 06.02.2018 15:50, Paolo Valente wrote: Could you please do a gdb /block/bfq-iosched.o # or vmlinux.o if bfq is builtin list *(bfq_finish_requeue_request+0x54) list *(bfq_put_queue+0x10b) for me? Fresh crashes and gdb output are given below. A side note: it is harder to trigger things on

Re: [PATCH rfc 0/5] generic adaptive IRQ moderation library for I/O devices

2018-02-06 Thread Sagi Grimberg
Hey Or, not any more, Andy and Tal made the mlx5 AM code a kernel library which is called DIM f4e5f0e MAINTAINERS: add entry for Dynamic Interrupt Moderation 6a8788f bnxt_en: add support for software dynamic interrupt moderation 8115b75 net/dim: use struct net_dim_sample as arg to net_dim

Re: [PATCH rfc 0/5] generic adaptive IRQ moderation library for I/O devices

2018-02-06 Thread Tal Gilboa
On 2/6/2018 11:34 AM, Sagi Grimberg wrote: Hi Tal, I think Tal has idea/s on how the existing library can be changed to support more modes/models What I was thinking is allowing DIM algorithm to disregard data which is 0. Currently if bytes == 0 we return "SAME" immediately. We can change

Re: [PATCH v5 06/10] bcache: add stop_when_cache_set_failed option to backing device

2018-02-06 Thread Coly Li
On 06/02/2018 6:50 PM, Nix wrote: > On 6 Feb 2018, Coly Li verbalised: >> diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h >> index 7917b3820dd5..263164490833 100644 >> --- a/drivers/md/bcache/bcache.h >> +++ b/drivers/md/bcache/bcache.h >> @@ -287,6 +287,12 @@ struct io { >>

[PATCH v5 06/10] bcache: add stop_when_cache_set_failed option to backing device

2018-02-06 Thread Coly Li
When there are too many I/O errors on cache device, current bcache code will retire the whole cache set, and detach all bcache devices. But the detached bcache devices are not stopped, which is problematic when bcache is in writeback mode. If the retired cache set has dirty data of backing

RE: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Kashyap Desai
> -Original Message- > From: Ming Lei [mailto:ming@redhat.com] > Sent: Tuesday, February 6, 2018 1:35 PM > To: Kashyap Desai > Cc: Hannes Reinecke; Jens Axboe; linux-block@vger.kernel.org; Christoph > Hellwig; Mike Snitzer; linux-s...@vger.kernel.org; Arun Easi; Omar Sandoval; > Martin

Re: [PATCH 4/5] lightnvm: pblk: add padding distribution sysfs attribute

2018-02-06 Thread Hans Holmberg
On Tue, Feb 6, 2018 at 11:50 AM, Matias Bjørling wrote: > On 02/06/2018 10:27 AM, Hans Holmberg wrote: >> >> Hi Matias, >> >> On Wed, Jan 31, 2018 at 9:44 AM, Matias Bjørling wrote: >>> >>> On 01/31/2018 03:06 AM, Javier González wrote: From:

Re: [PATCH rfc 0/5] generic adaptive IRQ moderation library for I/O devices

2018-02-06 Thread Or Gerlitz
On Tue, Feb 6, 2018 at 11:25 AM, Sagi Grimberg wrote: > Hey Or, > >> not any more, Andy and Tal made the mlx5 AM code a kernel library >> which is called DIM >> >> f4e5f0e MAINTAINERS: add entry for Dynamic Interrupt Moderation >> 6a8788f bnxt_en: add support for software

Re: [PATCH rfc 0/5] generic adaptive IRQ moderation library for I/O devices

2018-02-06 Thread Sagi Grimberg
Hi Tal, I think Tal has idea/s on how the existing library can be changed to support more modes/models What I was thinking is allowing DIM algorithm to disregard data which is 0. Currently if bytes == 0 we return "SAME" immediately. We can change it to simply move to the packets check (which

Re: [PATCH v5 06/10] bcache: add stop_when_cache_set_failed option to backing device

2018-02-06 Thread Nix
On 6 Feb 2018, Coly Li verbalised: > diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h > index 7917b3820dd5..263164490833 100644 > --- a/drivers/md/bcache/bcache.h > +++ b/drivers/md/bcache/bcache.h > @@ -287,6 +287,12 @@ struct io { > sector_tlast; > }; >

Re: [PATCH 4/5] lightnvm: pblk: add padding distribution sysfs attribute

2018-02-06 Thread Matias Bjørling
On 02/06/2018 10:27 AM, Hans Holmberg wrote: Hi Matias, On Wed, Jan 31, 2018 at 9:44 AM, Matias Bjørling wrote: On 01/31/2018 03:06 AM, Javier González wrote: From: Hans Holmberg When pblk receives a sync, all data up to that point in the

Re: [PATCH 4/5] lightnvm: pblk: add padding distribution sysfs attribute

2018-02-06 Thread Hans Holmberg
Hi Matias, On Wed, Jan 31, 2018 at 9:44 AM, Matias Bjørling wrote: > On 01/31/2018 03:06 AM, Javier González wrote: >> >> From: Hans Holmberg >> >> When pblk receives a sync, all data up to that point in the write buffer >> must be comitted to

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Paolo Valente
> Il giorno 06 feb 2018, alle ore 08:56, Mike Galbraith ha > scritto: > > On Tue, 2018-02-06 at 08:44 +0100, Oleksandr Natalenko wrote: >> Hi, Paolo. >> >> I can confirm that this patch fixes cfdisk hang for me. I've also tried >> to trigger the issue Mike has encountered,

Re: [PATCH 00/24] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD)

2018-02-06 Thread Danil Kipnis
On Mon, Feb 5, 2018 at 7:38 PM, Bart Van Assche wrote: > On 02/05/18 08:40, Danil Kipnis wrote: >> >> It just occurred to me, that we could easily extend the interface in >> such a way that each client (i.e. each session) would have on server >> side her own directory with

Re: [PATCH 3/4] lightnvm: add 2.0 geometry identification

2018-02-06 Thread Matias Bjørling
On 02/05/2018 07:04 PM, Randy Dunlap wrote: On 02/05/2018 04:15 AM, Matias Bjørling wrote: Implement the geometry data structures for 2.0 and enable a drive to be identified as one, including exposing the appropriate 2.0 sysfs entries. Signed-off-by: Matias Bjørling ---

Re: [PATCH V2 8/8] scsi: hpsa: use blk_mq to solve irq affinity issue

2018-02-06 Thread Ming Lei
On Tue, Feb 06, 2018 at 09:39:26AM +0100, Hannes Reinecke wrote: > On 02/05/2018 04:20 PM, Ming Lei wrote: > > This patch uses .force_blk_mq to drive HPSA via SCSI_MQ, meantime maps > > each reply queue to blk_mq's hw queue, then .queuecommand can always > > choose the hw queue as the reply queue.

Re: [PATCH 2/2] block, char_dev: Use correct format specifier for unsigned ints

2018-02-06 Thread Greg KH
On Mon, Feb 05, 2018 at 06:25:27PM -0800, Srivatsa S. Bhat wrote: > From: Srivatsa S. Bhat > > register_blkdev() and __register_chrdev_region() treat the major > number as an unsigned int. So print it the same way to avoid > absurd error statements such as: > "... major

Re: [PATCH 00/24] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD)

2018-02-06 Thread Roman Penyaev
On Mon, Feb 5, 2018 at 6:20 PM, Bart Van Assche wrote: > On Mon, 2018-02-05 at 18:16 +0100, Roman Penyaev wrote: >> Everything (fio jobs, setup, etc) is given in the same link: >> >> https://www.spinics.net/lists/linux-rdma/msg48799.html >> >> at the bottom you will find

[PATCH V2] lightnvm: pblk: add padding distribution sysfs attribute

2018-02-06 Thread hans . ml . holmberg
From: Hans Holmberg When pblk receives a sync, all data up to that point in the write buffer must be comitted to persistent storage, and as flash memory comes with a minimal write size there is a significant cost involved both in terms of time for completing the sync

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Mike Galbraith
On Tue, 2018-02-06 at 10:38 +0100, Paolo Valente wrote: > > Hi Mike, > as you can imagine, I didn't get any failure in my pre-submission > tests on this patch. In addition, it is not that easy to link this > patch, which just adds some internal bfq housekeeping in case of a > requeue, with a

Re: [PATCH 03/24] ibtrs: core: lib functions shared between client and server modules

2018-02-06 Thread Roman Penyaev
Hi Sagi, On Mon, Feb 5, 2018 at 11:52 AM, Sagi Grimberg wrote: > Hi Roman, > > Here are some comments below. > >> +int ibtrs_post_recv_empty(struct ibtrs_con *con, struct ib_cqe *cqe) >> +{ >> + struct ib_recv_wr wr, *bad_wr; >> + >> + wr.next= NULL; >> +

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Oleksandr Natalenko
Hi. 06.02.2018 12:57, Mike Galbraith wrote: Not me.  Box seems to be fairly sure that it is bfq. Twice again box went belly up on me in fairly short order with bfq, but seemed fine with deadline. I'm currently running deadline again, and box again seems solid, thought I won't say _is_ solid

[PATCH 4/5] genirq/affinity: irq vector spread among online CPUs as far as possible

2018-02-06 Thread Ming Lei
84676c1f21 ("genirq/affinity: assign vectors to all possible CPUs") may cause irq vector assigned to all offline CPUs, and this kind of assignment may cause much less irq vectors mapped to online CPUs, and performance may get hurt. For example, in a 8 cores system, 0~3 online, 4~8 offline/not

[PATCH 1/5] genirq/affinity: rename *node_to_possible_cpumask as *node_to_cpumask

2018-02-06 Thread Ming Lei
The following patches will introduce two stage irq spread for improving irq spread on all possible CPUs. No funtional change. Cc: Thomas Gleixner Cc: Christoph Hellwig Signed-off-by: Ming Lei --- kernel/irq/affinity.c | 26

[PATCH 0/5] genirq/affinity: irq vector spread among online CPUs as far as possible

2018-02-06 Thread Ming Lei
Hi, This patchset tries to spread among online CPUs as far as possible, so that we can avoid to allocate too less irq vectors with online CPUs mapped. For example, in a 8cores system, 4 cpu cores(4~7) are offline/non present, on a device with 4 queues: 1) before this patchset irq 39,

[PATCH 3/5] genirq/affinity: support to do irq vectors spread starting from any vector

2018-02-06 Thread Ming Lei
Now two parameters(start_vec, affv) are introduced to irq_build_affinity_masks(), then this helper can build the affinity of each irq vector starting from the irq vector of 'start_vec', and handle at most 'affv' vectors. This way is required to do 2-stages irq vectors spread among all possible

Re: [PATCH 04/24] ibtrs: client: private header with client structs and functions

2018-02-06 Thread Roman Penyaev
Hi Sagi, On Mon, Feb 5, 2018 at 11:59 AM, Sagi Grimberg wrote: > Hi Roman, > > >> +struct ibtrs_clt_io_req { >> + struct list_headlist; >> + struct ibtrs_iu *iu; >> + struct scatterlist *sglist; /* list holding user data */ >> +

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Paolo Valente
> Il giorno 06 feb 2018, alle ore 12:57, Mike Galbraith ha > scritto: > > On Tue, 2018-02-06 at 10:38 +0100, Paolo Valente wrote: >> >> Hi Mike, >> as you can imagine, I didn't get any failure in my pre-submission >> tests on this patch. In addition, it is not that easy to

Re: [PATCH 07/24] ibtrs: client: sysfs interface functions

2018-02-06 Thread Roman Penyaev
On Mon, Feb 5, 2018 at 12:20 PM, Sagi Grimberg wrote: > Hi Roman, > > >> This is the sysfs interface to IBTRS sessions on client side: >> >>/sys/kernel/ibtrs_client// >> *** IBTRS session created by ibtrs_clt_open() API call >> | >> |- max_reconnect_attempts

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Ming Lei
Hi Kashyap, On Tue, Feb 06, 2018 at 04:59:51PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Tuesday, February 6, 2018 1:35 PM > > To: Kashyap Desai > > Cc: Hannes Reinecke; Jens Axboe; linux-block@vger.kernel.org; Christoph >

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Paolo Valente
> Il giorno 06 feb 2018, alle ore 13:26, Paolo Valente > ha scritto: > > > >> Il giorno 06 feb 2018, alle ore 12:57, Mike Galbraith ha >> scritto: >> >> On Tue, 2018-02-06 at 10:38 +0100, Paolo Valente wrote: >>> >>> Hi Mike, >>> as you can

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Holger Hoffstätte
On 02/06/18 13:26, Paolo Valente wrote: (..) > As Oleksadr asked too, is it deadline or mq-deadline? You can use deadline as alias as long as blk-mq is active. This doesn't work when mq-deadline is built as a module, but that doesn't seem to be the problem here. >> [ 484.179292] BUG: unable to

Re: [PATCH 09/24] ibtrs: server: main functionality

2018-02-06 Thread Roman Penyaev
On Mon, Feb 5, 2018 at 12:29 PM, Sagi Grimberg wrote: > Hi Roman, > > Some comments below. > > > On 02/02/2018 04:08 PM, Roman Pen wrote: >> >> This is main functionality of ibtrs-server module, which accepts >> set of RDMA connections (so called IBTRS session), creates/destroys

[PATCH v3] block: Add should_fail_bio() for bpf error injection

2018-02-06 Thread Howard McLauchlan
The classic error injection mechanism, should_fail_request() does not support use cases where more information is required (from the entire struct bio, for example). To that end, this patch introduces should_fail_bio(), which calls should_fail_request() under the hood but provides a convenient

Re: [PATCH V2 0/8] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Jens Axboe
On 2/5/18 8:20 AM, Ming Lei wrote: > Hi All, > > This patchset supports global tags which was started by Hannes originally: > > https://marc.info/?l=linux-block=149132580511346=2 > > Also inroduce 'force_blk_mq' and 'host_tagset' to 'struct scsi_host_template', > so that driver can avoid

Re: [PATCH V2 2/8] blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS

2018-02-06 Thread Jens Axboe
On 2/5/18 8:20 AM, Ming Lei wrote: > Quite a few HBAs(such as HPSA, megaraid, mpt3sas, ..) support multiple > reply queues, but tags is often HBA wide. > > These HBAs have switched to use pci_alloc_irq_vectors(PCI_IRQ_AFFINITY) > for automatic affinity assignment. > > Now

Re: [PATCH v3] block: Add should_fail_bio() for bpf error injection

2018-02-06 Thread Jens Axboe
On 2/6/18 3:05 PM, Howard McLauchlan wrote: > The classic error injection mechanism, should_fail_request() does not > support use cases where more information is required (from the entire > struct bio, for example). > > To that end, this patch introduces should_fail_bio(), which calls >

Re: [PATCH V2 2/8] blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS

2018-02-06 Thread Ming Lei
On Tue, Feb 06, 2018 at 04:18:20PM -0700, Jens Axboe wrote: > On 2/5/18 8:20 AM, Ming Lei wrote: ... > > GLOBAL implies that it's, strangely enough, global. That isn't really the > case. Why not call this BLK_MQ_F_HOST_TAGS or something like that? I'd > welcome better names, but global doesn't

Re: [PATCH V2 2/8] blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS

2018-02-06 Thread Ming Lei
On Tue, Feb 06, 2018 at 12:33:36PM -0800, Omar Sandoval wrote: > On Mon, Feb 05, 2018 at 11:20:29PM +0800, Ming Lei wrote: .. > > > > + /* need to restart all hw queues for global tags */ > > + if (hctx->flags & BLK_MQ_F_GLOBAL_TAGS) { > > + struct blk_mq_hw_ctx *hctx2; > > +

Re: [PATCH] block: Add should_fail_bio() for bpf error injection

2018-02-06 Thread Jens Axboe
On 2/6/18 12:27 PM, Omar Sandoval wrote: > On Wed, Jan 24, 2018 at 03:22:58PM -0800, Howard McLauchlan wrote: >> The classic error injection mechanism, should_fail_request() does not >> support use cases where more information is required (from the entire >> struct bio, for example). >> >> To that

Re: [PATCH 2/2] block, char_dev: Use correct format specifier for unsigned ints

2018-02-06 Thread Srivatsa S. Bhat
On 2/6/18 2:24 AM, Greg KH wrote: > On Mon, Feb 05, 2018 at 06:25:27PM -0800, Srivatsa S. Bhat wrote: >> From: Srivatsa S. Bhat >> >> register_blkdev() and __register_chrdev_region() treat the major >> number as an unsigned int. So print it the same way to avoid >> absurd

Re: [PATCH V2 5/8] scsi: introduce force_blk_mq

2018-02-06 Thread Omar Sandoval
On Mon, Feb 05, 2018 at 11:20:32PM +0800, Ming Lei wrote: > From scsi driver view, it is a bit troublesome to support both blk-mq > and non-blk-mq at the same time, especially when drivers need to support > multi hw-queue. > > This patch introduces 'force_blk_mq' to scsi_host_template so that

Re: [PATCH V2 2/8] blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS

2018-02-06 Thread Omar Sandoval
On Mon, Feb 05, 2018 at 11:20:29PM +0800, Ming Lei wrote: > Quite a few HBAs(such as HPSA, megaraid, mpt3sas, ..) support multiple > reply queues, but tags is often HBA wide. > > These HBAs have switched to use pci_alloc_irq_vectors(PCI_IRQ_AFFINITY) > for automatic affinity assignment. > > Now

Re: [PATCH V2 1/8] blk-mq: tags: define several fields of tags as pointer

2018-02-06 Thread Omar Sandoval
On Mon, Feb 05, 2018 at 11:20:28PM +0800, Ming Lei wrote: > This patch changes tags->breserved_tags, tags->bitmap_tags and > tags->active_queues as pointer, and prepares for supporting global tags. > > No functional change. > > Tested-by: Laurence Oberman > Reviewed-by:

Re: [PATCH v2] block: Add should_fail_bio() for bpf error injection

2018-02-06 Thread Jens Axboe
On 2/6/18 2:11 PM, Howard McLauchlan wrote: > The classic error injection mechanism, should_fail_request() does not > support use cases where more information is required (from the entire > struct bio, for example). > > To that end, this patch introduces should_fail_bio(), which calls >

Re: [PATCH V2 4/8] block: null_blk: introduce module parameter of 'g_global_tags'

2018-02-06 Thread Omar Sandoval
On Mon, Feb 05, 2018 at 11:20:31PM +0800, Ming Lei wrote: > This patch introduces the parameter of 'g_global_tags' so that we can > test this feature by null_blk easiy. > > Not see obvious performance drop with global_tags when the whole hw > depth is kept as same: > > 1) no 'global_tags', each

Re: [PATCH] block: Add should_fail_bio() for bpf error injection

2018-02-06 Thread Omar Sandoval
On Wed, Jan 24, 2018 at 03:22:58PM -0800, Howard McLauchlan wrote: > The classic error injection mechanism, should_fail_request() does not > support use cases where more information is required (from the entire > struct bio, for example). > > To that end, this patch introduces should_fail_bio(),

[PATCH v2] block: Add should_fail_bio() for bpf error injection

2018-02-06 Thread Howard McLauchlan
The classic error injection mechanism, should_fail_request() does not support use cases where more information is required (from the entire struct bio, for example). To that end, this patch introduces should_fail_bio(), which calls should_fail_request() under the hood but provides a convenient

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Ming Lei
Hi Kashyap, On Tue, Feb 06, 2018 at 07:57:35PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Tuesday, February 6, 2018 6:02 PM > > To: Kashyap Desai > > Cc: Hannes Reinecke; Jens Axboe; linux-block@vger.kernel.org; Christoph >

[PATCH 5/6] genhd: Fix BUG in blkdev_open()

2018-02-06 Thread Jan Kara
When two blkdev_open() calls for a partition race with device removal and recreation, we can hit BUG_ON(!bd_may_claim(bdev, whole, holder)) in blkdev_open(). The race can happen as follows: CPU0CPU1CPU2

Re: [PATCH rfc 2/5] irq-am: add some debugfs exposure on tuning state

2018-02-06 Thread kbuild test robot
Hi Sagi, I love your patch! Yet something to improve: [auto build test ERROR on v4.15] [also build test ERROR on next-20180206] [cannot apply to linus/master rdma/for-next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

[PATCH 0/6] block: Fix races in bdev - gendisk handling

2018-02-06 Thread Jan Kara
Hello, these patches fix races happening when devices are frequently destroyed and recreated in association of block device inode with corresponding gendisk. Generally when such race happen it results in use-after-free issues, block device page cache inconsistencies, or other problems. I have

[PATCH 4/6] genhd: Fix use after free in __blkdev_get()

2018-02-06 Thread Jan Kara
When two blkdev_open() calls race with device removal and recreation, __blkdev_get() can use looked up gendisk after it is freed: CPU0CPU1CPU2 del_gendisk(disk);

[PATCH 1/6] genhd: Fix leaked module reference for NVME devices

2018-02-06 Thread Jan Kara
Commit 8ddcd653257c "block: introduce GENHD_FL_HIDDEN" added handling of hidden devices to get_gendisk() but forgot to drop module reference which is also acquired by get_disk(). Drop the reference as necessary. Arguably the function naming here is misleading as put_disk() is *not* the

Re: [PATCH 1/2] char_dev: Fix off-by-one bugs in find_dynamic_major()

2018-02-06 Thread Logan Gunthorpe
Thanks! On 05/02/18 07:25 PM, Srivatsa S. Bhat wrote: From: Srivatsa S. Bhat CHRDEV_MAJOR_DYN_END and CHRDEV_MAJOR_DYN_EXT_END are valid major numbers. So fix the loop iteration to include them in the search for free major numbers. While at it, also remove a redundant

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Holger Hoffstätte
On 02/06/18 15:55, Paolo Valente wrote: > > >> Il giorno 06 feb 2018, alle ore 14:40, Holger Hoffstätte >> ha scritto: >> >> >> The plot thickens! >> > > Yep, the culprit seems clearer, though ... > >> Just as I was about to post that I didn't have any problems

Re: [PATCH 03/24] ibtrs: core: lib functions shared between client and server modules

2018-02-06 Thread Jason Gunthorpe
On Tue, Feb 06, 2018 at 01:01:23PM +0100, Roman Penyaev wrote: > >> +static int ibtrs_ib_dev_init(struct ibtrs_ib_dev *d, struct ib_device > >> *dev) > >> +{ > >> + int err; > >> + > >> + d->pd = ib_alloc_pd(dev, IB_PD_UNSAFE_GLOBAL_RKEY); > >> + if (IS_ERR(d->pd)) > >> +

Re: [PATCH 00/24] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD)

2018-02-06 Thread Bart Van Assche
On Tue, 2018-02-06 at 14:12 +0100, Roman Penyaev wrote: > On Mon, Feb 5, 2018 at 1:16 PM, Sagi Grimberg wrote: > > [ ... ] > > - srp/scst comparison is really not fair having it in legacy request > > mode. Can you please repeat it and report a bug to either linux-rdma > > or

Re: [PATCH 2/2] block, char_dev: Use correct format specifier for unsigned ints

2018-02-06 Thread Logan Gunthorpe
On 05/02/18 07:25 PM, Srivatsa S. Bhat wrote: From: Srivatsa S. Bhat register_blkdev() and __register_chrdev_region() treat the major number as an unsigned int. So print it the same way to avoid absurd error statements such as: "... major requested (-1) is greater

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Oleksandr Natalenko
06.02.2018 15:50, Paolo Valente wrote: Could you please do a gdb /block/bfq-iosched.o # or vmlinux.o if bfq is builtin list *(bfq_finish_requeue_request+0x54) list *(bfq_put_queue+0x10b) for me? Yes. Just give me some time to recompile the kernel with minimal debug info enabled. I'll post

Re: [PATCH 00/24] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD)

2018-02-06 Thread Bart Van Assche
On Tue, 2018-02-06 at 10:44 +0100, Danil Kipnis wrote: > the configuration (which devices can be accessed by a particular > client) can happen also after the kernel target module is loaded. The > directory in is a module parameter and is fixed. It > contains for example "/ibnbd_devices/". But a

Re: [LSF/MM TOPIC] get_user_pages() and filesystems

2018-02-06 Thread Jan Kara
Hello, On Fri 02-02-18 15:04:11, Liu Bo wrote: > On Thu, Jan 25, 2018 at 12:57:27PM +0100, Jan Kara wrote: > > Hello, > > > > this is about a problem I have identified last month and for which I still > > don't have good solution. Some discussion of the problem happened here [1] > > where also

Re: [PATCH V2 5/8] scsi: introduce force_blk_mq

2018-02-06 Thread Ming Lei
On Tue, Feb 06, 2018 at 12:20:43PM -0800, Omar Sandoval wrote: > On Mon, Feb 05, 2018 at 11:20:32PM +0800, Ming Lei wrote: ... > > shost->use_blk_mq = scsi_use_blk_mq; > > Not sure if this is a patch formatting issue, but this old line wasn't > deleted. Good catch, the old line need to be

[PATCH] blk-mq-debugfs: Show more request state information

2018-02-06 Thread Bart Van Assche
Since commit 634f9e4631a8 ("blk-mq: remove REQ_ATOM_COMPLETE usages from blk-mq") blk_rq_is_complete() only reports whether or not a request has completed for legacy queues. Hence modify the blk-mq-debugfs code such that it shows the blk-mq request state again. Fixes: 634f9e4631a8 ("blk-mq:

[PATCH v2] blk-mq: Fix race between resetting the timer and completion handling

2018-02-06 Thread Bart Van Assche
The following race can occur between the code that resets the timer and completion handling: - The code that handles BLK_EH_RESET_TIMER resets aborted_gstate. - A completion occurs and blk_mq_complete_request() calls __blk_mq_complete_request(). - The timeout code calls blk_add_timer() and that

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Hannes Reinecke
Hi all, [ .. ] >> >> Could you share us your patch for enabling global_tags/MQ on > megaraid_sas >> so that I can reproduce your test? >> >>> See below perf top data. "bt_iter" is consuming 4 times more CPU. >> >> Could you share us what the IOPS/CPU utilization effect is after > applying the >>

Re: WARNING in kmalloc_slab (3)

2018-02-06 Thread Dmitry Vyukov
On Tue, Dec 12, 2017 at 10:22 PM, Eric Biggers wrote: > On Mon, Dec 04, 2017 at 12:26:32PM +0300, Dan Carpenter wrote: >> On Mon, Dec 04, 2017 at 09:18:05AM +0100, Dmitry Vyukov wrote: >> > On Mon, Dec 4, 2017 at 9:14 AM, Dan Carpenter >> > wrote:

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Ming Lei
Hi Kashyap, On Tue, Feb 06, 2018 at 11:33:50AM +0530, Kashyap Desai wrote: > > > We still have more than one reply queue ending up completion one CPU. > > > > pci_alloc_irq_vectors(PCI_IRQ_AFFINITY) has to be used, that means > > smp_affinity_enable has to be set as 1, but seems it is the default

Re: [PATCH V2 8/8] scsi: hpsa: use blk_mq to solve irq affinity issue

2018-02-06 Thread Ming Lei
Hello chenxiang, On Tue, Feb 06, 2018 at 10:18:19AM +0800, chenxiang (M) wrote: > 在 2018/2/5 23:20, Ming Lei 写道: > > This patch uses .force_blk_mq to drive HPSA via SCSI_MQ, meantime maps > > each reply queue to blk_mq's hw queue, then .queuecommand can always > > choose the hw queue as the reply

Re: [PATCH V2 7/8] scsi: hpsa: call hpsa_hba_inquiry() after adding host

2018-02-06 Thread Hannes Reinecke
On 02/05/2018 04:20 PM, Ming Lei wrote: > So that we can decide the default reply queue by the map created > during adding host. > > Cc: Hannes Reinecke > Cc: Arun Easi > Cc: Omar Sandoval , > Cc: "Martin K. Petersen"

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Oleksandr Natalenko
Hi. 06.02.2018 08:56, Mike Galbraith wrote: I was doing kbuilds, and it blew up on me twice. Switching back to cfq seemed to confirm it was indeed the patch causing trouble, but that's by no means a certainty. Just to note, I was using v4.15.1, not the latest git HEAD. Are you able to

Re: [PATCH rfc 0/5] generic adaptive IRQ moderation library for I/O devices

2018-02-06 Thread Tal Gilboa
On 2/6/2018 10:54 AM, Or Gerlitz wrote: On Tue, Feb 6, 2018 at 12:03 AM, Sagi Grimberg wrote: The main reason why this implementation is different then the common networking devices implementation (and kept separate) is that in my mind at least, network devices are

Re: [PATCH V2 8/8] scsi: hpsa: use blk_mq to solve irq affinity issue

2018-02-06 Thread Hannes Reinecke
On 02/05/2018 04:20 PM, Ming Lei wrote: > This patch uses .force_blk_mq to drive HPSA via SCSI_MQ, meantime maps > each reply queue to blk_mq's hw queue, then .queuecommand can always > choose the hw queue as the reply queue. And if no any online CPU is > mapped to one hw queue, request can't be

Re: [PATCH rfc 0/5] generic adaptive IRQ moderation library for I/O devices

2018-02-06 Thread Or Gerlitz
On Tue, Feb 6, 2018 at 12:03 AM, Sagi Grimberg wrote: > The main reason why this implementation is different then the common > networking devices > implementation (and kept separate) is that in my mind at least, network > devices are different > animals than other I/O devices

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Mike Galbraith
On Tue, 2018-02-06 at 09:37 +0100, Oleksandr Natalenko wrote: > Hi. > > 06.02.2018 08:56, Mike Galbraith wrote: > > I was doing kbuilds, and it blew up on me twice. Switching back to cfq > > seemed to confirm it was indeed the patch causing trouble, but that's > > by no means a certainty. > >

Re: [PATCH 00/24] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD)

2018-02-06 Thread Roman Penyaev
Hi Sagi, On Mon, Feb 5, 2018 at 1:16 PM, Sagi Grimberg wrote: > Hi Roman and the team, > > On 02/02/2018 04:08 PM, Roman Pen wrote: >> >> This series introduces IBNBD/IBTRS modules. >> >> IBTRS (InfiniBand Transport) is a reliable high speed transport library >> which allows

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Holger Hoffstätte
The plot thickens! Just as I was about to post that I didn't have any problems - because I didn't have any - I decided to do a second test, activated bfq on my workstation, on a hunch typed "sync" and .. the machine locked up, hard. Rebooted, activated bfq, typed sync..sync hangs. Luckily this

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Mike Galbraith
On Tue, 2018-02-06 at 13:16 +0100, Oleksandr Natalenko wrote: > Hi. > > 06.02.2018 12:57, Mike Galbraith wrote: > > Not me.  Box seems to be fairly sure that it is bfq. Twice again box > > went belly up on me in fairly short order with bfq, but seemed fine > > with deadline. I'm currently

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Mike Galbraith
On Tue, 2018-02-06 at 13:26 +0100, Paolo Valente wrote: > > ok, right in the middle of bfq this time ... Was this the first OOPS in your > kernel log? Yeah.

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Oleksandr Natalenko
Hi. 06.02.2018 14:46, Mike Galbraith wrote: Sorry for the noise, but just to make it clear, are we talking about "deadline" or "mq-deadline" now? mq-deadline. Okay, I've spent a little bit more time on stressing the VM with BFQ + this patch enabled, and managed to get it crashed relatively

Re: [PATCH BUGFIX 1/1] block, bfq: add requeue-request hook

2018-02-06 Thread Mike Galbraith
On Tue, 2018-02-06 at 13:43 +0100, Holger Hoffstätte wrote: > > A much more interesting question to me is why there is kyber in the middle. :) Yeah, given per sysfs I have zero devices using kyber. -Mike

RE: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Kashyap Desai
> -Original Message- > From: Ming Lei [mailto:ming@redhat.com] > Sent: Tuesday, February 6, 2018 6:02 PM > To: Kashyap Desai > Cc: Hannes Reinecke; Jens Axboe; linux-block@vger.kernel.org; Christoph > Hellwig; Mike Snitzer; linux-s...@vger.kernel.org; Arun Easi; Omar Sandoval; > Martin