Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1674941
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 00/51] block: support multipage bvec |
| Date | 2017-06-26 18:50 +0200 |
| Message-ID | <tWFn4-4Lf-27@gated-at.bofh.it> (permalink) |
| References | <tWB9L-2fr-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/26/2017 06:09 AM, Ming Lei wrote: > Hi, > > This patchset brings multipage bvec into block layer: > > 1) what is multipage bvec? > > Multipage bvecs means that one 'struct bio_bvec' can hold > multiple pages which are physically contiguous instead > of one single page used in linux kernel for long time. > > 2) why is multipage bvec introduced? > > Kent proposed the idea[1] first. > > As system's RAM becomes much bigger than before, and > at the same time huge page, transparent huge page and > memory compaction are widely used, it is a bit easy now > to see physically contiguous pages from fs in I/O. > On the other hand, from block layer's view, it isn't > necessary to store intermediate pages into bvec, and > it is enough to just store the physicallly contiguous > 'segment' in each io vector. > > Also huge pages are being brought to filesystem and swap > [2][6], we can do IO on a hugepage each time[3], which > requires that one bio can transfer at least one huge page > one time. Turns out it isn't flexiable to change BIO_MAX_PAGES > simply[3][5]. Multipage bvec can fit in this case very well. > > With multipage bvec: > > - segment handling in block layer can be improved much > in future since it should be quite easy to convert > multipage bvec into segment easily. For example, we might > just store segment in each bvec directly in future. > > - bio size can be increased and it should improve some > high-bandwidth IO case in theory[4]. > > - Inside block layer, both bio splitting and sg map can > become more efficient than before by just traversing the > physically contiguous 'segment' instead of each page. > > - there is opportunity in future to improve memory footprint > of bvecs. > > 3) how is multipage bvec implemented in this patchset? > > The 1st 18 patches comment on some special cases and deal with > some special cases of direct access to bvec table. > > The 2nd part(19~29) implements multipage bvec in block layer: > > - put all tricks into bvec/bio/rq iterators, and as far as > drivers and fs use these standard iterators, they are happy > with multipage bvec > > - use multipage bvec to split bio and map sg > > - bio_for_each_segment_all() changes > this helper pass pointer of each bvec directly to user, and > it has to be changed. Two new helpers(bio_for_each_segment_all_sp() > and bio_for_each_segment_all_mp()) are introduced. > > The 3rd part(30~49) convert current users of bio_for_each_segment_all() > to bio_for_each_segment_all_sp()/bio_for_each_segment_all_mp(). > > The last part(50~51) enables multipage bvec. > > These patches can be found in the following git tree: > > https://github.com/ming1/linux/commits/mp-bvec-1.4-v4.12-rc > > Thanks Christoph for looking at the early version and providing > very good suggestions, such as: introduce bio_init_with_vec_table(), > remove another unnecessary helpers for cleanup and so on. > > Any comments are welcome! I'll take some time to review this over the next week or so. In any case, it's a little late to stuff into 4.13 and get a decent amount of exposure and testing on it. A 4.14 target for this would be the way to go, imho. -- Jens Axboe
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 00/51] block: support multipage bvec Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:20 +0200
[PATCH v2 29/51] block: bio: introduce single/multi page version of bio_for_each_segment_all() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:20 +0200
[PATCH v2 43/51] xfs: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 22/51] block: introduce bio_for_each_segment_mp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 18/51] block: bounce: don't access bio->bi_io_vec in copy_to_high_bio_irq Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 20/51] block: introduce multipage/single page bvec helpers Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 51/51] block: bio: pass segments to bio if bio_add_page() is bypassed Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 32/51] btrfs: use bvec_get_last_page to get bio's last page Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 41/51] fs/iomap: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 14/51] btrfs: avoid to access bvec table directly for a cloned bio Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
Re: [PATCH v2 14/51] btrfs: avoid to access bvec table directly for a cloned bio Liu Bo <bo.li.liu@oracle.com> - 2017-06-26 20:10 +0200
[PATCH v2 46/51] exofs: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 49/51] fs/direct-io: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 39/51] fs/mpage: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 40/51] fs/block: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 37/51] dm-crypt: don't clear bvec->bv_page in crypt_free_buffer_pages() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 47/51] fs: crypto: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 44/51] gfs2: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 45/51] f2fs: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 50/51] block: enable multipage bvecs Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 48/51] fs/btrfs: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 33/51] block: deal with dirtying pages for multipage bvec Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 36/51] md: raid1: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
[PATCH v2 42/51] ext4: convert to bio_for_each_segment_all_sp() Ming Lei <ming.lei@redhat.com> - 2017-06-26 14:30 +0200
Re: [PATCH v2 00/51] block: support multipage bvec David Sterba <dsterba@suse.cz> - 2017-06-26 18:50 +0200
Re: [PATCH v2 00/51] block: support multipage bvec Jens Axboe <axboe@kernel.dk> - 2017-06-26 18:50 +0200
csiph-web