> On Wed, 19 Nov 2008 07:22:31 +0100
> "Leon Woestenberg" <leon.woestenberg@gmail.com> wrote:
>
> > Hello,
> >
> > On Wed, Nov 19, 2008 at 6:19 AM, FUJITA Tomonori
> > <fujita.tomonori@lab.ntt.co.jp> wrote:
> > > On Mon, 17 Nov 2008 19:15:32 -0800
> > >> > pci_map_sg() does not coalesce the scattergather list for me on x86.
> > >> [ Marked as Bogus Report ]
> > >>
> > >> > Is this expected? Documentation mentions that coalescing is typically
> > >> > done by pci_map_sg().
> > >
> > > Hm, what document did you read? We might need to fix it.
> > >
> >
http://lxr.linux.no/linux+v2.6.27.6/Documentation/DMA-API.txt
> >
> > 316 pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
> > 317 int nents, int direction)
> > 318
> > 319Maps a scatter gather list from the block layer.
> > 320
> > 321Returns: the number of physical segments mapped (this may be shorter
> > 322than <nents> passed in if the block layer determines that some
> > 323elements of the scatter/gather list are physically adjacent and thus
> > 324may be mapped with a single entry).
>
> Hmm, the description looks confusing. The block layer coalesces
> physically adjacent entries before pci_map_sg(). pci_map_sg() could
> coalesces physically or virtually adjacent entries.