Re: Please don't beat me up (was Re: Bugs and wishes in memory management area)

Mike Jagdis (mike@roan.co.uk)
Wed, 27 Nov 1996 17:25:05 +0000 (GMT/BST)


On Wed, 27 Nov 1996, Ingo Molnar wrote:

> i dont get it [it must be me]. How would you allocate 2 consecutive pages
> in this 5-page pool which has 3 free pages? :
> [...]
> now i need 2 pages in the above situation ... from an IRQ handler, to get
> 8192 bytes off the networking card for example. How would you do it?

You don't. If the allocated pages were swappable _and_ you weren't
in an interrupt you could page one or more out. If you can't do
that you have a problem, sure. However this is a worst-case scenario.
To get to that state you are probably short of memory and have
a high memory load. Normally there are many pages easily reclaimable
even from interrupts. If you seriously want to handle the worst
case by making things worse it would be possible to fall back to
shuffling pages using the MMU (at a price) but I don't think this
is a good idea in the general case.

(On the other hand the MMU fiddling required is along the lines
of the sort of thing we need to do to support large, 1GB or more,
memory systems...)

Mike

-- 
.----------------------------------------------------------------------.
|  Mike Jagdis                  |  Internet:  mailto:mike@roan.co.uk   |
|  Roan Technology Ltd.         |                                      |
|  54A Peach Street, Wokingham  |  Telephone:  +44 118 989 0403        |
|  RG40 1XG, ENGLAND            |  Fax:        +44 118 989 1195        |
`----------------------------------------------------------------------'