From: Jens Axboe <axboe@kernel.dk>
To: "Matias Bjørling" <m@bjorling.me>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: axboe@fb.com
Subject: Re: [PATCH] null_blk: Register as a LightNVM device
Date: Wed, 11 Nov 2015 14:27:34 -0700 [thread overview]
Message-ID: <5643B2C6.9010400@kernel.dk> (raw)
In-Reply-To: <1447236398-9421-1-git-send-email-m@bjorling.me>
On 11/11/2015 03:06 AM, Matias Bjørling wrote:
> Add support for registering as a LightNVM device. This allows us to
> evaluate the performance of the LightNVM library.
>
> In /drivers/Makefile, LightNVM is moved above block device drivers
> to make sure that the LightNVM media managers have been initialized
> before drivers under /drivers/block are initialized.
Generally looks ok. One question:
> +static void *null_lnvm_create_dma_pool(struct request_queue *q, char *name)
> +{
> + mempool_t *virtmem_pool;
> +
> + ppa_cache = kmem_cache_create(name, PAGE_SIZE, 0, 0, NULL);
> + if (!ppa_cache) {
> + pr_err("null_nvm: Unable to create kmem cache\n");
> + return NULL;
> + }
> +
> + virtmem_pool = mempool_create_slab_pool(64, ppa_cache);
> + if (!virtmem_pool) {
> + pr_err("null_nvm: Unable to create virtual memory pool\n");
> + return NULL;
> + }
> +
> + return virtmem_pool;
> +}
Why create a slab cache if it's pages? Why not just have the mempool
alloc/free alloc single pages?
--
Jens Axboe
next prev parent reply other threads:[~2015-11-11 21:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 10:06 [PATCH] null_blk: Register as a LightNVM device Matias Bjørling
2015-11-11 21:27 ` Jens Axboe [this message]
2015-11-11 22:11 ` Jens Axboe
2015-11-12 11:30 ` Matias Bjørling
2015-11-12 8:53 ` Christoph Hellwig
2015-11-12 15:49 ` Jens Axboe
2015-11-12 15:52 ` Christoph Hellwig
2015-11-12 15:54 ` Jens Axboe
2015-11-12 15:58 ` Christoph Hellwig
2015-11-12 16:00 ` Jens Axboe
2015-11-12 18:29 ` Matias Bjørling
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=5643B2C6.9010400@kernel.dk \
--to=axboe@kernel.dk \
--cc=axboe@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m@bjorling.me \
/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