Re: [PATCH 3/3] target: use vfs_bvec_read/write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 26, 2015 at 10:02:30AM +0800, Ming Lei wrote:
> >> Sorry, I have one question: I understand one bvec should only cover
> >> one page, but
> >> one sg may cover lots of pages, so could ITER_BVEC handle that correctly?
> >
> > Each scatterlist entry only contains a single page, which is returned
> 
> I mean scatterlist does not guarantee that, and one sg entry often
> contains lots of pages, which DMA/bus address is continuous.

But we still get away with using page_address(), so from the VM
point of view that matters here it's the same as a single high order
page.

> > by sg_page(sg).  The existing code already relies on it because it
> > kmaps that page.
> 
> If the existing target code path can guarantee that one sg entry
> only contains one page, it should be better to use bio_vec explicitly
> instead of scatterlist.

While it allocates a single page per SGL entry (see target_alloc_sgl),
it uses the scatterlist to allow drivers to dma map it for hardware
access, so a scatterlist seems useful here.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux