Re: Problem with >1 page GFP_KERNEL kmalloc()

Gerard Roudier (groudier@club-internet.fr)
Sun, 30 Mar 1997 21:38:52 +0000 (GMT)


On Sun, 30 Mar 1997, Harald Koenig wrote:

> > Any kernel software shall never try to allocate a physical memory area
> > larger that 1 PAGE a long time after the system has been booted up.
> > There is no guarantee that is always possible, and when it is, this may
> > cause lots of recently cached objects to be trashed or swapped out.
> >
> > I prefer such silly softwares to make problems to users, in order they
> > will be fixed more quickly.
>
> well, could anyone please fix the floppy device driver as we sometimes
> get
>
> Unable to allocate DMA memory
>
> when trying to load this module using kerneld when the machine has been up
> for a while...

That is not exactly the same problem in my opinion.
ISA DMA capable interfaces need bounce buffers. Such hardwares have been
designed when machines had very fiew memory and generally have very low
performances.
Making available a small pool of about 100K or a fiew more for such hardware
is not expensive and should work with normal performance.

We only should be carefull about the following:

- Drivers shall not request such memory at GFP_ATOMIC priority
or under interrupt when they want to be successfull.
- Drivers must free memory as soon as they do not need it more.
- The allocation function must allow callers to wait for
memory availability in normal situations.

Gerard.