From: linux@horizon.com
To: linux-mm@kvack.org
Subject: Re: [RFC] memory defragmentation to satisfy high order allocations
Date: 11 Oct 2004 16:40:34 -0000 [thread overview]
Message-ID: <20041011164034.17383.qmail@science.horizon.com> (raw)
I just thought I'd mention something that Doug Lea found Very
Important when designing dlmalloc to reduce fragmentation:
- Maintain the free lists in FIFO order. LIFO has severe problems.
- When a free block is merged into a larger block, it goes back on
the end of the appropriate list.
If you maintain free blocks as a LIFO stack (something that occurs to
people thinking about cache effects), then you end up with a steady
state where the top few blocks are allocated very rapidly and never get
a chance to merge, while the bottom is made up of blocks whose neighbours
are permanently allocated and never get merged.
What you *want* to do is make small (low-order) allocations from blocks
which will never grow any larger (the ones on the bottom of the stack),
and keep other blocks on the free list until they've been combined with
their neighbours.
FIFO ordering works best for this, giving everything an equal chance to
be merged, and allocating the blocks that have had their chance and not
been merged.
I haven't grovelled through the Linux code to figure out what it does
do exactly, but if you're trying to reduce external fragmentation,
that's a proven technique.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next reply other threads:[~2004-10-11 16:40 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-11 16:40 linux [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-10-01 18:22 Marcelo Tosatti
2004-10-01 20:11 ` Andrew Morton
2004-10-01 19:04 ` Marcelo Tosatti
2004-10-01 21:00 ` Andrew Morton
2004-10-01 21:57 ` Dave Hansen
2004-10-01 23:42 ` Marcelo Tosatti
2004-10-02 1:17 ` Andrew Morton
2004-10-02 9:30 ` Hirokazu Takahashi
2004-10-02 18:33 ` Marcelo Tosatti
2004-10-03 4:13 ` Hirokazu Takahashi
2004-10-03 14:07 ` Marcelo Tosatti
2004-10-03 18:35 ` Hirokazu Takahashi
2004-10-03 19:21 ` Trond Myklebust
2004-10-03 20:03 ` Hirokazu Takahashi
2004-10-03 20:44 ` Trond Myklebust
2004-10-04 13:02 ` Hirokazu Takahashi
2004-10-04 17:24 ` Marcelo Tosatti
2004-10-05 2:53 ` Hirokazu Takahashi
2004-10-07 12:06 ` Marcelo Tosatti
2004-10-08 7:00 ` Hirokazu Takahashi
2004-10-08 10:00 ` Marcelo Tosatti
2004-10-08 12:23 ` Hirokazu Takahashi
2004-10-08 12:41 ` Marcelo Tosatti
2004-10-08 16:52 ` Hirokazu Takahashi
2004-10-08 15:36 ` Marcelo Tosatti
2004-10-12 10:56 ` IWAMOTO Toshihiro
2004-10-12 10:35 ` Marcelo Tosatti
2004-10-12 17:55 ` Hirokazu Takahashi
2004-10-12 14:26 ` Martin J. Bligh
2004-10-12 12:17 ` Marcelo Tosatti
2004-10-12 15:01 ` Dave Hansen
2004-10-04 3:24 ` IWAMOTO Toshihiro
2004-10-04 2:22 ` Dave Hansen
2004-10-04 4:09 ` IWAMOTO Toshihiro
2004-10-04 17:29 ` Marcelo Tosatti
2004-10-02 2:30 ` Nick Piggin
2004-10-02 3:08 ` Marcelo Tosatti
2004-10-04 8:15 ` Nick Piggin
2004-10-02 2:41 ` Nick Piggin
2004-10-02 3:50 ` Hirokazu Takahashi
2004-10-02 16:06 ` Marcelo Tosatti
2004-10-04 2:38 ` Hiroyuki KAMEZAWA
2004-10-04 17:32 ` Marcelo Tosatti
2004-10-04 6:58 ` Hiroyuki KAMEZAWA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041011164034.17383.qmail@science.horizon.com \
--to=linux@horizon.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox