Re: [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-04-07 Thread Ming Lin
On Thu, Apr 7, 2016 at 9:43 AM, Ming Lin wrote: > On Thu, Apr 7, 2016 at 7:56 AM, Bart Van Assche > wrote: >> On 03/15/16 15:39, Ming Lin wrote: >>> >>> +static void sg_mempoll_free(struct scatterlist *sgl, unsigned int nents) >> >> >> Please change mempoll into mempool. > > Good catch. Thanks Ba

Re: [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-04-07 Thread Ming Lin
On Thu, Apr 7, 2016 at 7:56 AM, Bart Van Assche wrote: > On 03/15/16 15:39, Ming Lin wrote: >> >> +static void sg_mempoll_free(struct scatterlist *sgl, unsigned int nents) > > > Please change mempoll into mempool. Good catch. Thanks Bart! -- To unsubscribe from this list: send the line "unsubscri

Re: [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-04-07 Thread Bart Van Assche
On 03/15/16 15:39, Ming Lin wrote: +static void sg_mempoll_free(struct scatterlist *sgl, unsigned int nents) Please change mempoll into mempool. Thanks, Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More m

Re: [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-03-21 Thread Christoph Hellwig
On Sun, Mar 20, 2016 at 11:55:17PM -0700, Ming Lin wrote: > 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 si

Re: [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-03-20 Thread Ming Lin
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) > > +{

Re: [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-03-16 Thread Christoph Hellwig
> /* > + * The maximum number of SG segments that we will put inside a > + * scatterlist. > + * > + * XXX: what's the best number? > + */ > +#define SG_MAX_SEGMENTS 128 The important part here is that it's the amount we fit into a single scatterlist chunk. So I think naming

[PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-03-15 Thread Ming Lin
From: Ming Lin This copied code from scsi_lib.c to scatterlist.c and modified it a bit. Signed-off-by: Ming Lin --- include/linux/scatterlist.h | 12 lib/scatterlist.c | 156 2 files changed, 168 insertions(+) diff --git a/include/l