Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1727494

Re: [PATCH 10/18] lightnvm: pblk: use bio_copy_kern when possible

From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 10/18] lightnvm: pblk: use bio_copy_kern when possible
Date 2017-09-06 15:50 +0200
Message-ID <umISm-2uc-37@gated-at.bofh.it> (permalink)
References <umGdP-wH-3@gated-at.bofh.it> <umGdQ-wH-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Sep 06, 2017 at 12:51:03PM +0200, Javier González wrote:
> In pblk, buffers forming bios can be allocated on physically contiguous
> or virtually contiguous memory. For physically contiguous memory, we
> already use the bio_map_kern helper funciton, however, for virtually
> contiguous memory, we from the bio manually. This makes the code more
> complex, specially on the completion path, where mapped pages need to be
> freed.
> 
> Instead, use bio_copy_kern, which does the same and at the same time
> simplifies the completion path.

Nope.  You want to loop over vmalloc_to_page and call bio_add_page
for each page, after taking care of virtually tagged caches instead
of this bounce buffering.

And you really want to allocate the request first and only then map
the data to the request, as said before.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 10/18] lightnvm: pblk: use bio_copy_kern when possible "Javier González" <jg@lightnvm.io> - 2017-09-06 13:00 +0200
  Re: [PATCH 10/18] lightnvm: pblk: use bio_copy_kern when possible Christoph Hellwig <hch@infradead.org> - 2017-09-06 15:50 +0200
    Re: [PATCH 10/18] lightnvm: pblk: use bio_copy_kern when possible Javier González <jg@lightnvm.io> - 2017-09-06 16:10 +0200
      Re: [PATCH 10/18] lightnvm: pblk: use bio_copy_kern when possible Christoph Hellwig <hch@infradead.org> - 2017-09-07 13:10 +0200
        Re: [PATCH 10/18] lightnvm: pblk: use bio_copy_kern when possible Javier González <jg@lightnvm.io> - 2017-09-07 13:30 +0200

csiph-web