lkml.org 
[lkml]   [2010]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectWas: Re: [RFC PATCH] fix problems with NETIF_F_HIGHDMA in networking, Now: SWIOTLB dynamic allocation
On Sun, Feb 28, 2010 at 12:16:28AM -0800, David Miller wrote:
> From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Date: Sun, 28 Feb 2010 03:38:19 +0900
>
> > When I proposed such approach (always use swiotlb) before, IIRC,
> > the objections were:
> >
> > - better to make allocation respect dma_mask. (I don't think that this
> > approach is possible since we don't know which device handles data
> > later when we allocate memory).
>
> And such objects might end up being processed by multiple devices with
> different DMA restrictions.
>
> > - swiotlb is not good for small systems since it allocates too much
> > memory (we can fix this though).
>
> Indeed.

What would be a good mechanism for this? Enumerating all of the PCI
devices to find out which ones are 32-bit and then allocate some chunk
of memory based on the amount of them? say, 1MB per card?

Or maybe a simpler one - figure out how many pages we have an allocate
based on some sliding rule (say, 8MB for under 512MB, 16MB between 512MB
and 2GB, and 32MB for 2GB to 4GB, and after that the full 64MB?)



\
 
 \ /
  Last update: 2010-03-01 18:01    [W:1.790 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site