[PATCH 16/25] block: Refactor bio_clone_bioset() for immutable biovecs

2013-11-26 Thread Kent Overstreet
for which bi_idx and bi_bvec done are 0 - like they would be if the caller had just allocated a new bio. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk --- fs/bio.c | 60 +++- 1 file changed, 47 insertions(+), 13

[PATCH 08/25] block: Immutable bio vecs

2013-11-26 Thread Kent Overstreet
this for interesting things, like efficient bio splitting. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk Cc: Lars Ellenberg drbd-...@lists.linbit.com Cc: Paul Clements paul.cleme...@steeleye.com Cc: drbd-u...@lists.linbit.com Cc: nbd-gene...@lists.sourceforge.net

[PATCH 10/25] bio-integrity: Convert to bvec_iter

2013-11-26 Thread Kent Overstreet
The bio integrity is also stored in a bvec array, so if we use the bvec iter code we just added, the integrity code won't need to implement its own iteration stuff (bio_integrity_mark_head(), bio_integrity_mark_tail()) Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax

[PATCH 09/25] block: Convert bio_copy_data() to bvec_iter

2013-11-26 Thread Kent Overstreet
Our fancy new bvec iterator makes code like this much easier to write. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk --- fs/bio.c | 60 +--- 1 file changed, 25 insertions(+), 35 deletions(-) diff --git

[PATCH 12/25] block: Convert drivers to immutable biovecs

2013-11-26 Thread Kent Overstreet
Now that we've got a mechanism for immutable biovecs - bi_iter.bi_bvec_done - we need to convert drivers to use primitives that respect it instead of using the bvec array directly. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk Cc: NeilBrown ne...@suse.de Cc

[PATCH 13/25] aoe: Convert to immutable biovecs

2013-11-26 Thread Kent Overstreet
members are effectively renamed: buf-resid - buf-iter.bi_size buf-sector - buf-iter.bi_sector f-bcnt - f-iter.bi_size f-lba - f-iter.bi_sector Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk Cc: Ed L. Cashin ecas...@coraid.com --- drivers

[PATCH 02/25] block: Convert various code to bio_for_each_segment()

2013-11-26 Thread Kent Overstreet
With immutable biovecs we don't want code accessing bi_io_vec directly - the uses this patch changes weren't incorrect since they all own the bio, but it makes the code harder to audit for no good reason - also, this will help with multipage bvecs later. Signed-off-by: Kent Overstreet k

[PATCH 11/25] block: Kill bio_segments()/bi_vcnt usage

2013-11-26 Thread Kent Overstreet
in a couple patches) Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk Cc: Neil Brown ne...@suse.de Cc: Nagalakshmi Nandigama nagalakshmi.nandig...@lsi.com Cc: Sreekanth Reddy sreekanth.re...@lsi.com Cc: James E.J. Bottomley jbottom...@parallels.com --- drivers/block/ps3disk.c

Re: [PATCH 4/5] blk-lib.c: generic_make_request() handles large bios now

2013-11-27 Thread Kent Overstreet
On Wed, Nov 27, 2013 at 04:54:05AM -0800, Christoph Hellwig wrote: int blkdev_issue_discard(struct block_device *bdev, sector_t sector, sector_t nr_sects, gfp_t gfp_mask, unsigned long flags) { - DECLARE_COMPLETION_ONSTACK(wait); struct request_queue *q =

Re: [patch 1/4] percpu_ida: make percpu_ida percpu size/batch configurable

2013-10-11 Thread Kent Overstreet
On Fri, Oct 11, 2013 at 03:18:03PM +0800, Shaohua Li wrote: Make percpu_ida percpu size/batch configurable. The block-mq-tag will use it. Can you explain the justification for this? Performance...? Signed-off-by: Shaohua Li s...@fusionio.com --- include/linux/percpu_ida.h | 18

Re: [patch 2/4] percpu_ida: add percpu_ida_for_each_free

2013-10-11 Thread Kent Overstreet
On Fri, Oct 11, 2013 at 03:18:04PM +0800, Shaohua Li wrote: Add a new API to iterate free ids. blk-mq-tag will use it. Signed-off-by: Shaohua Li s...@fusionio.com --- include/linux/percpu_ida.h |3 +++ lib/percpu_ida.c | 44 2

Re: [patch 3/4] percpu_ida: add an API to return free tags

2013-10-11 Thread Kent Overstreet
On Fri, Oct 11, 2013 at 03:18:05PM +0800, Shaohua Li wrote: add an API to return free tags, blk-mq-tag will use it Can you explain how this is going to be used? Seems like something that could be prone to misuse, try and convince me there isn't a better way to do what it's for.

Re: [PATCH 16/22] dm: Refactor for new bio cloning/splitting

2013-10-11 Thread Kent Overstreet
On Fri, Oct 11, 2013 at 05:16:42PM -0400, Mike Snitzer wrote: On Fri, Oct 11 2013 at 12:13am -0400, Kent Overstreet k...@daterainc.com wrote: On Sun, Oct 06, 2013 at 08:14:10PM -0400, Mike Snitzer wrote: Please fold this fix into your for-jens branch, thanks. (Could

[GIT PULL] Immutable biovecs

2013-10-15 Thread Kent Overstreet
: block: Don't save/copy bvec array anymore, share when cloning (2013-10-11 15:45:50 -0700) Kent Overstreet (23): block: Use rw_copy_check_uvector() block: Consolidate duplicated bio_trim() implementations bcache: Kill

[GIT PULL] bcache for 3.13

2013-11-10 Thread Kent Overstreet
): bcache: defensively handle format strings Kent Overstreet (52): bcache: Fix dirty_data accounting bcache: Fix a journalling performance bug bcache: Fix a lockdep splat bcache: Use blkdev_issue_discard() bcache: Add on error panic/unregister setting bcache: Stripe size

Re: [GIT PULL] direct IO support for loop driver

2013-11-20 Thread Kent Overstreet
On Wed, Nov 20, 2013 at 01:38:19PM -0800, Linus Torvalds wrote: On Wed, Nov 20, 2013 at 1:19 PM, Linus Torvalds torva...@linux-foundation.org wrote: At that point, I just couldn't take it any more. Just to clarify, I think it might be fixable. But it does need fixing, because I really

Re: [GIT PULL] direct IO support for loop driver

2013-11-21 Thread Kent Overstreet
On Thu, Nov 21, 2013 at 01:58:37AM -0800, Christoph Hellwig wrote: On Wed, Nov 20, 2013 at 01:19:33PM -0800, Linus Torvalds wrote: I really don't see the point of all this crap. All this for the loop driver? If so, it had better at least be prettier than it is. It's for anyone trying to to

[PATCH 1/2] block: Silence spurious compiler warnings

2013-12-03 Thread Kent Overstreet
The uninitialized_var() macro appears to not work on structs... Signed-off-by: Kent Overstreet k...@daterainc.com --- block/blk-merge.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 05c17be..8f8adaa 100644 --- a/block/blk

[PATCH] fixups for immutable biovecs

2013-12-03 Thread Kent Overstreet
Jens - for the silence spurious compiler warnings, if you want to drop the previous version of that patch and replace with this one, it appears uninitialized_var() doesn't work on structs. And I somehow lost the btrfs fixes Chris Mason did for bio chaining and had to redo them so hopefully he can

[PATCH 2/2] block: fixup for generic bio chaining

2013-12-03 Thread Kent Overstreet
btrfs bits got lost in the rebase Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Chris Mason c...@fb.com --- fs/btrfs/disk-io.c | 2 +- fs/btrfs/volumes.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 5a10c61..e71039e

[PATCH 02/11] block: Gut bio_add_page()

2013-12-03 Thread Kent Overstreet
Since generic_make_request() can now handle arbitrary size bios, all we have to do is make sure the bvec array doesn't overflow. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk --- fs/bio.c | 137 ++- 1

[PATCH 11/11] direct-io: Rewrite based on immutable biovecs

2013-12-03 Thread Kent Overstreet
of the getblocks() call - dio_send_bio() is what primarily implements that behaviour. Signed-off-by: Kent Overstreet k...@daterainc.com --- fs/direct-io.c | 1426 +++- 1 file changed, 384 insertions(+), 1042 deletions(-) diff --git a/fs/direct-io.c b

[PATCH] DIO rewrite

2013-12-03 Thread Kent Overstreet
This is the dio rewrite based on immutable biovecs that I've been working on off and on for quite some time now; I think it's getting close to ready. It passes xfstests with xfs and CONFIG_XFS_DEBUG=y, though it definitely needs more review and outside testing. It doesn't quite work with btrfs

[PATCH 09/11] block: iov_count_pages()

2013-12-03 Thread Kent Overstreet
Signed-off-by: Kent Overstreet k...@daterainc.com --- fs/bio.c| 42 ++ include/linux/uio.h | 2 ++ lib/iovec.c | 30 ++ 3 files changed, 38 insertions(+), 36 deletions(-) diff --git a/fs/bio.c b/fs/bio.c

[PATCH 10/11] block: Add bio_get_user_pages()

2013-12-03 Thread Kent Overstreet
This replaces some of the code that was in __bio_map_user_iov(), and soon we're going to use this helper in the dio code. Note that this relies on the recent change to make generic_make_request() take arbitrary sized bios - we're not using bio_add_page() here. Signed-off-by: Kent Overstreet k

[PATCH 03/11] btrfs: generic_make_request() handles arbitrary size bios now

2013-12-03 Thread Kent Overstreet
Signed-off-by: Kent Overstreet k...@daterainc.com --- fs/btrfs/volumes.c | 73 -- 1 file changed, 73 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 37972d5..d6dbe80 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs

[PATCH 07/11] iov_iter: Kill written arg to iov_iter_init()

2013-12-03 Thread Kent Overstreet
Signed-off-by: Kent Overstreet k...@daterainc.com --- fs/btrfs/file.c | 8 +--- fs/cifs/file.c | 4 ++-- fs/fuse/file.c | 11 ++- include/linux/uio.h | 9 +++-- mm/filemap.c| 4 +++- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/fs

[PATCH 06/11] iov_iter: Kill iov_iter_single_seg_count()

2013-12-03 Thread Kent Overstreet
Signed-off-by: Kent Overstreet k...@daterainc.com --- fs/fuse/file.c | 6 +++--- include/linux/uio.h | 1 - mm/filemap.c| 15 +-- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 7e70506..69175a1 100644 --- a/fs/fuse

[PATCH 05/11] iov_iter: Move iov_iter to uio.h

2013-12-03 Thread Kent Overstreet
Signed-off-by: Kent Overstreet k...@daterainc.com --- include/linux/fs.h | 32 include/linux/uio.h | 50 ++ 2 files changed, 50 insertions(+), 32 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h

[PATCH 01/11] block: Make generic_make_request handle arbitrary sized bios

2013-12-03 Thread Kent Overstreet
) * brd_make_request (ramdisk - drivers/block/brd.c) * loop_make_request * null_queue_bio * bcache's make_request fns Some others are almost certainly safe to remove now, but will be left for future patches. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk Cc: Neil

[PATCH 04/11] btrfs: convert to bio_for_each_segment()

2013-12-03 Thread Kent Overstreet
Signed-off-by: Kent Overstreet k...@daterainc.com --- fs/btrfs/extent_io.c | 12 --- fs/btrfs/file-item.c | 59 fs/btrfs/inode.c | 22 +++- 3 files changed, 39 insertions(+), 54 deletions(-) diff --git a/fs/btrfs

[PATCH 08/11] block: convert to iov_iter

2013-12-03 Thread Kent Overstreet
Signed-off-by: Kent Overstreet k...@daterainc.com --- block/blk-map.c| 27 ++-- block/scsi_ioctl.c | 17 ++-- drivers/scsi/sg.c | 15 +++ fs/bio.c | 113 + include/linux/bio.h| 8 ++-- include

Re: [PATCH RESEND 0/3] percpu_ida: Various tweaks

2014-02-26 Thread Kent Overstreet
On Wed, Feb 26, 2014 at 10:11:56PM +0100, Alexander Gordeev wrote: Hi Jens, Any feedback on these? Sorry, I dropped the ball last time... -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH RESEND 1/3] percpu_ida: Fix data race on cpus_have_tags cpumask

2014-02-26 Thread Kent Overstreet
...@redhat.com Cc: Kent Overstreet k...@daterainc.com Cc: Peter Zijlstra pet...@infradead.org Cc: Jens Axboe ax...@kernel.dk Cc: Nicholas A. Bellinger n...@linux-iscsi.org Acked-by: Kent Overstreet k...@daterainc.com --- lib/percpu_ida.c | 12 ++-- 1 files changed, 10 insertions(+), 2

Re: [PATCH RESEND 3/3] percpu_ida: Sanity check initialization parameters

2014-02-26 Thread Kent Overstreet
On Thu, Feb 06, 2014 at 01:24:55PM +0100, Alexander Gordeev wrote: Signed-off-by: Alexander Gordeev agord...@redhat.com Cc: Kent Overstreet k...@daterainc.com Cc: Peter Zijlstra pet...@infradead.org Cc: Jens Axboe ax...@kernel.dk Cc: Nicholas A. Bellinger n...@linux-iscsi.org --- lib

Re: [PATCH 4/4] percpu_ida: Do not steal all remote CPU tags at once

2014-02-26 Thread Kent Overstreet
the change and more analysis; this could easily lead to more stealing and cacheline bouncing. Signed-off-by: Alexander Gordeev agord...@redhat.com Cc: Kent Overstreet k...@daterainc.com Cc: Peter Zijlstra pet...@infradead.org Cc: Jens Axboe ax...@kernel.dk Cc: Nicholas A. Bellinger n...@linux

Make generic_make_request() handle arbitrary size bios

2014-02-26 Thread Kent Overstreet
to 089f8de5c42a121f351ef9d240d66e1128fa0ea2: iov_iter: Kill written arg to iov_iter_init() (2014-02-26 15:17:36 -0800) Kent Overstreet (9): block: Make generic_make_request handle arbitrary sized bios block: Gut bio_add_page() blk-lib.c

[PATCH 5/9] btrfs: generic_make_request() handles arbitrary size bios now

2014-02-26 Thread Kent Overstreet
So there's no need for btrfs to break up bios for device limits anymore Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Chris Mason c...@fb.com Cc: linux-bt...@vger.kernel.org --- fs/btrfs/volumes.c | 73 -- 1 file changed, 73 deletions

[PATCH 9/9] iov_iter: Kill written arg to iov_iter_init()

2014-02-26 Thread Kent Overstreet
This gets rid of a usually needless call to iov_iter_advance(). Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Alexander Viro v...@zeniv.linux.org.uk Cc: Jens Axboe ax...@kernel.dk Cc: Chris Mason c...@fb.com Cc: linux-bt...@vger.kernel.org Cc: Steve French sfre...@samba.org Cc: linux-c

[PATCH 8/9] iov_iter: Kill iov_iter_single_seg_count()

2014-02-26 Thread Kent Overstreet
The new iov_iter_iovec() is a more general replacement. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Alexander Viro v...@zeniv.linux.org.uk Cc: Jens Axboe ax...@kernel.dk --- fs/fuse/file.c | 6 +++--- include/linux/uio.h | 1 - mm/filemap.c| 15 +-- 3 files

[PATCH 6/9] btrfs: Convert to bio_for_each_segment()

2014-02-26 Thread Kent Overstreet
This is going to be important for future (hopeful) block layer refactoring, and using the standard primitives makes the code easier to audit. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Chris Mason c...@fb.com Cc: linux-bt...@vger.kernel.org --- fs/btrfs/extent_io.c | 12

[PATCH 7/9] iov_iter: Move iov_iter to uio.h

2014-02-26 Thread Kent Overstreet
Going to be consolidating all the iov iter in one place, and fs.h is way too big. This also adds a new helper, iovec iov_iter_iovec(). Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Alexander Viro v...@zeniv.linux.org.uk Cc: Jens Axboe ax...@kernel.dk --- include/linux/fs.h | 32

[PATCH 2/9] block: Gut bio_add_page()

2014-02-26 Thread Kent Overstreet
Since generic_make_request() can now handle arbitrary size bios, all we have to do is make sure the bvec array doesn't overflow. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk --- fs/bio.c | 137 ++- 1

[PATCH 4/9] bcache: generic_make_request() handles large bios now

2014-02-26 Thread Kent Overstreet
So we get to delete our hacky workaround. Signed-off-by: Kent Overstreet k...@daterainc.com --- drivers/md/bcache/bcache.h| 18 drivers/md/bcache/io.c| 100 +- drivers/md/bcache/journal.c | 4 +- drivers/md/bcache/request.c

[PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-26 Thread Kent Overstreet
) * brd_make_request (ramdisk - drivers/block/brd.c) * loop_make_request * null_queue_bio * bcache's make_request fns Some others are almost certainly safe to remove now, but will be left for future patches. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk Cc: Neil

[PATCH 3/9] blk-lib.c: generic_make_request() handles large bios now

2014-02-26 Thread Kent Overstreet
shouldn't matter. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk --- block/blk-lib.c | 175 ++-- 1 file changed, 30 insertions(+), 145 deletions(-) diff --git a/block/blk-lib.c b/block/blk-lib.c index 97a733cf3d

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-27 Thread Kent Overstreet
On Thu, Feb 27, 2014 at 12:22:54PM -0500, Matthew Wilcox wrote: On Wed, Feb 26, 2014 at 03:39:49PM -0800, Kent Overstreet wrote: We do this by adding calls to blk_queue_split() to the various make_request functions that need it - a few can already handle arbitrary size bios. Note that we

Re: [PATCH 2/2] aio: make aio_read_events_ring be aware of aio_complete

2014-02-28 Thread Kent Overstreet
On Fri, Feb 28, 2014 at 06:27:18PM +0800, Gu Zheng wrote: Commit 5ffac122dbda8(aio: Don't use ctx-tail unnecessarily) uses ring-tail rather than the ctx-tail, but with this change, we fetch 'tail' only once at the start, so that we can not be aware of adding event by aio_complete when

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-28 Thread Kent Overstreet
On Thu, Feb 27, 2014 at 12:22:54PM -0500, Matthew Wilcox wrote: On Wed, Feb 26, 2014 at 03:39:49PM -0800, Kent Overstreet wrote: We do this by adding calls to blk_queue_split() to the various make_request functions that need it - a few can already handle arbitrary size bios. Note that we

Re: [blk-lib] 6a0608544e5: fileio -77.4% max latency, -5.7% throughput

2014-03-04 Thread Kent Overstreet
On Tue, Mar 04, 2014 at 09:21:30PM +0800, Fengguang Wu wrote: Hi Kent, FYI, we noticed the below changes on git://evilpiepirate.org/~kent/linux-bcache.git for-jens commit 6a0608544e5672bd9a044c285119547eae41abe5 (blk-lib.c: generic_make_request() handles large bios now) test case:

Re: next bio iters break discard?

2014-01-13 Thread Kent Overstreet
On Sun, Jan 12, 2014 at 07:52:40PM -0800, Hugh Dickins wrote: When I try to exercise heavy swapping with discard on mmotm 2014-01-09, I soon hit a NULL pointer dereference in __blk_recalc_rq_segments(): __blk_recalc_rq_segments blk_recount_segments ll_back_merge_fn bio_attempt_back_merge

Re: next bio iters break discard?

2014-01-13 Thread Kent Overstreet
On Mon, Jan 13, 2014 at 11:06:33PM -0500, Martin K. Petersen wrote: Kent == Kent Overstreet k...@daterainc.com writes: Kent, Kent I think for discards we can deal with this easily enough - Kent __blk_recalc_rq_segments() will have to special case them - but Kent there's a similar

Re: next bio iters break discard?

2014-01-14 Thread Kent Overstreet
On Tue, Jan 14, 2014 at 03:17:32PM -0500, Martin K. Petersen wrote: Kent == Kent Overstreet k...@daterainc.com writes: IOW, DISCARD, WRITE SAME and the impending COPY requests do not have a 1:1 mapping between the block range worked on and the size of any bvecs attached. Your recent

Re: New bcache compiler warning (was: Re: bcache: Minor fixes from kbuild robot)

2014-02-17 Thread Kent Overstreet
definitely safe here): commit 70bc49d421c793f73a772ae1f50622a39c6136d9 Author: Kent Overstreet k...@daterainc.com Date: Mon Feb 17 13:44:06 2014 -0800 bcache: Fix another compiler warning on m68k Use a bigger hammer this time Signed-off-by: Kent Overstreet k...@daterainc.com diff

Re: New bcache compiler warning (was: Re: bcache: Minor fixes from kbuild robot)

2014-02-17 Thread Kent Overstreet
On Mon, Feb 17, 2014 at 02:44:47PM -0800, Randy Dunlap wrote: Could that cause a truncation? unsigned means unsigned int. Can unsigned int be smaller (fewer bits) than the k pointer? If so, is that OK or a problem? It's just truncating the offset of the pointer within the struct bset, which

Re: [patch 1/2]percpu_ida: fix a live lock

2014-02-10 Thread Kent Overstreet
On Mon, Feb 10, 2014 at 09:26:15AM -0700, Jens Axboe wrote: On 02/10/2014 03:32 AM, Christoph Hellwig wrote: On Sun, Feb 09, 2014 at 04:50:07PM +0100, Alexander Gordeev wrote: Yeah, that was my first thought when I posted percpu_ida: Allow variable maximum number of cached tags patch some

[PATCH] block: Fix cloning of discard/write same bios

2014-02-10 Thread Kent Overstreet
, so bio_for_each_segment() is unnecessary and not terribly meaningful for them, but we still have to special case them in a few places. Signed-off-by: Kent Overstreet k...@daterainc.com --- fs/bio.c| 15 ++- include/linux/bio.h | 11 +++ 2 files changed, 21 insertions

[GIT PULL] bcache changes for 3.15

2014-03-18 Thread Kent Overstreet
-bcache.git bcache-for-3.15 for you to fetch changes up to cb85114956dc88b287afca2872658f562acbc302: bcache: remove nested function usage (2014-03-18 12:39:28 -0700) John Sheu (1): bcache: remove nested function usage Kent

Re: [PATCH 0/7] Put Kernel hacking Kconfig menu on a diet

2013-05-09 Thread Kent Overstreet
On Tue, May 07, 2013 at 01:46:42PM -0700, Dave Hansen wrote: Michal, I figure you're the most logical person for these to go through. There is a fair amount of churn in the areas around these patches so I've resolved conflicts a couple of times. For the patches that are almost purely code

Re: [PATCH] bcache: Fix incompatible pointer type warning

2013-05-09 Thread Kent Overstreet
On Thu, May 09, 2013 at 10:39:26PM +0200, Emil Goode wrote: The function pointer release in struct block_device_operations should point to functions declared as void. Looks like .release just changed to returning void in the merge window - thanks, applied -- To unsubscribe from this list: send

[PATCH 02/26] bcache: Kill unaligned bvec hack

2013-06-08 Thread Kent Overstreet
Bcache has a hack to avoid cloning the biovec if it's all full pages - but with immutable biovecs coming this won't be necessary anymore. For now, we remove the special case and always clone the bvec array so that the immutable biovec patches are simpler. Signed-off-by: Kent Overstreet koverstr

[PATCH 04/26] dm: Use bvec_iter for dm_bio_record()

2013-06-08 Thread Kent Overstreet
This patch doesn't itself have any functional changes, but immutable biovecs are going to add a bi_bvec_done member to bi_iter, which will need to be saved too here. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Alasdair Kergon a...@redhat.com Cc: dm-de...@redhat.com --- drivers/md

[PATCH 26/26] Apply fire to dio code

2013-06-08 Thread Kent Overstreet
- splitting as needed. This version will break btrfs - we need to add a new kind of hook so btrfs can do what it wants to more sanely that previously. Signed-off-by: Kent Overstreet koverstr...@google.com --- fs/direct-io.c | 1318 ++-- 1 file changed

[PATCH 20/26] block: Don't save/copy bvec array anymore, share when cloning

2013-06-08 Thread Kent Overstreet
the original bio's bvec array. For code that does need to modify the clone's biovec (the bounce buffer code, mainly), add bio_clone_biovec(). Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Alasdair Kergon

[PATCH 25/26] block: Add bio_get_user_pages()

2013-06-08 Thread Kent Overstreet
This replaces some of the code that was in __bio_map_user_iov(), and soon we're going to use this helper in the dio code. Note that this relies on the recent change to make generic_make_request() take arbitrary sized bios - we're not using bio_add_page() here. Signed-off-by: Kent Overstreet

[PATCH 21/26] block: Move bouncing to generic_make_request()

2013-06-08 Thread Kent Overstreet
- it's already been done. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk Cc: Jiri Kosina jkos...@suse.cz Cc: Asai Thambi S P asamymuth...@micron.com --- block/blk-core.c | 14 +++--- block/blk-merge.c | 15

[PATCH 23/26] blk-lib.c: generic_make_request() handles large bios now

2013-06-08 Thread Kent Overstreet
shouldn't matter. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk --- block/blk-lib.c | 177 ++-- 1 file changed, 30 insertions(+), 147 deletions(-) diff --git a/block/blk-lib.c b/block/blk-lib.c index 3250620

[PATCH 24/26] bcache: generic_make_request() handles large bios now

2013-06-08 Thread Kent Overstreet
So we get to delete our hacky workaround. Signed-off-by: Kent Overstreet koverstr...@google.com --- drivers/md/bcache/bcache.h| 18 drivers/md/bcache/debug.c | 2 +- drivers/md/bcache/io.c| 100 +- drivers/md/bcache/journal.c

[PATCH 22/26] block: Make generic_make_request handle arbitrary sized bios

2013-06-08 Thread Kent Overstreet
are convenient, and more importantly stacked drivers don't have to deal with both their own bio size limitations and the limitations of the (potentially multiple) devices underneath them. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk Cc: Neil Brown ne...@suse.de Cc

[PATCH 12/26] rbd: Refactor bio cloning, don't clone biovecs

2013-06-08 Thread Kent Overstreet
Now that we've got drivers converted to the new immutable bvec primitives, bio splitting becomes much easier. In a few patches, bio_clone() will be changed to share the old bio's bvec instead of copying it, and bio_split() will do exactly what's being done here. Signed-off-by: Kent Overstreet

[PATCH 13/26] dm: Refactor for new bio cloning/splitting

2013-06-08 Thread Kent Overstreet
We need to convert the dm code to the new bvec_iter primitives which respect bi_bvec_done; they also allow us to drastically simplify dm's bio splitting code. Also kill bio_sector_offset(), dm was the only user and it doesn't make much sense anymore. Signed-off-by: Kent Overstreet koverstr

[PATCH 16/26] block: Rename bio_split() - bio_pair_split()

2013-06-08 Thread Kent Overstreet
This is prep work for introducing a more general bio_split(). Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk Cc: NeilBrown ne...@suse.de Cc: Alasdair Kergon a...@redhat.com Cc: Lars Ellenberg lars.ellenb...@linbit.com Cc: Peter Osterlund pete...@telia.com Cc

[PATCH 18/26] block: Kill bio_pair_split()

2013-06-08 Thread Kent Overstreet
Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk --- fs/bio-integrity.c | 45 --- fs/bio.c| 90 - include/linux/bio.h | 30 -- 3 files changed, 165

[PATCH 15/26] block: Generic bio chaining

2013-06-08 Thread Kent Overstreet
(-fno-optimize-sibling-calls) - so we do it the hacky but safe way. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk --- drivers/md/bcache/io.c| 2 +- fs/bio.c | 45 +++-- include/linux/bio.h | 1

[PATCH 17/26] block: Introduce new bio_split()

2013-06-08 Thread Kent Overstreet
to have clearly documented semantics anyways.) Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Matthew Wilcox matthew.r.wil...@intel.com Cc: Keith Busch keith.bu...@intel.com Cc: Vishal Verma vishal.l.ve

[PATCH 19/26] block: Kill bio_segments()

2013-06-08 Thread Kent Overstreet
a bio_multiple_segments() for them. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk Cc: Nagalakshmi Nandigama nagalakshmi.nandig...@lsi.com Cc: Sreekanth Reddy sreekanth.re...@lsi.com Cc: James E.J. Bottomley jbottom...@parallels.com --- drivers/block/ps3disk.c

[PATCH 09/26] bio-integrity: Convert to bvec_iter

2013-06-08 Thread Kent Overstreet
Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk Cc: Martin K. Petersen martin.peter...@oracle.com Cc: James E.J. Bottomley jbottom...@parallels.com --- block/blk-integrity.c | 40 ++- drivers/scsi/sd_dif.c | 30 +++--- fs/bio

[PATCH 05/26] block: Convert bio_iovec() to bvec_iter

2013-06-08 Thread Kent Overstreet
uses are all going to be removed, but we'll need the functionality from immutable to remove them - so for now rename the existing bio_iovec() - __bio_iovec(), and it'll be removed in a couple patches. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk Cc: Ed L

[PATCH 08/26] block: Convert bio_copy_data() to bvec_iter

2013-06-08 Thread Kent Overstreet
Our fancy new bvec iterator makes code like this much easier to write. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk --- fs/bio.c | 60 +--- 1 file changed, 25 insertions(+), 35 deletions(-) diff

[PATCH 11/26] block: Kill bio_iovec_idx(), __bio_iovec()

2013-06-08 Thread Kent Overstreet
to iterate over the bvec array with bio_for_each_segment() which checks against the current value of bi_iter.bi_size. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk --- block/blk-merge.c | 13 +++-- include/linux/bio.h | 26 -- 2

[PATCH 14/26] md, bcache: Remove bi_idx hacks

2013-06-08 Thread Kent Overstreet
() was a dangerous thing - various drivers would choke on such things. But with immutable biovecs and our new bio splitting that shares the biovecs, submitting partially completed bios has to work (and should work, now that all the drivers have been completed to the new primitives) Signed-off-by: Kent Overstreet

[PATCH 10/26] block: Convert drivers to immutable biovecs

2013-06-08 Thread Kent Overstreet
Now that we've got a mechanism for immutable biovecs - bi_iter.bi_bvec_done - we need to convert drivers to use primitives that respect it instead of using the bvec array directly. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk Cc: NeilBrown ne...@suse.de Cc

Immutable biovecs, dio rewrite

2013-06-08 Thread Kent Overstreet
Immutable biovecs: Drivers no longer modify the biovec array directly (bv_len/bv_offset in particular) - we add a real iterator to struct bio that lets drivers partially complete a bio while only modifying the iterator. The iterator has the existing bi_sector, bi_size, bi_idx memembers, and also

[PATCH 01/26] bcache: Use standard utility code

2013-06-08 Thread Kent Overstreet
. Signed-off-by: Kent Overstreet koverstr...@google.com --- drivers/md/bcache/btree.c | 7 +--- drivers/md/bcache/debug.c | 2 +- drivers/md/bcache/io.c| 64 +++ drivers/md/bcache/movinggc.c | 7 ++-- drivers/md/bcache/request.c | 87

[PATCH 07/26] block: Immutable bio vecs

2013-06-08 Thread Kent Overstreet
this for interesting things, like efficient bio splitting. Signed-off-by: Kent Overstreet koverstr...@google.com Cc: Jens Axboe ax...@kernel.dk Cc: Lars Ellenberg drbd-...@lists.linbit.com Cc: Paul Clements paul.cleme...@steeleye.com Cc: drbd-u...@lists.linbit.com Cc: nbd-gene

Re: Immutable biovecs, dio rewrite

2013-06-09 Thread Kent Overstreet
On Sun, Jun 09, 2013 at 10:34:08AM +0200, Geert Uytterhoeven wrote: On Sun, Jun 9, 2013 at 4:18 AM, Kent Overstreet koverstr...@google.com wrote: * Changing all the drivers to go through the iterator means that we can submit a partially completed bio to generic_make_request

Re: [PATCH 17/21] Percpu tag allocator

2013-06-10 Thread Kent Overstreet
On Wed, May 15, 2013 at 05:41:21PM +0200, Oleg Nesterov wrote: On 05/15, Kent Overstreet wrote: On Tue, May 14, 2013 at 03:48:59PM +0200, Oleg Nesterov wrote: tag_free() does list_del_init(wait-list); /* WINDOW */ wake_up_process(wait-task); in theory the caller

[PATCH] Percpu tag allocator

2013-06-11 Thread Kent Overstreet
using xchg()/cmpxchg() on the percpu lists, to synchronize between steal_tags(). The alternative would've been adding a spinlock to protect the percpu freelists, but that would've required some different tricky code to avoid deadlock because of the lock ordering. Signed-off-by: Kent Overstreet

Re: [PATCH 22/26] block: Make generic_make_request handle arbitrary sized bios

2013-06-11 Thread Kent Overstreet
On Tue, Jun 11, 2013 at 07:12:41PM +0200, David Sterba wrote: On Sat, Jun 08, 2013 at 07:19:04PM -0700, Kent Overstreet wrote: --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -467,6 +468,7 @@ struct request_queue { #define QUEUE_FLAG_SECDISCARD 17 /* supports SECDISCARD

Re: [PATCH] Percpu tag allocator

2013-06-12 Thread Kent Overstreet
On Wed, Jun 12, 2013 at 07:08:35PM +0200, Oleg Nesterov wrote: On 06/11, Kent Overstreet wrote: + * This is done by keeping track of which cpus have tags on their percpu + * freelists in a bitmap, and then on allocation failure if too many cpus have + * tags on their freelists - i.e

Re: [PATCH v3 next/akpm] aio: convert the ioctx list to radix tree

2013-06-12 Thread Kent Overstreet
On Mon, Apr 15, 2013 at 02:40:55PM +0300, Octavian Purdila wrote: When using a large number of threads performing AIO operations the IOCTX list may get a significant number of entries which will cause significant overhead. For example, when running this fio script: rw=randrw; size=256k

Re: Immutable biovecs, dio rewrite

2013-06-12 Thread Kent Overstreet
On Tue, Jun 11, 2013 at 03:20:12PM +1000, Dave Chinner wrote: Please test with XFS and CONFIG_XFS_DEBUG=y - xfstests will stress the dio subsystem a lot more when it is run on XFS. Indeed, xfstests generic/013 assert fails almost immediately with: Thanks - I haven't used xfstests much before.

Re: [PATCH percpu/for-3.11] percpu-refcount: consistently use plain (non-sched) RCU

2013-06-12 Thread Kent Overstreet
of get/put to be called while preemption is alredy disabled, which we definitely shouldn't.) Signed-off-by: Tejun Heo t...@kernel.org Reported-by: Rusty Russell ru...@rustcorp.com.au Acked-by: Kent Overstreet koverstr...@google.com -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH percpu/for-3.11 1/2] percpu-refcount: cosmetic updates

2013-06-12 Thread Kent Overstreet
and the type is gonna be used for a different type of callback too. * Add @ARG to function comments. * Drop unnecessary and unaligned indentation from percpu_ref_init() function comment. Signed-off-by: Tejun Heo t...@kernel.org Had to futz with my indentation :p Acked-by: Kent

Re: [PATCH 2/2] percpu-refcount: implement percpu_tryget() along with percpu_ref_kill_and_confirm()

2013-06-12 Thread Kent Overstreet
On Wed, Jun 12, 2013 at 01:46:27PM -0700, Tejun Heo wrote: From de3c0749e2c1960afcc433fc5da136b85c8bd896 Mon Sep 17 00:00:00 2001 From: Tejun Heo t...@kernel.org Date: Wed, 12 Jun 2013 13:37:42 -0700 Implement percpu_tryget() which succeeds iff the refcount hasn't been killed yet. Because

Re: [PATCH 2/2] percpu-refcount: implement percpu_tryget() along with percpu_ref_kill_and_confirm()

2013-06-12 Thread Kent Overstreet
On Wed, Jun 12, 2013 at 02:17:47PM -0700, Tejun Heo wrote: Yeap, this is icky. If you have any better ideas, I'm all ears. I'm reading through the cgroup patch/code now - this refcounting is _hairy_ so I could certainly believe the way you've done it is the sanest way that'll work. But it does

Re: [PATCH] Percpu tag allocator

2013-06-12 Thread Kent Overstreet
On Wed, Jun 12, 2013 at 04:38:54PM -0700, Andrew Morton wrote: On Tue, 11 Jun 2013 21:03:24 -0700 Kent Overstreet koverstr...@google.com wrote: Allocates integers out of a predefined range 0..n, I assume. Not n..m. Yes (though n..m would be trivial if anyone wanted

Re: [PATCH 04/11] cgroup: use kzalloc() and list_del_init()

2013-06-12 Thread Kent Overstreet
On Thu, Jun 13, 2013 at 10:36:40AM +0800, Li Zefan wrote: On 2013/6/13 5:03, Tejun Heo wrote: There's no point in using kmalloc() and list_del() instead of the clearing variants for trivial stuff. We can live dangerously elsewhere. Use kzalloc() and list_del_init() instead and drop 0

Re: [PATCH 04/11] cgroup: use kzalloc() and list_del_init()

2013-06-12 Thread Kent Overstreet
On Wed, Jun 12, 2013 at 07:41:15PM -0700, Tejun Heo wrote: Hello, On Wed, Jun 12, 2013 at 7:38 PM, Kent Overstreet koverstr...@google.com wrote: IMO, list_del() is preferred when the object shouldn't be reused (i.e. it gets taken off a list and then it's freed). list_del_init() could

Re: [PATCH 04/11] cgroup: use kzalloc() and list_del_init()

2013-06-12 Thread Kent Overstreet
On Wed, Jun 12, 2013 at 07:48:59PM -0700, Tejun Heo wrote: On Wed, Jun 12, 2013 at 07:43:10PM -0700, Kent Overstreet wrote: list_del() does do poisoning - and list debugging is cheaper to enable than full slab debugging. Ah, right, now we have DEBUG_LIST. Completely forgot about that. I

<    4   5   6   7   8   9   10   11   12   13   >