lkml.org 
[lkml]   [2003]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Kexec, DMA, and SMP
From
Date
Corey Minyard <cminyard@mvista.com> writes:

> Eric W. Biederman wrote:
>
> |Corey Minyard <cminyard@mvista.com> writes:
> |
> |>
> |>You don't understand. You don't *want* to set aside a block of memory that's
> |>reserved for DMA. You want to be able to DMA directly into any user address.
> |>Consider demand paging. The performance would suck if you DMA into some
> |>fixed region then copied to the user address. Plus you then have another
> |>resource you have to manage in the kernel. And you still have to change all
> |>the drivers, buffer management, etc. to add a flag that says "I'm going to use
>
> |>this for DMA" to allocations. You might as well add the quiesce function,
> it's
>
> |>probably easier to do. And it doesn't help if you DMA to static memory
> |>addresses.
> |>
> |>I, too, would like a simpler solution. I just don't think this is it.
> |
> |
> |You have it backwards. It is not about reserving a block of memory
> |for DMA. It is about reserving a block of memory to not do DMA in.
> |Something like 4MB or so. |
> |The idea is not to let the original kernel touch the reserved block at all.
> |We just put the kernel that kexec will start in that block of memory.
> |
> |Eric
> |
> Ah, it makes much more sense now. Thank you. I still don't think it's as easy
> as you think, though.
> Because there's no designation on most memory allocations to give you this
> information. There's
> GFP_DMA, but according to the docs that's just for x86 ISA DMA devices. You
> would
> have to hunt down all the memory allocations, figure out of they are DMA targets
>
> or not, and add a
> flag for that. I still say it's easier to just add the function to the drivers.

It is trivial if you don't let alloc_pages give the memory to anyone for
any purpose.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.105 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site