lkml.org 
[lkml]   [2008]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [SUGGESTION]: drop virtual merge accounting in I/O requests
From
On Tue, 15 Jul 2008 20:10:42 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Date: Tue, 15 Jul 2008 02:45:03 +0900
>
> > dma_4u_map_sg() has:
> >
> > if (segstart != s) {
> > /* We cannot merge if:
> > * - allocated dma_addr isn't contiguous to previous allocation
> > */
> > if ((dma_addr != dma_next) ||
> > (outs->dma_length + s->length > max_seg_size) ||
> > (is_span_boundary(out_entry, base_shift,
> > /* Can't merge: create a new segment */
> > segstart = s;
> > outcount++;
> > outs = sg_next(outs);
> >
> > So if the IOMMU allocated dma_addr isn't contiguous to previous
> > allocation, it might not merge segments that the block layer expected
> > the IOMMU to merge.
> >
> > We need kinda two phase merging code such as the old SPARC64 IOMMU
> > code and PARISC IOMMUs though I like the new simple SPARC64 IOMMU
> > code.
>
> I see.
>
> I wonder if all that complexity is really worth it. Also, all of this
> IOMMU allocation and mapping code runs under a spinlock with hw IRQs
> disabled.
>
> More and more I'm seeing that it's likely better to remove the VMERGE
> code. I can't see what it really buys us anymore, and to make it work
> requires quite a large amount of complexity in the IOMMU layer.

Agreed, especially with modern HBAs, the VMERGE accounting isn't
useful, I think. The recent IOMMU implementations, Intel VT-d and AMD
virtualization one, don't do even virtual merging.

I'm fine with removing the VMERGE accounting in the block layer if
Jens and the users are happy about it.


\
 
 \ /
  Last update: 2008-07-16 06:55    [W:0.076 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site