public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Johannes Weiner <hannes@saeurebad.de>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Andi Kleen <andi@firstfloor.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC 0/2] Rootmem: boot-time memory allocator
Date: Sat, 3 May 2008 19:54:26 +0200	[thread overview]
Message-ID: <20080503175426.GB5292@elte.hu> (raw)
In-Reply-To: <20080503152502.191599824@symbol.fehenstaub.lan>

* Johannes Weiner <hannes@saeurebad.de> wrote:

> I was spending some time and work on the bootmem allocator the last 
> few weeks and came to the conclusion that its current design is not 
> appropriate anymore.
> 
> As Ingo said in another email, NUMA technologies will become weirder, 
> nodes whose PFNs span other nodes for example and it makes bootmem 
> code become an unreadable mess.
> 
> So I sat down two days ago and rewrote the allocator, here is the 
> result: rootmem!

hehe :-)

> The biggest difference to the old design is that there is only one 
> bitmap for all PFNs of all nodes together, so the overlapping PFN 
> problems simply dissolve and fun like allocations crossing node 
> boundaries work implicitely.  The new API requires every node used by 
> the allocator to be registered and after that the bitmap gets 
> allocated and the allocator enabled.
> 
> I chose to add a new allocator rather than replacing bootmem at once 
> because that would have required all callsites to switch in one go, 
> which would be a lot.  The new allocator can be adopted more slowly 
> and I added a compatibility API for everything besides actually 
> setting up the allocator.  When the last user dies, bootmem can be 
> dropped completely (including pgdat->bdata, whee..)
> 
> The main ideas from bootmem have been stolen^W preserved but the new 
> design allowed me to shrink the code a lot and express things more 
> simple and clear:
> 
> $ sloc.awk < mm/bootmem.c
> 455 lines of code, 65 lines of comments (520 lines total)
> 
> $ sloc.awk < mm/rootmem.c
> 243 lines of code, 96 lines of comments (339 lines total)

amazing!

i'd still suggest to keep it all named bootmem though :-/ How about 
bootmem2.c and then renaming it back to bootmem.c, once the last user is 
gone? That would save people from having to rename whole chapters in 
entire books ;-)

	Ingo

--
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:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2008-05-03 17:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-03 15:25 [RFC 0/2] Rootmem: boot-time memory allocator Johannes Weiner
2008-05-03 15:25 ` [RFC 1/2] mm: rootmem " Johannes Weiner
2008-05-03 15:25 ` [RFC 2/2] x86: Enable rootmem allocator on X86_32 Johannes Weiner
2008-05-03 17:54 ` Ingo Molnar [this message]
2008-05-04  4:06   ` [RFC 0/2] Rootmem: boot-time memory allocator Yinghai Lu
2008-05-04  8:57     ` Johannes Weiner
2008-05-04 14:17       ` Johannes Weiner
2008-05-04 15:34         ` Johannes Weiner
2008-05-04 18:44           ` Yinghai Lu
2008-05-05 10:58             ` Johannes Weiner
2008-05-04  8:54   ` Johannes Weiner

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=20080503175426.GB5292@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=hannes@saeurebad.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=torvalds@linux-foundation.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