[rds-devel] dma_sync [was: Has anyone tried RDS on IA64 Linux?]

Olaf Kirch olaf.kirch at oracle.com
Fri May 2 00:44:56 PDT 2008


On Thursday 01 May 2008 16:16:07 Or Gerlitz wrote:
> > RDS headers are in DMA consistent memory, so there's no explicit
> > dma_sync required. Correct?
> not that I understand why DMA consistent memory is used for data 
> buffers, but since this is the case, I think you are right on this 
> observation.

*shrug* :-)

> > --- ofa_kernel-1.3.orig/net/rds/ib_recv.c
> > +++ ofa_kernel-1.3/net/rds/ib_recv.c
> > @@ -75,6 +75,10 @@ static void rds_ib_recv_unmap_page(struc
> >                 ib_dma_unmap_page(ic->i_cm_id->device,
> >                                recv->r_sge[0].addr - recv->r_frag->f_offset,
> >                                PAGE_SIZE, DMA_FROM_DEVICE);
> > +       else
> > +               ib_dma_sync_single_for_device(ic->i_cm_id->device,
> > +                               recv->r_sge[0].addr - recv->r_frag->f_offset,
> > +                               PAGE_SIZE, DMA_FROM_DEVICE);
> >   
> isn't RDS_FRAG_SIZE needed here and not PAGE_SIZE?

I think you're not allowed to call dma_sync() on fragments of the
memory you mapped previously. So as this is a whole page we mapped,
we also have to sync the entire page.

But as per your other comments on dma_sync - shouldn't this be a
sync_single_for_cpu call here?

Olaf
-- 
Olaf Kirch  |  --- o --- Nous sommes du soleil we love when we play
okir at lst.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax



More information about the rds-devel mailing list