linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Andrew Morton <akpm@digeo.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	"Frederic Rossi (LMC)" <Frederic.Rossi@ericsson.ca>,
	linux-mm@kvack.org
Subject: Re: freemaps
Date: Sun, 15 Dec 2002 16:51:03 -0800	[thread overview]
Message-ID: <20021216005103.GF2690@holomorphy.com> (raw)
In-Reply-To: <3DFC455E.1FD92CBC@digeo.com>

On Sun, Dec 15, 2002 at 01:03:26AM -0800, Andrew Morton wrote:
> I expect this could be solved with two trees:
> - For searching, a radix-tree indexed by hole size.  A list
>   of same-sized holes at each leaf.
> - For insertion (where we must perform merging) an rbtree.

It's not quite that easy, because what this appears to suggest
would result in best fit, not address-ordered first fit.

My first thought is a length-constrained address minimization on a 2-d
tree, quadtree, or 2D k-d-b tree keyed on address and length; the
duelling tree solutions aren't really capable of providing O(lg(n))
guarantees for address-ordered first fit (or implementing address-
ordered first fit at all). I have no clue how to do this both
nonrecursively and without frequently-dirtied temporary node linkage,
though, as it appears to require a work stack (or potentially even a
queue for prioritized searches) like many other graph searches. Also,
I don't have a proof in hand that this is really O(lg(n)) worst-case,
though there are relatively obvious intuitive reasons to suspect so.


On Sun, Dec 15, 2002 at 01:03:26AM -0800, Andrew Morton wrote:
> But:
> - Do we need to keep the lists of same-sized holes sorted by
>   virtual address, to avoid fragmentation?

Well, not so much to avoid fragmentation, but avoid worst cases.


On Sun, Dec 15, 2002 at 01:03:26AM -0800, Andrew Morton wrote:
> - Do all mm's incur all this stuff, or do we build it all when
>   some threshold is crossed?

Not all incur these kinds of problems; but it is probably expensive
to build non-incrementally once the threshold is crossed.


On Sun, Dec 15, 2002 at 01:03:26AM -0800, Andrew Morton wrote:
> - How does it play with non-linear mappings?

It doesn't care; they're just vma's parked on a virtual address range
like the rest of them.


Bill
--
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/

  parent reply	other threads:[~2002-12-16  0:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-14 22:47 freemaps Frederic Rossi (LMC)
2002-12-15  3:09 ` freemaps Andrew Morton
2002-12-15  8:41   ` freemaps Ingo Molnar
2002-12-15  9:03     ` freemaps Andrew Morton
2002-12-15  9:36       ` freemaps Ingo Molnar
2002-12-16  0:51       ` William Lee Irwin III [this message]
2002-12-16  1:03         ` freemaps Andrew Morton
2002-12-16  1:09           ` freemaps William Lee Irwin III

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=20021216005103.GF2690@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=Frederic.Rossi@ericsson.ca \
    --cc=akpm@digeo.com \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    /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