[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1314896087.13161.30.camel@nimitz>
Date: Thu, 01 Sep 2011 09:54:47 -0700
From: Dave Hansen <dave@...ux.vnet.ibm.com>
To: Seth Jennings <sjenning@...ux.vnet.ibm.com>
Cc: Dan Magenheimer <dan.magenheimer@...cle.com>, gregkh@...e.de,
devel@...verdev.osuosl.org, ngupta@...are.org,
cascardo@...oscopio.com, rdunlap@...otime.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] staging: zcache: xcfmalloc support
On Thu, 2011-09-01 at 11:33 -0500, Seth Jennings wrote:
> xcfmalloc is also 0(1) in that the number of freelists
> at that have to be checked is constant and not increasing
> with the number of allocations. The constant hidden
> in the O(1) for finding a suitable block is NUM_FREELISTS.
The algorithm is technically O(n^2) since there are
XCF_MAX_BLOCKS_PER_ALLOC searches through XCF_NUM_FREELISTS. There's
also the reserved pages refill loop, which is linear too.
xcfmalloc's big compromise is that it doesn't do any searching or
fitting. It might needlessly split larger blocks when two small ones
would have worked, for instance.
-- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists