Re: Problem with >1 page GFP_KERNEL kmalloc()

Mark Hemment (markhe@nextd.demon.co.uk)
Mon, 31 Mar 1997 11:19:10 +0000 (GMT)


Hi,

On Mon, 31 Mar 1997, Ingo Molnar wrote:
> On Sun, 30 Mar 1997, Gerard Roudier wrote:
> > On Sun, 30 Mar 1997, Harald Koenig wrote:
> > > well, could anyone please fix the floppy device driver as we sometimes
> > > get
> > > Unable to allocate DMA memory
> > 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.
>
> maybe Mark Hemment's VM implementation (which does page reaping) solves
> this problem too?

That implmentation is on the back burner at the moment, while I have a
re-think. But, yes, it solved this problem by intelligently selecting
pages to reap (not blindly, as try_to_free_page() does).

While not the idea solution, the gfp() functions could try to return
non-DMA pages when asked for !GFP_DMA. This would mean DMA pages have a
low allocation/re-allocation priority, which would not guarantee large
order requests could be satisfied, but would increase the chances of
success.
Also adding a new tunable to kswapd, so that it occasionally calls
try_to_free_page() with the dma flag set, would help. (need a nr_free_dma
counter).

Enough ramblings.....

Regards,

markhe

------------------------------------------------------------------
Mark Hemment, Unix/C Software Engineer (Contractor)
markhe@nextd.demon.co.uk http://www.demon.co.uk/
"Success has many fathers, failure is a B**TARD!" - anon
------------------------------------------------------------------