* Subject: [PATCH] tgt: use KMEM_CACHE
@ 2007-10-24 16:21 FUJITA Tomonori
2007-10-25 2:57 ` Arjan van de Ven
0 siblings, 1 reply; 4+ messages in thread
From: FUJITA Tomonori @ 2007-10-24 16:21 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, fujita.tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
drivers/scsi/scsi_tgt_lib.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
index deea3cd..7abef1a 100644
--- a/drivers/scsi/scsi_tgt_lib.c
+++ b/drivers/scsi/scsi_tgt_lib.c
@@ -641,9 +641,7 @@ static int __init scsi_tgt_init(void)
{
int err;
- scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd",
- sizeof(struct scsi_tgt_cmd),
- 0, 0, NULL);
+ scsi_tgt_cmd_cache = KMEM_CACHE(scsi_tgt_cmd, 0);
if (!scsi_tgt_cmd_cache)
return -ENOMEM;
--
1.5.2.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Subject: [PATCH] tgt: use KMEM_CACHE
2007-10-24 16:21 Subject: [PATCH] tgt: use KMEM_CACHE FUJITA Tomonori
@ 2007-10-25 2:57 ` Arjan van de Ven
2007-10-25 3:25 ` Matthew Wilcox
0 siblings, 1 reply; 4+ messages in thread
From: Arjan van de Ven @ 2007-10-25 2:57 UTC (permalink / raw)
To: FUJITA Tomonori; +Cc: James.Bottomley, linux-scsi, fujita.tomonori
On Thu, 25 Oct 2007 01:21:29 +0900
FUJITA Tomonori <tomof@acm.org> wrote:
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
> drivers/scsi/scsi_tgt_lib.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
> index deea3cd..7abef1a 100644
> --- a/drivers/scsi/scsi_tgt_lib.c
> +++ b/drivers/scsi/scsi_tgt_lib.c
> @@ -641,9 +641,7 @@ static int __init scsi_tgt_init(void)
> {
> int err;
>
> - scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd",
> - sizeof(struct
> scsi_tgt_cmd),
> - 0, 0, NULL);
> + scsi_tgt_cmd_cache = KMEM_CACHE(scsi_tgt_cmd, 0);
Hi,
I have a question that is not described in your change log: why would
you want to do this change? kmem_cache_create() is THE linux API to
achieve this.... why would you not want to use it?? I'm sure you have a
good reason for this change, but I can't figure out what that is from
the changelog of your patch.
Greetings,
Arjan van de Ven
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Subject: [PATCH] tgt: use KMEM_CACHE
2007-10-25 2:57 ` Arjan van de Ven
@ 2007-10-25 3:25 ` Matthew Wilcox
2007-10-25 6:33 ` FUJITA Tomonori
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2007-10-25 3:25 UTC (permalink / raw)
To: Arjan van de Ven
Cc: FUJITA Tomonori, James.Bottomley, linux-scsi, fujita.tomonori
On Wed, Oct 24, 2007 at 07:57:55PM -0700, Arjan van de Ven wrote:
> On Thu, 25 Oct 2007 01:21:29 +0900
> FUJITA Tomonori <tomof@acm.org> wrote:
> > - scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd",
> > - sizeof(struct
> > scsi_tgt_cmd),
> > - 0, 0, NULL);
> > + scsi_tgt_cmd_cache = KMEM_CACHE(scsi_tgt_cmd, 0);
>
> I have a question that is not described in your change log: why would
> you want to do this change? kmem_cache_create() is THE linux API to
> achieve this.... why would you not want to use it?? I'm sure you have a
> good reason for this change, but I can't figure out what that is from
> the changelog of your patch.
Looks like the preferred API was changed in May by clameter; see
commit 0a31bd5f2bbb6473ef9d24f0063ca91cfa678b64
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Subject: [PATCH] tgt: use KMEM_CACHE
2007-10-25 3:25 ` Matthew Wilcox
@ 2007-10-25 6:33 ` FUJITA Tomonori
0 siblings, 0 replies; 4+ messages in thread
From: FUJITA Tomonori @ 2007-10-25 6:33 UTC (permalink / raw)
To: matthew, James.Bottomley; +Cc: arjan, tomof, linux-scsi, fujita.tomonori
On Wed, 24 Oct 2007 21:25:24 -0600
Matthew Wilcox <matthew@wil.cx> wrote:
> On Wed, Oct 24, 2007 at 07:57:55PM -0700, Arjan van de Ven wrote:
> > On Thu, 25 Oct 2007 01:21:29 +0900
> > FUJITA Tomonori <tomof@acm.org> wrote:
> > > - scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd",
> > > - sizeof(struct
> > > scsi_tgt_cmd),
> > > - 0, 0, NULL);
> > > + scsi_tgt_cmd_cache = KMEM_CACHE(scsi_tgt_cmd, 0);
> >
> > I have a question that is not described in your change log: why would
> > you want to do this change? kmem_cache_create() is THE linux API to
> > achieve this.... why would you not want to use it?? I'm sure you have a
> > good reason for this change, but I can't figure out what that is from
> > the changelog of your patch.
>
> Looks like the preferred API was changed in May by clameter; see
> commit 0a31bd5f2bbb6473ef9d24f0063ca91cfa678b64
Yeah, I just thought that it would be better use new KMEM_CACHE macro.
Here's a bit better changelog.
-
From: FUJITA Tomonori <tomof@acm.org>
Subject: [PATCH] tgt: use KMEM_CACHE macro
This uses new KMEM_CACHE() macro instead of kmem_cache_create directly
to simplify slab cache creation.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
drivers/scsi/scsi_tgt_lib.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
index a91761c..d67ca14 100644
--- a/drivers/scsi/scsi_tgt_lib.c
+++ b/drivers/scsi/scsi_tgt_lib.c
@@ -640,9 +640,7 @@ static int __init scsi_tgt_init(void)
{
int err;
- scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd",
- sizeof(struct scsi_tgt_cmd),
- 0, 0, NULL);
+ scsi_tgt_cmd_cache = KMEM_CACHE(scsi_tgt_cmd, 0);
if (!scsi_tgt_cmd_cache)
return -ENOMEM;
--
1.5.2.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-25 6:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24 16:21 Subject: [PATCH] tgt: use KMEM_CACHE FUJITA Tomonori
2007-10-25 2:57 ` Arjan van de Ven
2007-10-25 3:25 ` Matthew Wilcox
2007-10-25 6:33 ` FUJITA Tomonori
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).