Thanks. Really appreciate quick response.

Mahesh



________________________________
From: Garrett D'Amore <[email protected]>
To: Mahesh <[email protected]>
Cc: [email protected]
Sent: Saturday, 27 June, 2009 1:48:43
Subject: Re: [driver-discuss] dma attributes for Scatter/Gather allocation

Mahesh wrote:
> Hi all,
>  If i need to allocate a scatter/gather list of 8 pages with 4k each  will 
> this structure do for me  dma_attr.dma_attr_version = DMA_ATTR_V0;
>         dma_attr.dma_attr_addr_lo = 0x0000000000000000ull;
>         dma_attr.dma_attr_addr_hi = 0xFFFFFFFFFFFFFFFFull;
>         dma_attr.dma_attr_count_max = 0x00000000FFFFFFFFull;
>         dma_attr.dma_attr_align = 0x1000;
>         dma_attr.dma_attr_burstsizes = 0x00000FFF;
>         dma_attr.dma_attr_minxfer = 0x1000;
>         dma_attr.dma_attr_maxxfer = 0x00000000FFFFFFFFull;
>         dma_attr.dma_attr_seg = 0xFFFFFFFFFFFFFFFFull;
>         dma_attr.dma_attr_sgllen = 8;
>         dma_attr.dma_attr_granular = 1; // min
>      Kindly let me know if  there are any cases in which this allocation
>  scheme would not work. Is it better to allocate big page of 32k and split in
> the driver.The card supports scatter/gather so i wanted to use of the 
> feature.Which one is expensive in terms of iommu tlb entries
> etc.
> 
> 
>  Thanks and Regards,
>  Mahesh
>  

If you can preallocate, using a single 32k chunk will be faster and easier, 
since you'll only need a single cookie.

The reason to use separate scatter gather is if you are using a zero-copy 
approach where the memory regions are associated with buf_t's or mblk's which 
come from other locations.

   -- Garrett


      
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to