From: Seth Jennings <sjenning@linux.vnet.ibm.com>
To: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: gregkh@suse.de, devel@driverdev.osuosl.org,
dan.magenheimer@oracle.com, ngupta@vflare.org,
cascardo@holoscopio.com, rdunlap@xenotime.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] staging: zcache: xcfmalloc memory allocator for zcache
Date: Thu, 01 Sep 2011 10:43:27 -0500 [thread overview]
Message-ID: <4E5FA81F.6060607@linux.vnet.ibm.com> (raw)
In-Reply-To: <1314801641-15059-2-git-send-email-sjenning@linux.vnet.ibm.com>
On 08/31/2011 09:40 AM, Seth Jennings wrote:
> +static struct xcf_blkdesc *xcf_find_remove_block(struct xcf_pool *pool,
> + int size, int blocknum)
> +{
> + int flindex, i;
> + struct xcf_blkdesc *desc = NULL;
> +
> + flindex = xcf_size_to_flindex(size + sizeof(struct xcf_blkhdr));
> +
> + /* look for best fit */
> + if (pool->freelists[flindex])
> + goto remove;
> +
> + /* if this is the last block allowed in the allocation, we shouldn't
> + * consider smaller blocks. it's all or nothing now */
> + if (blocknum == XCF_MAX_BLOCKS_PER_ALLOC) {
In gathering my performance numbers for Dan, I discovered I introduced
a regression by making a late change in my development.
This line should be:
if (blocknum != XCF_MAX_BLOCKS_PER_ALLOC) {
This regression actually causes xcfmalloc to have the same fragmentation
issue as xvmalloc.
> + /* look for largest smaller block */
> + for (i = flindex; i > 0; i--) {
> + if (pool->freelists[i]) {
> + flindex = i;
> + goto remove;
> + }
> + }
> + }
--
Seth
next prev parent reply other threads:[~2011-09-01 15:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 14:40 [PATCH 0/3] staging: zcache: xcfmalloc support Seth Jennings
2011-08-31 14:40 ` [PATCH 1/3] staging: zcache: xcfmalloc memory allocator for zcache Seth Jennings
2011-09-01 15:43 ` Seth Jennings [this message]
2011-09-06 23:51 ` Greg KH
2011-08-31 14:40 ` [PATCH 2/3] staging: zcache: replace xvmalloc with xcfmalloc Seth Jennings
2011-08-31 14:40 ` [PATCH 3/3] staging: zcache: add zv_page_count and zv_desc_count Seth Jennings
2011-08-31 19:46 ` [PATCH 0/3] staging: zcache: xcfmalloc support Dan Magenheimer
2011-08-31 22:06 ` Seth Jennings
2011-09-01 15:17 ` Dan Magenheimer
2011-09-01 16:33 ` Seth Jennings
2011-09-01 16:54 ` Dave Hansen
2011-09-01 22:01 ` Seth Jennings
2011-09-01 23:44 ` Dave Hansen
2011-09-01 22:42 ` Seth Jennings
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=4E5FA81F.6060607@linux.vnet.ibm.com \
--to=sjenning@linux.vnet.ibm.com \
--cc=cascardo@holoscopio.com \
--cc=dan.magenheimer@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=rdunlap@xenotime.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.