lkml.org 
[lkml]   [1996]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bugs and wishes in memory management area


On 23-Nov-96 Gerard Roudier wrote:
>In this case, garbaging 1 MB of memory at startup for ISA/DMA need is
>probably a good solution.

I agree that setting aside a certain amount of RAM for DMA
when the system has more than 16MB is a good idea. I think
1MB is a bit much, and it should be easy enough to make it
a kernel boot parameter. The only board in this machine that
still needs ISA DMA is the soundcard. 64K is all I need.

>On the other hand, being given that 128/16=8, 87% IOs will need to be
>double-buffered. Doing DMA in that conditions is in my opinion pretty
>stupid.

I don't understand what you are getting at here. I was under
the impression that my soundcard required DMA. At least it
seems so under Linux.

>get_free_pages() must be improved in order to allow modules and drivers
>to not fail stupidly when memory is available, however:
>
>- a module that use GFP_ATOMIC (not waitable or under interrupt) must be
> able to recover allocation failures. If it is not able, it is bogus.
> That does not depend on the O/S being involved. Same semantic exists under
> some other systems.

No arguement from me here. But one must remember that memory is
a finite resource, and _any_ allocation priority may fail.

>- For other priorities that allow to swap or free memory, Linux should
> allow to request memory with option to wait for availability and never
> fail if requested size is reasonnable.

Sure... implement GFP_CRITICAL if you think it necessary, but
I don't believe it is. The kernel's main (only) job is the
allocation of the system's finite resources. But it cannot favor
one resource (memory) over another (time). It must balance the
allocation of all resources and be able to survive resource
exhaustion. There is nothing wrong with returning ENOMEM - even
if it really means ENOTIME.

On the other hand... one should be able to do:

ptr = get_free_pages();
while (ptr == NULL) {
try_to_free_page();
ptr = get_free_pages();
}

and assume that it might eventually succeed.

>
>ISA/DMA and memory allocations priorities are 2 different things.
>Mixing both is just confusing.

It is now that so many systems have more than 16MB. It was quite
reasonable when 16MB was considered a huge amount of RAM.

Rob
(rriggs@tesser.com)

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