Re: [Lhms-devel] [PATCH 0/7] Fragmentation Avoidance V19
[Posted November 8, 2005 by corbet]
| From: |
| Linus Torvalds <torvalds-AT-osdl.org> |
| To: |
| Arjan van de Ven <arjan-AT-infradead.org> |
| Subject: |
| Re: [Lhms-devel] [PATCH 0/7] Fragmentation Avoidance V19 |
| Date: |
| Thu, 3 Nov 2005 07:51:11 -0800 (PST) |
| Cc: |
| "Martin J. Bligh" <mbligh-AT-mbligh.org>,
Nick Piggin <nickpiggin-AT-yahoo.com.au>,
Dave Hansen <haveblue-AT-us.ibm.com>, Ingo Molnar <mingo-AT-elte.hu>,
Mel Gorman <mel-AT-csn.ul.ie>, Andrew Morton <akpm-AT-osdl.org>,
kravetz-AT-us.ibm.com, linux-mm <linux-mm-AT-kvack.org>,
Linux Kernel Mailing List <linux-kernel-AT-vger.kernel.org>,
lhms <lhms-devel-AT-lists.sourceforge.net>,
Arjan van de Ven <arjanv-AT-infradead.org> |
| Archive-link: |
| Article,
Thread
|
On Thu, 3 Nov 2005, Arjan van de Ven wrote:
> On Thu, 2005-11-03 at 07:36 -0800, Martin J. Bligh wrote:
> > >> Can we quit coming up with specialist hacks for hotplug, and try to solve
> > >> the generic problem please? hotplug is NOT the only issue here. Fragmentation
> > >> in general is.
> > >>
> > >
> > > Not really it isn't. There have been a few cases (e1000 being the main
> > > one, and is fixed upstream) where fragmentation in general is a problem.
> > > But mostly it is not.
> >
> > Sigh. OK, tell me how you're going to fix kernel stacks > 4K please.
>
> with CONFIG_4KSTACKS :)
2-page allocations are _not_ a problem.
Especially not for fork()/clone(). If you don't even have 2-page
contiguous areas, you are doing something _wrong_, or you're so low on
memory that there's no point in forking any more.
Don't confuse "fragmentation" with "perfectly spread out page
allocations".
Fragmentation means that it gets _exponentially_ more unlikely that you
can allocate big contiguous areas. But contiguous areas of order 1 are
very very likely indeed. It's only the _big_ areas that aren't going to
happen.
This is why fragmentation avoidance has always been totally useless. It is
- only useful for big areas
- very hard for big areas
(Corollary: when it's easy and possible, it's not useful).
Don't do it. We've never done it, and we've been fine. Claiming that
fork() is a reason to do fragmentation avoidance is invalid.
Linus
(
Log in to post comments)