Re: [PATCH 1/6] block: add a bio_reuse helper

2018-06-11 Thread Kent Overstreet
On Mon, Jun 11, 2018 at 09:48:01PM +0200, Christoph Hellwig wrote: > This abstracts out a way to reuse a bio without destroying the > data pointers. What is the point of this? What "data pointers" does it not destroy? > > Signed-off-by: Christoph Hellwig > --- > block/bio.c | 20 ++

[PATCH] lightnvm: pblk: add asynchronous partial read

2018-06-11 Thread Heiner Litz
In the read path, partial reads are currently performed synchronously which affects performance for workloads that generate many partial reads. This patch adds an asynchronous partial read path as well as the required partial read ctx. Signed-off-by: Heiner Litz --- drivers/lightnvm/pblk-read.c

Re: [RFC] cleanup bcache bio handling

2018-06-11 Thread Coly Li
On 2018/6/12 3:48 AM, Christoph Hellwig wrote: > Hi all, > > this series cleans up various places where bcache is way too intimate > with bio internals. This is intended as a baseline for the multi-page > biovec work, which requires some nasty workarounds for the existing > code. > > Note that I

Re: [PATCH] block/021: test setting 'nr_requests'

2018-06-11 Thread Omar Sandoval
On Sat, Jun 02, 2018 at 01:02:04PM +0800, Ming Lei wrote: > 'nr_requests' can be a bit different for 'none' scheduler, > and especially current blk-mq can only decrease this value > for 'none.' > > The patch of 'blk-mq: fix read/write 'nr_requests' in case of 'none' > scheduler' > has been sent o

[PATCH 4/6] bcache: clean up bio reuse for struct dirty_io

2018-06-11 Thread Christoph Hellwig
Instead of reinitializing the bio everytime we can call bio_reuse when reusing it. Also moves the private data initialization out of dirty_init, which is renamed to suit the remaining functionality. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/writeback.c | 26 +---

[RFC] cleanup bcache bio handling

2018-06-11 Thread Christoph Hellwig
Hi all, this series cleans up various places where bcache is way too intimate with bio internals. This is intended as a baseline for the multi-page biovec work, which requires some nasty workarounds for the existing code. Note that I do not have a bcache test setup, so this will require some car

[PATCH 1/6] block: add a bio_reuse helper

2018-06-11 Thread Christoph Hellwig
This abstracts out a way to reuse a bio without destroying the data pointers. Signed-off-by: Christoph Hellwig --- block/bio.c | 20 include/linux/bio.h | 1 + 2 files changed, 21 insertions(+) diff --git a/block/bio.c b/block/bio.c index 70c4e1b6dd45..fa1b7ab50784

[PATCH 2/6] bcache: use bio_reuse instead of bio_reinit where applicable

2018-06-11 Thread Christoph Hellwig
Use the bio_reuse helper instead of rebuilding the bio_vecs and size for bios that get reused for the same data. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/request.c | 5 + drivers/md/bcache/super.c | 6 ++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/driv

[PATCH 6/6] bcache: use bio_add_page instead of open coded bio manipulation

2018-06-11 Thread Christoph Hellwig
Let bch_bio_alloc_pages and bch_bio_map set up the bio vec information and bi_size. This also means no additional bch_bio_map call with a NULL argument is needed before bch_bio_alloc_pages. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/btree.c | 16 +++- drivers/md/bcache/debug

[PATCH 3/6] bcache: clean up bio reuse for struct moving_io

2018-06-11 Thread Christoph Hellwig
Instead of reinitializing the bio everytime we can call bio_reuse when reusing it. Also removes the remainder of the moving_init helper to improve readability. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/movinggc.c | 40 +--- 1 file changed, 19 inserti

[PATCH 5/6] bcache: don't clone bio in bch_data_verify

2018-06-11 Thread Christoph Hellwig
We immediately overwrite the biovec array, so instead just allocate a new bio and copy over the disk, setor and size. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/debug.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/md/bcache/debug.c b/drivers/md/bca

Re: [PATCH] bdi: Fix another oops in wb_workfn()

2018-06-11 Thread Jan Kara
On Mon 11-06-18 09:01:31, Tejun Heo wrote: > Hello, > > On Mon, Jun 11, 2018 at 11:12:48AM +0200, Jan Kara wrote: > > However this is wrong and so is the patch. The problem is in > > cgwb_bdi_unregister() which does cgwb_kill() and thus drops bdi's > > reference to wb structures before going throu

Re: [PATCH] bdi: Fix another oops in wb_workfn()

2018-06-11 Thread Tejun Heo
Hello, On Mon, Jun 11, 2018 at 11:12:48AM +0200, Jan Kara wrote: > However this is wrong and so is the patch. The problem is in > cgwb_bdi_unregister() which does cgwb_kill() and thus drops bdi's > reference to wb structures before going through the list of wbs again and > calling wb_shutdown() on

Re: [PATCH 1/1] blk-mq: reinit q->tag_set_list entry only after grace period

2018-06-11 Thread Jens Axboe
On 6/10/18 2:38 PM, Roman Pen wrote: > It is not allowed to reinit q->tag_set_list list entry while RCU grace > period has not completed yet, otherwise the following soft lockup in > blk_mq_sched_restart() happens: > > [ 1064.252652] watchdog: BUG: soft lockup - CPU#12 stuck for 23s! [fio:9270] >

Re: [PATCH 07/13] memcontrol: schedule throttling if we are congested

2018-06-11 Thread Johannes Weiner
On Tue, Jun 05, 2018 at 09:29:42AM -0400, Josef Bacik wrote: > From: Tejun Heo > > Memory allocations can induce swapping via kswapd or direct reclaim. If > we are having IO done for us by kswapd and don't actually go into direct > reclaim we may never get scheduled for throttling. So instead c

Re: [PATCH 05/13] swap,blkcg: issue swap io with the appropriate context

2018-06-11 Thread Johannes Weiner
On Tue, Jun 05, 2018 at 09:29:40AM -0400, Josef Bacik wrote: > From: Tejun Heo > > For backcharging we need to know who the page belongs to when swapping > it out. > > Signed-off-by: Tejun Heo > Signed-off-by: Josef Bacik Acked-by: Johannes Weiner

Re: [PATCH 1/1] blk-mq: reinit q->tag_set_list entry only after grace period

2018-06-11 Thread Bart Van Assche
On Sun, 2018-06-10 at 22:38 +0200, Roman Pen wrote: > It is not allowed to reinit q->tag_set_list list entry while RCU grace > period has not completed yet, otherwise the following soft lockup in > blk_mq_sched_restart() happens: Please add the following: Fixes: 705cda97ee3a ("blk-mq: Make it saf

Re: [PATCH] bdi: Fix another oops in wb_workfn()

2018-06-11 Thread Jan Kara
On Sat 09-06-18 23:00:05, Tetsuo Handa wrote: > From 014c4149f2e24cd26b278b32d5dfda056eecf093 Mon Sep 17 00:00:00 2001 > From: Tetsuo Handa > Date: Sat, 9 Jun 2018 22:47:52 +0900 > Subject: [PATCH] bdi: Fix another oops in wb_workfn() > > syzbot is reporting NULL pointer dereference at wb_workfn(

Re: mainline boot is broken: KASAN: use-after-free in blk_flush_complete_seq

2018-06-11 Thread Dmitry Vyukov
On Sat, Jun 9, 2018 at 2:33 PM, Jens Axboe wrote: > On 6/9/18 3:34 AM, Dmitry Vyukov wrote: >> Hi, >> >> Boot of mainline kernel is currently broken. >> On commit 7d3bf613e99abbd96ac7b90ee3694a246c975021. >> Config: >> https://gist.githubusercontent.com/dvyukov/9f7f1fd9e477efd85b221b3a21036c20/raw