Re: [PATCH v2] kyber: introduce kyber_depth_updated()

2021-02-22 Thread Omar Sandoval
t able to reproduce the hang, but this looks correct, and it passed my tests. Reviewed-by: Omar Sandoval > --- > v2: > - Change the commit message > - Change from sbitmap::depth to 2^sbitmap::shift > --- > block/kyber-iosched.c | 29 + > 1 file cha

Re: [PATCH blktests v3 00/11] NVMe Target Passthru Block Tests

2020-10-22 Thread Omar Sandoval
On Thu, Oct 22, 2020 at 12:45:25PM -0600, Logan Gunthorpe wrote: > > On 2020-10-08 10:40 a.m., Logan Gunthorpe wrote: > > Hi, > > > > This series adds blktests for the nvmet passthru feature that was merged > > for 5.9. It's been reconciled with Sagi's blktest series that Omar > > recently merged

Re: [PATCH] kyber: Fix crash in kyber_finish_request()

2020-09-08 Thread Omar Sandoval
On Mon, Sep 07, 2020 at 10:41:16AM -0600, Jens Axboe wrote: > CC Omar > > On 9/7/20 1:43 AM, Yang Yang wrote: > > Kernel crash when requeue flush request. > > It can be reproduced as below: > > > > [2.517297] Unable to handle kernel paging request at virtual address > > ffd8071c0b00 > >

Re: [PATCH] sbitmap: trivial - update comment for sbitmap_deferred_clear_bit

2019-03-21 Thread Omar Sandoval
On Sat, Mar 16, 2019 at 04:24:37PM +0800, Shenghui Wang wrote: > "sbitmap_batch_clear" should be "sbitmap_deferred_clear" Acked-by: Omar Sandoval > Signed-off-by: Shenghui Wang > --- > include/linux/sbitmap.h | 2 +- > 1 file changed, 1 insertion(+), 1 de

Re: [PATCH 01/11] btrfs: add macros for compression type and level

2019-01-29 Thread Omar Sandoval
On Mon, Jan 28, 2019 at 04:24:27PM -0500, Dennis Zhou wrote: > It is very easy to miss places that rely on a certain bitshifting for > decyphering the type_level overloading. Make macros handle this instead. > > Signed-off-by: Dennis Zhou > --- > fs/btrfs/compression.c | 2 +- > fs/btrfs/compres

Re: [PATCH] block: aoe: no need to check return value of debugfs_create functions

2019-01-22 Thread Omar Sandoval
On Tue, Jan 22, 2019 at 04:21:04PM +0100, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: "Ed L. Cashin" > Cc: Jens Axboe

Re: [PATCH] blk_types.h: Use REQ_OP_WRITE in op_is_write

2019-01-11 Thread Omar Sandoval
On Sat, Dec 22, 2018 at 08:03:54AM -0200, Marcos Paulo de Souza wrote: > Instead of just using plain '1', as it improves readability. > > Signed-off-by: Marcos Paulo de Souza > --- > include/linux/blk_types.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux

Re: [PATCH v3 01/10] sched: Provide sparsemask, a reduced contention bitmap

2018-12-06 Thread Omar Sandoval
On Thu, Dec 06, 2018 at 11:07:46AM -0500, Steven Sistare wrote: > On 11/27/2018 8:19 PM, Omar Sandoval wrote: > > On Tue, Nov 27, 2018 at 10:16:56AM -0500, Steven Sistare wrote: > >> On 11/9/2018 7:50 AM, Steve Sistare wrote: > >>> From: Steve Sistare > >&g

Re: [PATCH,1/2] genhd: avoid overflow of sectors in disk_stats

2018-11-30 Thread Omar Sandoval
On Fri, Nov 30, 2018 at 04:32:40AM -0500, Huijin Park wrote: > From: "huijin.park" > > This patch changes the 'sectors' type to an u64. > In 32 bit system, the 'sectors' can accumulate up to about 2TiB. > If a 32 bit system makes i/o over 2TiB while running, > the 'sectors' will overflow. > As a

Re: [PATCH v3 01/10] sched: Provide sparsemask, a reduced contention bitmap

2018-11-27 Thread Omar Sandoval
On Tue, Nov 27, 2018 at 10:16:56AM -0500, Steven Sistare wrote: > On 11/9/2018 7:50 AM, Steve Sistare wrote: > > From: Steve Sistare > > > > Provide struct sparsemask and functions to manipulate it. A sparsemask is > > a sparse bitmap. It reduces cache contention vs the usual bitmap when many >

Re: linux-next: manual merge of the akpm-current tree with the btrfs-kdave tree

2018-10-05 Thread Omar Sandoval
On Fri, Oct 05, 2018 at 03:47:21PM +1000, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the akpm-current tree got a conflict in: > > include/linux/swap.h > > between commit: > > 0f83d16b8f1f ("mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS") > > from the btrfs-kdave t

Re: linux-next: build warning after merge of the block tree

2018-09-27 Thread Omar Sandoval
On Fri, Sep 28, 2018 at 11:11:24AM +1000, Stephen Rothwell wrote: > Hi Jens, > > After merging the block tree, today's linux-next build (arm > multi_v7_defconfig) produced this warning: > > block/kyber-iosched.c:84:22: warning: integer overflow in expression of type > 'long int' results in '7050

Re: [PATCH] btrfs: list usage cleanup

2018-09-27 Thread Omar Sandoval
On Wed, Sep 26, 2018 at 04:35:45PM +0800, zhong jiang wrote: > Trival cleanup, list_move_tail will implement the same function that > list_del() + list_add_tail() will do. hence just replace them. > > Signed-off-by: zhong jiang > --- > fs/btrfs/send.c | 3 +-- > 1 file changed, 1 insertion(+), 2

Re: [PATCH v3] proc/kcore: fix invalid memory access in multi-page read optimization

2018-09-04 Thread Omar Sandoval
we did not find any entry in the previous iteration > > Reset 'm' to NULL in that case at Omar Sandoval's suggestion. > > Fixes: bf991c2231117 ("proc/kcore: optimize multiple page reads") Reviewed-by: Omar Sandoval Thanks again for catching this! > Si

Re: [PATCH] proc/kcore: fix invalid memory access in multi-page read optimization

2018-09-04 Thread Omar Sandoval
On Wed, Aug 29, 2018 at 06:04:07AM +0200, Dominique Martinet wrote: > The 'm' kcore_list item can point to kclist_head, and it is incorrect to > look at m->addr / m->size in this case. > There is no choice but to run through the list of entries for every address > if we did not find any entry in th

[PATCH v4 1/9] proc/kcore: don't grab lock for kclist_add()

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval kclist_add() is only called at init time, so there's no point in grabbing any locks. We're also going to replace the rwlock with a rwsem, which we don't want to try grabbing during early boot. While we're here, mark kclist_add() with __init so that we

[PATCH v4 3/9] proc/kcore: replace kclist_lock rwlock with rwsem

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval Now we only need kclist_lock from user context and at fs init time, and the following changes need to sleep while holding the kclist_lock. Signed-off-by: Omar Sandoval --- fs/proc/kcore.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff

[PATCH v4 5/9] proc/kcore: hold lock during read

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval Now that we're using an rwsem, we can hold it during the entirety of read_kcore() and have a common return path. This is preparation for the next change. Signed-off-by: Omar Sandoval --- fs/proc/kcore.c | 70 - 1 file ch

[PATCH v4 7/9] proc/kcore: optimize multiple page reads

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval The current code does a full search of the segment list every time for every page. This is wasteful, since it's almost certain that the next page will be in the same segment. Instead, check if the previous segment covers the current page before doing the list search. S

[PATCH v4 2/9] proc/kcore: don't grab lock for memory hotplug notifier

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval The memory hotplug notifier kcore_callback() only needs kclist_lock to prevent races with __kcore_update_ram(), but we can easily eliminate that race by using an atomic xchg() in __kcore_update_ram(). This is preparation for converting kclist_lock to an rwsem. Reviewed-by

[PATCH v4 6/9] proc/kcore: clean up ELF header generation

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval Currently, the ELF file header, program headers, and note segment are allocated all at once, in some icky code dating back to 2.3. Programs tend to read the file header, then the program headers, then the note segment, all separately, so this is a waste of effort. It&#

[PATCH v4 9/9] proc/kcore: add vmcoreinfo note to /proc/kcore

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval The vmcoreinfo information is useful for runtime debugging tools, not just for crash dumps. A lot of this information can be determined by other means, but this is much more convenient, and it only adds a page at most to the file. Signed-off-by: Omar Sandoval --- fs/proc

[PATCH v4 0/9] /proc/kcore improvements

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval Hi, This series makes a few improvements to /proc/kcore. It fixes a couple of small issues in v3 but is otherwise the same. Patches 1, 2, and 3 are prep patches. Patch 4 is a fix/cleanup. Patch 5 is another prep patch. Patches 6 and 7 are optimizations to ->read(). Patc

[PATCH v4 8/9] crash_core: use VMCOREINFO_SYMBOL_ARRAY() for swapper_pg_dir

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval This is preparation for allowing CRASH_CORE to be enabled for any architecture. swapper_pg_dir is always either an array or a macro expanding to NULL. In the latter case, VMCOREINFO_SYMBOL() won't work, as it tries to take the address of the given symbol: #d

[PATCH v4 4/9] proc/kcore: fix memory hotplug vs multiple opens race

2018-07-25 Thread Omar Sandoval
From: Omar Sandoval There's a theoretical race condition that will cause /proc/kcore to miss a memory hotplug event: CPU0 CPU1 // hotplug event 1 kcore_need_update = 1 open_kcore() open_kcore() kcore_updat

Re: [PATCH v3 5/8] proc/kcore: hold lock during read

2018-07-25 Thread Omar Sandoval
On Wed, Jul 25, 2018 at 12:11:26AM +0900, Tetsuo Handa wrote: > On 2018/07/19 7:58, Omar Sandoval wrote: > > From: Omar Sandoval > > > > Now that we're using an rwsem, we can hold it during the entirety of > > read_kcore() and have a common return path. This

Re: linux-next: build failure after merge of the akpm-current tree

2018-07-25 Thread Omar Sandoval
On Mon, Jul 23, 2018 at 07:42:31PM +1000, Stephen Rothwell wrote: > Hi Andrew, > > After merging the akpm tree, today's linux-next build (sparc (32 bit) > defconfig) failed like this: > > In file included from kernel/crash_core.c:9:0: > kernel/crash_core.c: In function 'crash_save_vmcoreinfo_init

[PATCH v3 1/8] proc/kcore: don't grab lock for kclist_add()

2018-07-18 Thread Omar Sandoval
From: Omar Sandoval kclist_add() is only called at init time, so there's no point in grabbing any locks. We're also going to replace the rwlock with a rwsem, which we don't want to try grabbing during early boot. While we're here, mark kclist_add() with __init so that we

[PATCH v3 0/8] /proc/kcore improvements

2018-07-18 Thread Omar Sandoval
From: Omar Sandoval Hi, This series makes a few improvements to /proc/kcore. Patches 1, 2, and 3 are prep patches. Patch 4 is a fix/cleanup. Patch 5 is another prep patch. Patches 6 and 7 are optimizations to ->read(). Patch 8 adds vmcoreinfo to /proc/kcore. Again, based on v4.18-rc4 + Ja

[PATCH v3 4/8] proc/kcore: fix memory hotplug vs multiple opens race

2018-07-18 Thread Omar Sandoval
From: Omar Sandoval There's a theoretical race condition that will cause /proc/kcore to miss a memory hotplug event: CPU0 CPU1 // hotplug event 1 kcore_need_update = 1 open_kcore() open_kcore() kcore_updat

[PATCH v3 6/8] proc/kcore: clean up ELF header generation

2018-07-18 Thread Omar Sandoval
From: Omar Sandoval Currently, the ELF file header, program headers, and note segment are allocated all at once, in some icky code dating back to 2.3. Programs tend to read the file header, then the program headers, then the note segment, all separately, so this is a waste of effort. It&#

[PATCH v3 5/8] proc/kcore: hold lock during read

2018-07-18 Thread Omar Sandoval
From: Omar Sandoval Now that we're using an rwsem, we can hold it during the entirety of read_kcore() and have a common return path. This is preparation for the next change. Signed-off-by: Omar Sandoval --- fs/proc/kcore.c | 70 - 1 file ch

[PATCH v3 7/8] proc/kcore: optimize multiple page reads

2018-07-18 Thread Omar Sandoval
From: Omar Sandoval The current code does a full search of the segment list every time for every page. This is wasteful, since it's almost certain that the next page will be in the same segment. Instead, check if the previous segment covers the current page before doing the list search. S

[PATCH v3 3/8] proc/kcore: replace kclist_lock rwlock with rwsem

2018-07-18 Thread Omar Sandoval
From: Omar Sandoval Now we only need kclist_lock from user context and at fs init time, and the following changes need to sleep while holding the kclist_lock. Signed-off-by: Omar Sandoval --- fs/proc/kcore.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff

[PATCH v3 2/8] proc/kcore: don't grab lock for memory hotplug notifier

2018-07-18 Thread Omar Sandoval
From: Omar Sandoval The memory hotplug notifier kcore_callback() only needs kclist_lock to prevent races with __kcore_update_ram(), but we can easily eliminate that race by using an atomic xchg() in __kcore_update_ram(). This is preparation for converting kclist_lock to an rwsem. Signed-off-by

[PATCH v3 8/8] proc/kcore: add vmcoreinfo note to /proc/kcore

2018-07-18 Thread Omar Sandoval
From: Omar Sandoval The vmcoreinfo information is useful for runtime debugging tools, not just for crash dumps. A lot of this information can be determined by other means, but this is much more convenient, and it only adds a page at most to the file. Signed-off-by: Omar Sandoval --- fs/proc

Re: [PATCH v2 2/7] proc/kcore: replace kclist_lock rwlock with rwsem

2018-07-17 Thread Omar Sandoval
On Tue, Jul 17, 2018 at 08:27:53PM -0700, Andrew Morton wrote: > On Tue, 17 Jul 2018 20:24:05 -0700 Omar Sandoval wrote: > > > > > --- a/fs/proc/kcore.c > > > > +++ b/fs/proc/kcore.c > > > > @@ -59,8 +59,8 @@ struct memelfnote > > > &g

Re: [PATCH v2 7/7] proc/kcore: add vmcoreinfo note to /proc/kcore

2018-07-17 Thread Omar Sandoval
On Tue, Jul 17, 2018 at 07:44:21PM -0700, Andrew Morton wrote: > On Thu, 12 Jul 2018 17:09:39 -0700 Omar Sandoval wrote: > > > From: Omar Sandoval > > > > The vmcoreinfo information is useful for runtime debugging tools, not > > just for crash dumps. A lot of this

Re: [PATCH v2 2/7] proc/kcore: replace kclist_lock rwlock with rwsem

2018-07-17 Thread Omar Sandoval
On Tue, Jul 17, 2018 at 07:38:41PM -0700, Andrew Morton wrote: > On Thu, 12 Jul 2018 17:09:34 -0700 Omar Sandoval wrote: > > > From: Omar Sandoval > > > > Now we only need kclist_lock from user context and at fs init time, and > > the following changes n

Re: [PATCH v2 1/7] proc/kcore: don't grab lock for kclist_add()

2018-07-17 Thread Omar Sandoval
On Tue, Jul 17, 2018 at 07:35:04PM -0700, Andrew Morton wrote: > On Thu, 12 Jul 2018 17:09:33 -0700 Omar Sandoval wrote: > > > From: Omar Sandoval > > > > kclist_add() is only called at init time, so there's no point in > > grabbing any locks. We're

[PATCH v2 2/7] proc/kcore: replace kclist_lock rwlock with rwsem

2018-07-12 Thread Omar Sandoval
From: Omar Sandoval Now we only need kclist_lock from user context and at fs init time, and the following changes need to sleep while holding the kclist_lock. Signed-off-by: Omar Sandoval --- fs/proc/kcore.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions

[PATCH v2 5/7] proc/kcore: clean up ELF header generation

2018-07-12 Thread Omar Sandoval
From: Omar Sandoval Currently, the ELF file header, program headers, and note segment are allocated all at once, in some icky code dating back to 2.3. Programs tend to read the file header, then the program headers, then the note segment, all separately, so this is a waste of effort. It&#

[PATCH v2 4/7] proc/kcore: hold lock during read

2018-07-12 Thread Omar Sandoval
From: Omar Sandoval Now that we're using an rwsem, we can hold it during the entirety of read_kcore() and have a common return path. This is preparation for the next change. Signed-off-by: Omar Sandoval --- fs/proc/kcore.c | 70 - 1 file ch

[PATCH v2 1/7] proc/kcore: don't grab lock for kclist_add()

2018-07-12 Thread Omar Sandoval
From: Omar Sandoval kclist_add() is only called at init time, so there's no point in grabbing any locks. We're also going to replace the rwlock with a rwsem, which we don't want to try grabbing during early boot. Signed-off-by: Omar Sandoval --- fs/proc/kcore.c | 3 +-- 1

[PATCH v2 6/7] proc/kcore: optimize multiple page reads

2018-07-12 Thread Omar Sandoval
From: Omar Sandoval The current code does a full search of the segment list every time for every page. This is wasteful, since it's almost certain that the next page will be in the same segment. Instead, check if the previous segment covers the current page before doing the list search. S

[PATCH v2 7/7] proc/kcore: add vmcoreinfo note to /proc/kcore

2018-07-12 Thread Omar Sandoval
From: Omar Sandoval The vmcoreinfo information is useful for runtime debugging tools, not just for crash dumps. A lot of this information can be determined by other means, but this is much more convenient. Signed-off-by: Omar Sandoval --- fs/proc/Kconfig| 1 + fs/proc/kcore.c

[PATCH v2 3/7] proc/kcore: fix memory hotplug vs multiple opens race

2018-07-12 Thread Omar Sandoval
From: Omar Sandoval There's a theoretical race condition that will cause /proc/kcore to miss a memory hotplug event: CPU0 CPU1 // hotplug event 1 kcore_need_update = 1 open_kcore() open_kcore() kcore_updat

[PATCH v2 0/7] /proc/kcore improvements

2018-07-12 Thread Omar Sandoval
From: Omar Sandoval Hi, This series makes a few improvements to /proc/kcore. Patches 1 and 2 are prep patches. Patch 3 is a fix/cleanup. Patch 4 is another prep patch. Patches 5 and 6 are optimizations to ->read(). Patch 7 adds vmcoreinfo to /proc/kcore (apparently I'm not the only

Re: [PATCH 5/7] proc/kcore: clean up ELF header generation

2018-07-07 Thread Omar Sandoval
rong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Omar-Sandoval/proc-kcore-improvements/20180707-052548 > reproduce: > # apt-get install sparse > make ARCH=x86_64 allmodconfig >

[PATCH 2/7] proc/kcore: replace kclist_lock rwlock with rwsem

2018-07-06 Thread Omar Sandoval
From: Omar Sandoval Now we only need kclist_lock from user context and at fs init time, and the following changes need to sleep while holding the kclist_lock. Signed-off-by: Omar Sandoval --- fs/proc/kcore.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions

[PATCH 1/7] proc/kcore: don't grab lock for kclist_add()

2018-07-06 Thread Omar Sandoval
From: Omar Sandoval kclist_add() is only called at init time, so there's no point in grabbing any locks. We're also going to replace the rwlock with a rwsem, which we don't want to try grabbing during early boot. Signed-off-by: Omar Sandoval --- fs/proc/kcore.c | 3 +-- 1

[PATCH 0/7] /proc/kcore improvements

2018-07-06 Thread Omar Sandoval
From: Omar Sandoval Hi, This series makes a few improvements to /proc/kcore. Patches 1 and 2 are prep patches. Patch 3 is a fix/cleanup. Patch 4 is another prep patch. Patches 5 and 6 are optimizations to ->read(). Patch 7 adds vmcoreinfo to /proc/kcore. This series is based on v4.18-

[PATCH 3/7] proc/kcore: fix memory hotplug vs multiple opens race

2018-07-06 Thread Omar Sandoval
From: Omar Sandoval There's a theoretical race condition that will cause /proc/kcore to miss a memory hotplug event: CPU0 CPU1 // hotplug event 1 kcore_need_update = 1 open_kcore() open_kcore() kcore_updat

[PATCH 7/7] proc/kcore: add vmcoreinfo note to /proc/kcore

2018-07-06 Thread Omar Sandoval
From: Omar Sandoval The vmcoreinfo information is useful for runtime debugging tools, not just for crash dumps. A lot of this information can be determined by other means, but this is much more convenient. Signed-off-by: Omar Sandoval --- fs/proc/Kconfig| 1 + fs/proc/kcore.c

[PATCH 4/7] proc/kcore: hold lock during read

2018-07-06 Thread Omar Sandoval
From: Omar Sandoval Now that we're using an rwsem, we can hold it during the entirety of read_kcore() and have a common return path. This is preparation for the next change. Signed-off-by: Omar Sandoval --- fs/proc/kcore.c | 70 - 1 file ch

[PATCH 6/7] proc/kcore: optimize multiple page reads

2018-07-06 Thread Omar Sandoval
From: Omar Sandoval The current code does a full search of the segment list every time for every page. This is wasteful, since it's almost certain that the next page will be in the same segment. Instead, check if the previous segment covers the current page before doing the list search. S

[PATCH 5/7] proc/kcore: clean up ELF header generation

2018-07-06 Thread Omar Sandoval
From: Omar Sandoval Currently, the ELF file header, program headers, and note segment are allocated all at once, in some icky code dating back to 2.3. Programs tend to read the file header, then the program headers, then the note segment, all separately, so this is a waste of effort. It&#

Re: [PATCH] block: kyber: make kyber more friendly with merging

2018-05-22 Thread Omar Sandoval
On Tue, May 22, 2018 at 10:48:29PM +0800, Jianchao Wang wrote: > Currently, kyber is very unfriendly with merging. kyber depends > on ctx rq_list to do merging, however, most of time, it will not > leave any requests in ctx rq_list. This is because even if tokens > of one domain is used up, kyber w

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-21 Thread Omar Sandoval
On Mon, May 21, 2018 at 03:11:08PM +, Bart Van Assche wrote: > On Sun, 2018-05-20 at 19:58 -0400, Kent Overstreet wrote: > > On Sun, May 20, 2018 at 11:40:45PM +, Bart Van Assche wrote: > > > On Sun, 2018-05-20 at 19:21 -0400, Kent Overstreet wrote: > > > > I really have better things to do

[PATCH] Documentation: document hung_task_panic kernel parameter

2018-05-21 Thread Omar Sandoval
From: Omar Sandoval This parameter has been around since commit e162b39a368f ("softlockup: decouple hung tasks check from softlockup detection") in 2009 but was never documented. Signed-off-by: Omar Sandoval --- Documentation/admin-guide/kernel-parameters.txt | 10 ++ 1 fi

Re: [PATCH] lockdep: fix fs_reclaim annotation

2018-04-24 Thread Omar Sandoval
On Fri, Apr 20, 2018 at 10:17:42AM +0200, Peter Zijlstra wrote: > On Sun, Apr 15, 2018 at 12:42:25AM -0700, Omar Sandoval wrote: > > From: Omar Sandoval > > > > While revisiting my Btrfs swapfile series [1], I introduced a situation > > in which reclaim would lock i

Re: [PATCH 2/2] tracing/events: block: dev_t via driver core for plug and unplug events

2018-04-19 Thread Omar Sandoval
On Mon, Apr 16, 2018 at 06:33:27PM +0200, Steffen Maier wrote: > Hi Greg, > > On 04/15/2018 10:31 AM, Greg Kroah-Hartman wrote: > > On Fri, Apr 13, 2018 at 03:07:18PM +0200, Steffen Maier wrote: > > > diff --git a/include/trace/events/block.h b/include/trace/events/block.h > > > index a13613d27cee

[PATCH] lockdep: fix fs_reclaim annotation

2018-04-15 Thread Omar Sandoval
From: Omar Sandoval While revisiting my Btrfs swapfile series [1], I introduced a situation in which reclaim would lock i_rwsem, and even though the swapon() path clearly made GFP_KERNEL allocations while holding i_rwsem, I got no complaints from lockdep. It turns out that the rework of the

Re: [PATCH] test/nvme/003: add test case for patch "nvme: don't send keep-alives to the discovery controller"

2018-04-06 Thread Omar Sandoval
On Tue, Mar 27, 2018 at 11:31:47AM +0200, Johannes Thumshirn wrote: > Add a regression test for the patch titled "nvme: don't send > keep-alives to the discovery controller". > > This patch creates a local loopback nvme target and then connects to > it. If the patch is not applied we see two error

Re: atomic file replacing status?

2018-04-06 Thread Omar Sandoval
On Fri, Apr 06, 2018 at 02:22:06PM -0700, Randy Dunlap wrote: > On 02/11/2018 10:40 PM, Andrew Kelley wrote: > > Whatever happened to this patch? > > > > https://patchwork.kernel.org/patch/9636735/ > > > > It looks fine and addresses a legitimate issue. > > > > Please CC me on replies as I am no

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Omar Sandoval
On Fri, Apr 06, 2018 at 05:43:43PM +0200, Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 10:55:03PM +0900, Tetsuo Handa wrote: > > Peter Zijlstra wrote: > > > On Fri, Apr 06, 2018 at 09:04:18PM +0900, Tetsuo Handa wrote: > > > > + /* Temporary hack for handling lock imbalance. */ > > > > +

Please add 21035965f60b ("bitmap: fix memset optimization on big-endian systems") to the stable tree

2018-04-03 Thread Omar Sandoval
Just wanted to make sure this doesn't get missed because I misspelled the stable email address in the patch. It applies to v4.13+.

Re: [PATCH] bitmap: fix memset optimization on big-endian systems

2018-04-03 Thread Omar Sandoval
On Mon, Apr 02, 2018 at 04:49:39PM -0700, Linus Torvalds wrote: > On Mon, Apr 2, 2018 at 4:37 PM, Linus Torvalds > wrote: > > > > We should probably have at least switched it to "unsigned long int" > > I meant just "unsigned int", of course. > > Right now we occasionally have a silly 64-bit fiel

Re: [PATCH] bitmap: fix memset optimization on big-endian systems

2018-04-02 Thread Omar Sandoval
On Mon, Apr 02, 2018 at 03:58:31PM -0700, Omar Sandoval wrote: > From: Omar Sandoval > > Commit 2a98dc028f91 introduced an optimization to bitmap_{set,clear}() > which uses memset() when the start and length are constants aligned to a > byte. This is wrong on big-endian systems;

[PATCH] bitmap: fix memset optimization on big-endian systems

2018-04-02 Thread Omar Sandoval
From: Omar Sandoval Commit 2a98dc028f91 introduced an optimization to bitmap_{set,clear}() which uses memset() when the start and length are constants aligned to a byte. This is wrong on big-endian systems; our bitmaps are arrays of unsigned long, so bit n is not at byte n / 8 in memory. This

Re: [PATCH] bpf: whitelist syscalls for error injection

2018-03-13 Thread Omar Sandoval
On Tue, Mar 13, 2018 at 04:16:27PM -0700, Howard McLauchlan wrote: > Error injection is a useful mechanism to fail arbitrary kernel > functions. However, it is often hard to guarantee an error propagates > appropriately to user space programs. By injecting into syscalls, we can > return arbitrary v

Re: [PATCH] nbd: fix return value in error handling path

2018-02-26 Thread Omar Sandoval
87b1c2 ("nbd: add a basic netlink interface") Reviewed-by: Omar Sandoval > Signed-off-by: Gustavo A. R. Silva > --- > drivers/block/nbd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c > index 5f2

Re: [PATCH 4.14 023/159] mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y

2018-01-14 Thread Omar Sandoval
VMCOREINFO_SYMBOL(contig_page_data); > > #endif > > #ifdef CONFIG_SPARSEMEM > > - VMCOREINFO_SYMBOL(mem_section); > > + VMCOREINFO_SYMBOL_ARRAY(mem_section); > > VMCOREINFO_LENGTH(mem_section, NR_SECTION_ROOTS); > > VMCOREINFO_STRUCT_SIZE(mem_section); > > VMCOREINFO

[tip:sched/core] sched/wait: Fix add_wait_queue() behavioral change

2017-12-06 Thread tip-bot for Omar Sandoval
Commit-ID: c6b9d9a33029014446bd9ed84c1688f6d3d4eab9 Gitweb: https://git.kernel.org/tip/c6b9d9a33029014446bd9ed84c1688f6d3d4eab9 Author: Omar Sandoval AuthorDate: Tue, 5 Dec 2017 23:15:31 -0800 Committer: Ingo Molnar CommitDate: Wed, 6 Dec 2017 19:30:34 +0100 sched/wait: Fix

[PATCH] sched/wait: fix add_wait_queue() behavior change

2017-12-05 Thread Omar Sandoval
From: Omar Sandoval Commit 50816c48997a ("sched/wait: Standardize internal naming of wait-queue entries") changed the behavior of add_wait_queue() from inserting the wait entry at the head of the wait queue to the tail of the wait queue. That commit was a cleanup and didn

add_wait_queue() (unintentional?) behavior change in v4.13

2017-11-29 Thread Omar Sandoval
Hi, Ingo, Commit 50816c48997a ("sched/wait: Standardize internal naming of wait-queue entries") changed the behavior of add_wait_queue() from inserting the wait entry at the head of the wait queue to the tail of the wait queue. This is the relevant hunk: -void add_wait_queue(wait_queue_head_t *q,

Re: [PATCH] block: Invalidate cache on discard v2

2017-10-24 Thread Omar Sandoval
On Wed, Mar 22, 2017 at 11:29:25PM +0400, Dmitry Monakhov wrote: > It is reasonable drop page cache on discard, otherwise that pages may > be written by writeback second later, so thin provision devices will > not be happy. This seems to be a security leak in case of secure discard > case. > > A

Re: [PATCH] btrfs: Clean up unused variables in free-space-tree.c

2017-10-12 Thread Omar Sandoval
On Thu, Oct 12, 2017 at 10:40:42PM +0100, Christos Gkekas wrote: > Remove variables 'start' and 'end', which are set but never used. Oops. Reviewed-by: Omar Sandoval > Signed-off-by: Christos Gkekas > --- > fs/btrfs/free-space-tree.c | 4 > 1 file chan

Re: [PATCH V6 5/5] blk-mq-sched: don't dequeue request until all in ->dispatch are flushed

2017-10-10 Thread Omar Sandoval
ake sure that request isn't dequeued until ->dispatch is > flushed. > > Reviewed-by: Bart Van Assche > Reviewed-by: Christoph Hellwig I think this will do for now. Reviewed-by: Omar Sandoval > Signed-off-by: Ming Lei > --- &

Re: [PATCH V6 4/5] blk-mq-sched: improve dispatching from sw queue

2017-10-10 Thread Omar Sandoval
. This still didn't address Jens' concern about using q->queue_depth as the heuristic for whether to do the full sw queue flush or one-by-one dispatch. The EWMA approach is a bit too complex for now, can you please try the heuristic of whether the driver ever returned BLK_STS_RESOURCE?

Re: [PATCH V6 3/5] sbitmap: introduce __sbitmap_for_each_set()

2017-10-10 Thread Omar Sandoval
On Mon, Oct 09, 2017 at 07:24:22PM +0800, Ming Lei wrote: > We need to iterate ctx starting from any ctx in round robin > way, so introduce this helper. > > Cc: Omar Sandoval Reviewed-by: Omar Sandoval > Signed-off-by: Ming Lei > --- > include

Re: [PATCH V6 1/5] blk-mq-sched: fix scheduler bad performance

2017-10-10 Thread Omar Sandoval
, ...) when mq-deadline/kyber > is used by not taking requests if hw queue is busy. > > Reviewed-by: Bart Van Assche > Reviewed-by: Christoph Hellwig Reviewed-by: Omar Sandoval > Signed-off-by: Ming Lei > --- > block/blk-mq-sched.c | 12 ++-- > 1 file changed, 6

Re: [PATCH blktests v2] loop/002: Regression testing for loop device flush

2017-08-18 Thread Omar Sandoval
On Tue, Jun 27, 2017 at 12:01:47PM +0800, James Wang wrote: > Add a regression testing for loop device. when an unbound device > be close that take too long time. kernel will consume serveral orders > of magnitude more wall time than it does for a mounted device. James, sorry I forgot about this.

Re: [PATCH] loop: fix to a race condition due to the early registration of device

2017-08-08 Thread Omar Sandoval
On Mon, Aug 07, 2017 at 03:37:50PM +0300, Anton Volkov wrote: > The early device registration made possible a race leading to allocations > of disks with wrong minors. > > This patch moves the device registration further down the loop_init > function to make the race infeasible. > > Found by Linu

Re: [PATCH] block/Kconfig.iosched: Enable BFQ on DEFAULT_IOSCHED

2017-07-04 Thread Omar Sandoval
On Tue, Jul 04, 2017 at 01:35:18PM -0300, Ben Mezger wrote: > This patch, allows BFQ to be chosen in the Default I/O scheduler prompt. Nak, this doesn't work. The default scheduler Kconfig option is for the legacy block path, but BFQ is a blk-mq scheduler. > Signed-off-by: Ben Mezger > --- > bl

Re: [PATCH blktests] loop/002: Regression testing for loop device flush

2017-06-26 Thread Omar Sandoval
Hi, James, thanks for sending this in. Sorry for the delay, I've been out of the office for a couple of weeks. A few comments below. On Thu, Jun 08, 2017 at 08:28:12PM +0800, James Wang wrote: > Add a regression testing for loop device. when an unbound device > be close that take too long time. ke

Re: [PATCH 7/8] blk-mq: create hctx for each present CPU

2017-06-07 Thread Omar Sandoval
On Sat, Jun 03, 2017 at 04:04:02PM +0200, Christoph Hellwig wrote: > Currently we only create hctx for online CPUs, which can lead to a lot > of churn due to frequent soft offline / online operations. Instead > allocate one for each present CPU to avoid this and dramatically simplify > the code. >

Re: [lkp-robot] [btrfs] beeeccca9b: WARNING:at_mm/util.c:#kvmalloc_node

2017-05-31 Thread Omar Sandoval
On Wed, May 31, 2017 at 11:19:05AM +0200, Michal Hocko wrote: > On Wed 31-05-17 02:12:02, Omar Sandoval wrote: > > On Wed, May 31, 2017 at 08:51:28AM +0200, Michal Hocko wrote: > > > On Wed 31-05-17 14:30:33, kernel test robot wrote: > > > > > > >

Re: [lkp-robot] [btrfs] beeeccca9b: WARNING:at_mm/util.c:#kvmalloc_node

2017-05-31 Thread Omar Sandoval
On Wed, May 31, 2017 at 08:51:28AM +0200, Michal Hocko wrote: > On Wed 31-05-17 14:30:33, kernel test robot wrote: > > > > FYI, we noticed the following commit: > > > > commit: beeeccca9bebcec386cc31c250cff8a06cf27034 ("btrfs: Use kvzalloc > > instead of kzalloc/vmalloc in alloc_bitmap") > > htt

Re: [PATCH] btrfs: Use kvzalloc instead of kzalloc/vmalloc in alloc_bitmap

2017-05-25 Thread Omar Sandoval
On Thu, May 25, 2017 at 12:18:02PM -0700, Vinnie Magro wrote: > Replace alloc_bitmap with call to kvzalloc. kvzalloc preserves the > same fallback heuristic. Looks good, thanks. Reviewed-by: Omar Sandoval > Signed-off-by: Vinnie Magro > --- > fs/btrfs/free-sp

depmod gets stuck in symlink cycle in arch/arm/boot/dts/include

2017-05-12 Thread Omar Sandoval
Hi, Linux kernel commit 4027494ae6e3 ("ARM: dts: add arm/arm64 include symlinks") introduced a couple of symlink cycles: $ ls -al arch/arm{,64}/boot/dts/include arch/arm64/boot/dts/include: total 12 drwxr-xr-x 1 osandov users 38 May 11 14:01 . drwxr-xr-x 1 osandov users 320 Jan 25 20:44 .. lrwxr

[tip:efi/urgent] x86/efi: Don't try to reserve runtime regions

2017-04-12 Thread tip-bot for Omar Sandoval
Commit-ID: 6f6266a561306e206e0e31a5038f029b6a7b1d89 Gitweb: http://git.kernel.org/tip/6f6266a561306e206e0e31a5038f029b6a7b1d89 Author: Omar Sandoval AuthorDate: Wed, 12 Apr 2017 16:27:19 +0100 Committer: Ingo Molnar CommitDate: Thu, 13 Apr 2017 08:09:27 +0200 x86/efi: Don't t

[PATCH] x86/efi: don't try to reserve runtime regions

2017-04-04 Thread Omar Sandoval
From: Omar Sandoval Reserving a runtime region results in splitting the efi memory descriptors for the runtime region. This results in runtime region descriptors with bogus memory mappings, leading to interesting crashes like the following during a kexec: [0.001000] general protection fault

Re: kexec regression since 4.9 caused by efi

2017-04-03 Thread Omar Sandoval
On Thu, Mar 16, 2017 at 10:50:48AM -0700, Omar Sandoval wrote: > On Thu, Mar 16, 2017 at 12:41:32PM +, Matt Fleming wrote: > > On Mon, 13 Mar, at 03:37:48PM, Dave Young wrote: > > > > > > Omar, could you try below patch? Looking at the efi_mem_desc_lookup, it >

[PATCH] blk-mq: add random early detection I/O scheduler

2017-04-01 Thread Omar Sandoval
From: Omar Sandoval This patch introduces a new I/O scheduler based on the classic random early detection active queue management algorithm [1]. Random early detection is one of the simplest and most studied AQM algorithms for networking, but until now, it hasn't been applied to dis

Re: [RFC] AT_NO_JUMPS/LOOKUP_NO_JUMPS

2017-03-20 Thread Omar Sandoval
On Sun, Mar 19, 2017 at 06:46:01PM -0700, Linus Torvalds wrote: > On Sun, Mar 19, 2017 at 10:24 AM, Al Viro wrote: > > Bringing back an old conversation - what do you think about the > > potential usefulness of the following ...at() option: > > * no mountpoint crossings allowed (mo

Re: kexec regression since 4.9 caused by efi

2017-03-16 Thread Omar Sandoval
ze) > return; > } > > + /* No need to reserve regions that will never be freed. */ > + if (md.attribute & EFI_MEMORY_RUNTIME) > + return; > + > size += addr % EFI_PAGE_SIZE; > size = round_up(size, EFI_PAGE_SIZE); > addr = round_down(addr, EFI_PAGE_SIZE); This works for me. Reported-and-tested-by: Omar Sandoval

Re: kexec regression since 4.9 caused by efi

2017-03-09 Thread Omar Sandoval
On Thu, Mar 09, 2017 at 02:38:06PM +0800, Dave Young wrote: > Add efi/kexec list. > > On 03/08/17 at 12:16pm, Omar Sandoval wrote: [snip] > I have no more clue yet from your provided log, but the runtime value is > odd to me. It is set in below code: > > arch/x

Re: kexec regression since 4.9 caused by efi

2017-03-08 Thread Omar Sandoval
On Thu, Mar 09, 2017 at 10:21:36AM +0800, Dave Young wrote: > I have no esrt machine to test, can you share the full kernel log with > efi=debug in kernel cmdline? > > *) normal boot kernel log without the reverting > *) kexec boot log with and without the reverting Attached. [0.00] Linux

kexec regression since 4.9 caused by efi

2017-03-08 Thread Omar Sandoval
Hi, everyone, Since 4.9, kexec results in the following panic on some of our servers: [0.001000] general protection fault: [#1] SMP [0.001000] Modules linked in: [0.001000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.11.0-rc1 #53 [0.001000] Hardware name: Wiwynn Leopard-Orv2/

  1   2   3   4   >