Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-10 Thread Paolo Valente
> Il giorno 10 feb 2017, alle ore 17:45, Bart Van Assche > ha scritto: > > On Tue, 2017-02-07 at 18:24 +0100, Paolo Valente wrote: >> 2) Enable people to test this first version bfq-mq. > > Hello Paolo, > > I installed this version of bfq-mq on a server that boots

Re: [PATCH] blk-mq-sched: don't hold queue_lock when calling exit_icq

2017-02-10 Thread Jens Axboe
On 02/10/2017 11:32 AM, Omar Sandoval wrote: > From: Omar Sandoval > > None of the other blk-mq elevator hooks are called with this lock held. > Additionally, it can lead to circular locking dependencies between > queue_lock and the private scheduler lock. Applied, thanks Omar.

[PATCH] block: set make_request_fn manually in blk_mq_update_nr_hw_queues

2017-02-10 Thread Josef Bacik
Calling blk_queue_make_request resets a bunch of settings on the request_queue, but all we really want is to update the make_request_fn, so do this directly so we don't lose things like the logical and physical block sizes. Signed-off-by: Josef Bacik --- block/blk-mq.c | 8

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-10 Thread Paolo Valente
> Il giorno 10 feb 2017, alle ore 19:13, Bart Van Assche > ha scritto: > > On 02/10/2017 08:49 AM, Paolo Valente wrote: >>> $ grep '^C.*_MQ_' .config >>> CONFIG_BLK_MQ_PCI=y >>> CONFIG_MQ_IOSCHED_BFQ=y >>> CONFIG_MQ_IOSCHED_DEADLINE=y >>> CONFIG_MQ_IOSCHED_NONE=y

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-10 Thread Paolo Valente
> Il giorno 10 feb 2017, alle ore 19:34, Bart Van Assche > ha scritto: > > On Tue, 2017-02-07 at 18:24 +0100, Paolo Valente wrote: >> (lock assertions, BUG_ONs, ...). > > Hello Paolo, > > If you are using BUG_ON(), does that mean that you are not aware of Linus' >

Re: [PATCH] block: set make_request_fn manually in blk_mq_update_nr_hw_queues

2017-02-10 Thread Jens Axboe
On 02/10/2017 11:03 AM, Josef Bacik wrote: > Calling blk_queue_make_request resets a bunch of settings on the > request_queue, but all we really want is to update the make_request_fn, > so do this directly so we don't lose things like the logical and > physical block sizes. Applied, thanks Josef.

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-10 Thread Paolo Valente
> Il giorno 10 feb 2017, alle ore 17:08, Bart Van Assche > ha scritto: > > On Tue, 2017-02-07 at 18:24 +0100, Paolo Valente wrote: >> [1] https://github.com/Algodev-github/bfq-mq > > Hello Paolo, > > That branch includes two changes of the version suffix

Re: [PATCHv6 13/37] mm: make write_cache_pages() work on huge pages

2017-02-10 Thread Matthew Wilcox
On Thu, Jan 26, 2017 at 02:57:55PM +0300, Kirill A. Shutemov wrote: > We writeback whole huge page a time. Let's adjust iteration this way. > > Signed-off-by: Kirill A. Shutemov I think a lot of the complexity in this patch is from pagevec_lookup_tag giving you

Re: [PATCHv6 17/37] fs: make block_read_full_page() be able to read huge page

2017-02-10 Thread Matthew Wilcox
On Thu, Jan 26, 2017 at 02:57:59PM +0300, Kirill A. Shutemov wrote: > The approach is straight-forward: for compound pages we read out whole > huge page. Ouch. bufferheads must die ;-) > For huge page we cannot have array of buffer head pointers on stack -- > it's 4096 pointers on x86-64 --

Re: [PATCHv6 16/37] thp: make thp_get_unmapped_area() respect S_HUGE_MODE

2017-02-10 Thread Matthew Wilcox
On Thu, Jan 26, 2017 at 02:57:58PM +0300, Kirill A. Shutemov wrote: > We want mmap(NULL) to return PMD-aligned address if the inode can have > huge pages in page cache. > > Signed-off-by: Kirill A. Shutemov Reviewed-by: Matthew Wilcox

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-10 Thread Bart Van Assche
On 02/10/2017 08:49 AM, Paolo Valente wrote: >> $ grep '^C.*_MQ_' .config >> CONFIG_BLK_MQ_PCI=y >> CONFIG_MQ_IOSCHED_BFQ=y >> CONFIG_MQ_IOSCHED_DEADLINE=y >> CONFIG_MQ_IOSCHED_NONE=y >> CONFIG_DEFAULT_MQ_BFQ_MQ=y >> CONFIG_DEFAULT_MQ_IOSCHED="bfq-mq" >> CONFIG_SCSI_MQ_DEFAULT=y >>

Re: [PATCH v2 4/4] Maintainers: Add Information for SED Opal library

2017-02-10 Thread Scott Bauer
On Fri, Feb 10, 2017 at 08:46:09AM -0800, Elliott, Robert (Persistent Memory) wrote: > > > > -Original Message- > > From: linux-block-ow...@vger.kernel.org [mailto:linux-block- > > ow...@vger.kernel.org] On Behalf Of Scott Bauer > > Sent: Tuesday, November 29, 2016 3:52 PM > > To:

[PATCH] blk-mq-sched: don't hold queue_lock when calling exit_icq

2017-02-10 Thread Omar Sandoval
From: Omar Sandoval None of the other blk-mq elevator hooks are called with this lock held. Additionally, it can lead to circular locking dependencies between queue_lock and the private scheduler lock. Reported-by: Paolo Valente Signed-off-by: Omar

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-10 Thread Bart Van Assche
On Tue, 2017-02-07 at 18:24 +0100, Paolo Valente wrote: > 2) Enable people to test this first version bfq-mq. Hello Paolo, I installed this version of bfq-mq on a server that boots from a SATA disk. That server boots fine with kernel v4.10-rc7 but not with this tree. The first 30 seconds of the

Re: [PATCHv6 12/37] brd: make it handle huge pages

2017-02-10 Thread Matthew Wilcox
On Thu, Jan 26, 2017 at 02:57:54PM +0300, Kirill A. Shutemov wrote: > Do not assume length of bio segment is never larger than PAGE_SIZE. > With huge pages it's HPAGE_PMD_SIZE (2M on x86-64). I don't think we even need hugepages for BRD to be buggy. I think there are already places which

[PATCH] nbd: set the logical and physical blocksize properly

2017-02-10 Thread Josef Bacik
We noticed when trying to do O_DIRECT to an export on the server side that we were getting requests smaller than the 4k sectorsize of the device. This is because the client isn't setting the logical and physical blocksizes properly for the underlying device. Fix this up by setting the queue

Re: [Nbd] [PATCH] nbd: set the logical and physical blocksize properly

2017-02-10 Thread Josef Bacik
On Fri, 2017-02-10 at 21:07 +0100, Alex Bligh wrote: > > > > On 10 Feb 2017, at 19:06, Josef Bacik wrote: > > > > We noticed when trying to do O_DIRECT to an export on the server > > side > > that we were getting requests smaller than the 4k sectorsize of the > > device.  This is

Re: [Nbd] [PATCH] nbd: set the logical and physical blocksize properly

2017-02-10 Thread Alex Bligh
> On 10 Feb 2017, at 19:06, Josef Bacik wrote: > > We noticed when trying to do O_DIRECT to an export on the server side > that we were getting requests smaller than the 4k sectorsize of the > device. This is because the client isn't setting the logical and > physical blocksizes

Re: [PATCHv6 15/37] thp: do not threat slab pages as huge in hpage_{nr_pages,size,mask}

2017-02-10 Thread Matthew Wilcox
On Thu, Jan 26, 2017 at 02:57:57PM +0300, Kirill A. Shutemov wrote: > Slab pages can be compound, but we shouldn't threat them as THP for > pupose of hpage_* helpers, otherwise it would lead to confusing results. > > For instance, ext4 uses slab pages for journal pages and we shouldn't > confuse

[PATCH] block/loop: fix race between I/O and set_status

2017-02-10 Thread Ming Lei
Inside set_status, transfer need to setup again, so we have to drain IO before the transition, otherwise oops may be triggered like the following: divide error: [#1] SMP KASAN CPU: 0 PID: 2935 Comm: loop7 Not tainted 4.10.0-rc7+ #213 Hardware name: QEMU Standard PC

Re: [PATCH V3 2/2] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-10 Thread Scott Bauer
On Fri, Feb 10, 2017 at 09:01:23AM +0100, Arnd Bergmann wrote: > On Thursday, February 9, 2017 10:20:01 AM CET Scott Bauer wrote: > > When CONFIG_KASAN is enabled, compilation fails: > > > > block/sed-opal.c: In function 'sed_ioctl': > > block/sed-opal.c:2447:1: error: the frame size of 2256

Re: [WIP PATCHSET 1/4] blk-mq: pass bio to blk_mq_sched_get_rq_priv

2017-02-10 Thread Jens Axboe
On 02/07/2017 10:24 AM, Paolo Valente wrote: > bio is used in bfq-mq's get_rq_priv, to get the request group. We could > pass directly the group here, but I thought that passing the bio was > more general, giving the possibility to get other pieces of information > if needed. I applied this one,

Sed-opal Fixes

2017-02-10 Thread Scott Bauer
changes from v3->v4: Changed manual kzalloc + copy from user to memdup_user. This small series fixes a small ABI issue when using the _IOC_SIZE with the Activate Locking SP ioctl. I had put the wrong structure in the IOW macro in the uapi header which caused issues when trying to copy in the

[PATCH V4 1/2] uapi: sed-opal fix IOW for activate lsp to use correct struct

2017-02-10 Thread Scott Bauer
the IOW for the IOC_OPAL_ACTIVATE_LSP took the wrong strcure which would give us the wrong size when using _IOC_SIZE, switch it to the right structure. Fixes: 058f8a2 ("Include: Uapi: Add user ABI for Sed/Opal") Signed-off-by: Scott Bauer ---

[PATCH V4 2/2] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-10 Thread Scott Bauer
When CONFIG_KASAN is enabled, compilation fails: block/sed-opal.c: In function 'sed_ioctl': block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Moved all the ioctl structures off the stack and dynamically activate using _IOC_SIZE()

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-10 Thread Bart Van Assche
On Tue, 2017-02-07 at 18:24 +0100, Paolo Valente wrote: > [1] https://github.com/Algodev-github/bfq-mq Hello Paolo, That branch includes two changes of the version suffix (EXTRAVERSION in Makefile). Please don't do that but set CONFIG_LOCALVERSION in .config to add a suffix to the kernel

Re: [PATCH] bfq-mq: cause deadlock by executing exit_icq body immediately

2017-02-10 Thread Jens Axboe
On 02/10/2017 06:00 AM, Paolo Valente wrote: > >> Il giorno 08 feb 2017, alle ore 18:17, Omar Sandoval >> ha scritto: >> >> On Wed, Feb 08, 2017 at 11:39:24AM +0100, Paolo Valente wrote: >>> Il giorno 08 feb 2017, alle ore 11:33, Omar Sandoval

[PATCHv5 0/2] loop: enable different logical blocksizes

2017-02-10 Thread Hannes Reinecke
Currently the loop driver just simulates 512-byte blocks. When creating bootable images for virtual machines it might be required to use a different physical blocksize (eg 4k for S/390 DASD), as the some bootloaders (like lilo or zipl for S/390) need to know the physical block addresses of the

[PATCHv5 2/2] loop: support 4k physical blocksize

2017-02-10 Thread Hannes Reinecke
When generating bootable VM images certain systems (most notably s390x) require devices with 4k blocksize. This patch implements a new flag 'LO_FLAGS_BLOCKSIZE' which will set the physical blocksize to that of the underlying device, and allow to change the logical blocksize for up to the physical

Re: [PATCH V3 2/2] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-10 Thread Arnd Bergmann
On Thursday, February 9, 2017 10:20:01 AM CET Scott Bauer wrote: > When CONFIG_KASAN is enabled, compilation fails: > > block/sed-opal.c: In function 'sed_ioctl': > block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than > 2048 bytes [-Werror=frame-larger-than=] > > Moved

[PATCH v1 1/5] block: introduce bio_clone_bioset_partial()

2017-02-10 Thread Ming Lei
md still need bio clone(not the fast version) for behind write, and it is more efficient to use bio_clone_bioset_partial(). The idea is simple and just copy the bvecs range specified from parameters. Signed-off-by: Ming Lei --- block/bio.c | 61

[PATCH v1 0/5] md: use bio_clone_fast()

2017-02-10 Thread Ming Lei
Hi, This patches replaces bio_clone() with bio_fast_clone() in bio_clone_mddev() because: 1) bio_clone_mddev() is used in raid normal I/O and isn't in resync I/O path, and all the direct access to bvec table in raid happens on resync I/O only except for write behind of raid1. Write behind is

RE: [PATCH V3 2/2] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-10 Thread David Laight
From: Johannes Thumshirn > Sent: 10 February 2017 07:46 > On 02/09/2017 06:20 PM, Scott Bauer wrote: > > When CONFIG_KASAN is enabled, compilation fails: Does CONFIG_KASAN allocate guard stack space around everything that is passed by address? That sounds completely brain-dead. There are a lot of

[PATCH v1 4/5] md: remove unnecessary check on mddev

2017-02-10 Thread Ming Lei
mddev is never NULL and neither is ->bio_set, so remove the check. Suggested-by: Christoph Hellwig Signed-off-by: Ming Lei --- drivers/md/md.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index

[PATCH v1 3/5] md: fail if mddev->bio_set can't be created

2017-02-10 Thread Ming Lei
The current behaviour is to fall back to allocate bio from 'fs_bio_set', that isn't a correct way because it might cause deadlock. So this patch simply return failure if mddev->bio_set can't be created. Signed-off-by: Ming Lei --- drivers/md/md.c | 5 - 1 file

[PATCH v1 5/5] md: fast clone bio in bio_clone_mddev()

2017-02-10 Thread Ming Lei
Firstly bio_clone_mddev() is used in raid normal I/O and isn't in resync I/O path. Secondly all the direct access to bvec table in raid happens on resync I/O except for write behind of raid1, in which we still use bio_clone() for allocating new bvec table. So this patch replaces bio_clone() with

Re: [PATCH 3/6] genirq/affinity: update CPU affinity for CPU hotplug events

2017-02-10 Thread Thomas Gleixner
On Fri, 3 Feb 2017, Christoph Hellwig wrote: > @@ -127,6 +127,7 @@ enum cpuhp_state { > CPUHP_AP_ONLINE_IDLE, > CPUHP_AP_SMPBOOT_THREADS, > CPUHP_AP_X86_VDSO_VMA_ONLINE, > + CPUHP_AP_IRQ_AFFINIY_ONLINE, s/AFFINIY/AFFINITY/ perhaps? > +static void __irq_affinity_set(unsigned

Re: [PATCH V3 2/2] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-10 Thread Arnd Bergmann
On Fri, Feb 10, 2017 at 11:28 AM, David Laight wrote: >> >> > - if (copy_from_user(, arg, sizeof(session))) >> > - return -EFAULT; >> > - return opal_erase_locking_range(dev, ); >> > + ioctl_ptr = kzalloc(cmd_size, GFP_KERNEL); >>

Re: [PATCH] bfq-mq: cause deadlock by executing exit_icq body immediately

2017-02-10 Thread Paolo Valente
> Il giorno 08 feb 2017, alle ore 18:17, Omar Sandoval ha > scritto: > > On Wed, Feb 08, 2017 at 11:39:24AM +0100, Paolo Valente wrote: >> >>> Il giorno 08 feb 2017, alle ore 11:33, Omar Sandoval >>> ha scritto: >>> >>> On Wed, Feb 08, 2017 at

Re: [PATCH 07/10] writeback: Implement reliable switching to default writeback structure

2017-02-10 Thread Jan Kara
On Fri 10-02-17 13:19:44, NeilBrown wrote: > On Thu, Feb 09 2017, Jan Kara wrote: > > > Currently switching of inode between different writeback structures is > > asynchronous and not guaranteed to succeed. Add a variant of switching > > that is synchronous and reliable so that it can reliably

RE: [PATCH v2 4/4] Maintainers: Add Information for SED Opal library

2017-02-10 Thread Elliott, Robert (Persistent Memory)
> -Original Message- > From: linux-block-ow...@vger.kernel.org [mailto:linux-block- > ow...@vger.kernel.org] On Behalf Of Scott Bauer > Sent: Tuesday, November 29, 2016 3:52 PM > To: linux-n...@lists.infradead.org > Cc: rafael.antogno...@intel.com; ax...@fb.com; keith.bu...@intel.com; >