Messages in this thread |  | | From | (Matthias Urlichs) | Subject | Re: Please don't beat me up (was Re: Bugs and wishes in memory management area) | Date | 27 Nov 1996 23:59:04 +0100 |
| |
In linux.dev.kernel, article <Pine.LNX.3.95.961127160222.2744A-100000@pc5829.hil.siemens.at>, Ingo Molnar <mingo@pc5829.hil.siemens.at> writes: > > 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? : > > page 1 -------> free > page 2 -------> used by the Ethernet driver > page 3 -------> free > page 4 -------> used by the SCSI driver > page 5 -------> free > You don't. But then you don't need to. The problem is that under the current system, things like
page 0 -------> used by the Ethernet driver page 1 -------> free page 2 -------> free page 3 -------> used by the SCSI driver page 4 -------> free
can't be used either. Neither can page three of
page 0 -------> used by page 1 -------> a big page 2 -------> network buffer page 3 -------> would be free if kmalloc didn't use power-of-two page 4 -------> free
So the new system instantly allows you to allocate a lot more pages. That might be enough, statistically, if you always reserve a certain percentage of pages for GPF_ATOMIC (or was that GFP_ATOMIC?) allocations.
An interrupt-safe vmalloc wouldn't exactly be a bad idea either, of course. Idea: Collect a few of the reserved pages into a reserved memory map, allocate bigger chunks from the front of the map, and create a kernel daemon to auto-enlarge the thing if it gets too small, and to really free the chunks which were only marked free by vfree() because it got called from an interrupt.
Shouldn't be _too_ difficult. -- Enough research will tend to confirm your conclusions. -- Matthias Urlichs \ noris network GmbH / Xlink-POP Nürnberg Schleiermacherstraße 12 \ Linux+Internet / EMail: urlichs@noris.de 90491 Nürnberg (Germany) \ Consulting+Programming+Networking+etc'ing PGP: 1024/4F578875 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE Click <A HREF="http://info.noris.de/~smurf/finger">here</A>. 42
|  |