linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lin <mlin@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api
Date: Sun, 20 Mar 2016 23:55:17 -0700	[thread overview]
Message-ID: <1458543317.4550.1.camel@kernel.org> (raw)
In-Reply-To: <20160316082339.GA6203@lst.de>

On Wed, 2016-03-16 at 09:23 +0100, Christoph Hellwig wrote:
> > 
> We can defintively kill this one.

We want to support different size of pools.
How can we kill this one?

Or did you mean we just create a single pool with size SG_CHUNK_SIZE?

> 
> > +static __init int sg_mempool_init(void)
> > +{
> > +	int i;
> > +
> > +	for (i = 0; i < SG_MEMPOOL_NR; i++) {
> > +		struct sg_mempool *sgp = sg_pools + i;
> > +		int size = sgp->size * sizeof(struct scatterlist);
> > +
> > +		sgp->slab = kmem_cache_create(sgp->name, size, 0,
> > +				SLAB_HWCACHE_ALIGN, NULL);
> 
> Having these mempoools around in every kernel will make some embedded
> developers rather unhappy.  We could either not create them at
> runtime, which would require either a check in the fast path, or
> an init call in every driver, or just move the functions you
> added into a separe file, which will be compiled only based on a
> Kconfig
> symbol, and could even be potentially modular.  I think that
> second option might be easier.

I created lib/sg_pool.c with CONFIG_SG_POOL.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-03-21  6:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15 22:39 [PATCH RFC 0/2] mempool based chained scatterlist alloc/free api api Ming Lin
2016-03-15 22:39 ` [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api Ming Lin
2016-03-16  8:23   ` Christoph Hellwig
2016-03-21  6:55     ` Ming Lin [this message]
2016-03-21 14:48       ` Christoph Hellwig
2016-04-07 14:56   ` Bart Van Assche
2016-04-07 16:43     ` Ming Lin
2016-04-08  5:41       ` Ming Lin
2016-03-15 22:39 ` [PATCH RFC 2/2] scsi: use the new chained SG api Ming Lin
2016-03-15 23:12 ` [PATCH RFC 0/2] mempool based chained scatterlist alloc/free api api James Bottomley
2016-03-16  5:18   ` Ming Lin
2016-03-16  8:26   ` Christoph Hellwig

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=1458543317.4550.1.camel@kernel.org \
    --to=mlin@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).