linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* new allocation algorithm
@ 1998-03-27  9:03 Rik van Riel
  1998-03-27 17:30 ` Linus Torvalds
  0 siblings, 1 reply; 5+ messages in thread
From: Rik van Riel @ 1998-03-27  9:03 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Stephen C. Tweedie, linux-mm

Hi Linus and Stephen,

I just came up with the idea of using an ext2 like algorithm
for memory allocation, in which we:
- group memory in 128 PAGE groups
- have one unsigned char counter per group, counting the number
  of used pages
- allocate with the goal to fill the busiest group
- penalize pages (page->age) when the group is relatively empty
- thereby shift memory usage from empty groups to full groups, making
  larger allocation in empty groups easier
- PLUS we get rid of the 'randomness' in the current system, where we
  sometimes swap out over half of total memory in one sweep while
  still not reaching our goals

Of course, such an algorithm would be relatively expensive...
But could it be worth it?

Trading off the tradeoffs,

Rik.
+-------------------------------------------+--------------------------+
| Linux: - LinuxHQ MM-patches page          | Scouting       webmaster |
|        - kswapd ask-him & complain-to guy | Vries    cubscout leader |
|     http://www.fys.ruu.nl/~riel/          | <H.H.vanRiel@fys.ruu.nl> |
+-------------------------------------------+--------------------------+

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-04-02 19:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-27  9:03 new allocation algorithm Rik van Riel
1998-03-27 17:30 ` Linus Torvalds
1998-03-27 18:33   ` Benjamin C.R. LaHaise
1998-03-30 15:07   ` Rik van Riel
1998-04-01 20:28   ` Stephen C. Tweedie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox