public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] rxrpc: Simplify the allocation of slab caches
@ 2024-02-01 10:09 Kunwu Chan
  2024-02-01 12:47 ` Jiri Pirko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kunwu Chan @ 2024-02-01 10:09 UTC (permalink / raw)
  To: dhowells, marc.dionne, davem, edumazet, kuba, pabeni
  Cc: linux-afs, netdev, linux-kernel, Kunwu Chan

Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
 net/rxrpc/af_rxrpc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index 465bfe5eb061..1326a1bff2d7 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -1026,9 +1026,7 @@ static int __init af_rxrpc_init(void)
 
 	ret = -ENOMEM;
 	rxrpc_gen_version_string();
-	rxrpc_call_jar = kmem_cache_create(
-		"rxrpc_call_jar", sizeof(struct rxrpc_call), 0,
-		SLAB_HWCACHE_ALIGN, NULL);
+	rxrpc_call_jar = KMEM_CACHE(rxrpc_call,	SLAB_HWCACHE_ALIGN);
 	if (!rxrpc_call_jar) {
 		pr_notice("Failed to allocate call jar\n");
 		goto error_call_jar;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] rxrpc: Simplify the allocation of slab caches
  2024-02-01 10:09 [PATCH net-next] rxrpc: Simplify the allocation of slab caches Kunwu Chan
@ 2024-02-01 12:47 ` Jiri Pirko
  2024-02-01 15:38 ` [net-next] " Markus Elfring
       [not found] ` <1706866812511330.14.seg@mailgw>
  2 siblings, 0 replies; 6+ messages in thread
From: Jiri Pirko @ 2024-02-01 12:47 UTC (permalink / raw)
  To: Kunwu Chan
  Cc: dhowells, marc.dionne, davem, edumazet, kuba, pabeni, linux-afs,
	netdev, linux-kernel

Thu, Feb 01, 2024 at 11:09:24AM CET, chentao@kylinos.cn wrote:
>Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
>to simplify the creation of SLAB caches.
>
>Signed-off-by: Kunwu Chan <chentao@kylinos.cn>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

btw, why don't you bulk these changes into patchsets of 15 patches? Or,
given the low complexicity of the patch, just merge multiple patches
that are changing similar locations togeter.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [net-next] rxrpc: Simplify the allocation of slab caches
  2024-02-01 10:09 [PATCH net-next] rxrpc: Simplify the allocation of slab caches Kunwu Chan
  2024-02-01 12:47 ` Jiri Pirko
@ 2024-02-01 15:38 ` Markus Elfring
       [not found] ` <1706866812511330.14.seg@mailgw>
  2 siblings, 0 replies; 6+ messages in thread
From: Markus Elfring @ 2024-02-01 15:38 UTC (permalink / raw)
  To: Kunwu Chan, linux-afs, netdev, kernel-janitors
  Cc: LKML, David Howells, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Marc Dionne, Paolo Abeni

> Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
> to simplify the creation of SLAB caches.

* Please replace the word “new” by a reference to the commit 0a31bd5f2bbb6473ef9d24f0063ca91cfa678b64
  ("KMEM_CACHE(): simplify slab cache creation").

  See also related background information from 2007-05-06.

* Would you like to take another look at possibilities to group
  similar source code transformations into patch series?


Regards,
Markus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] rxrpc: Simplify the allocation of slab caches
       [not found] ` <1706866812511330.14.seg@mailgw>
@ 2024-02-02  9:46   ` Kunwu Chan
  2024-02-02 10:28     ` Jiri Pirko
  0 siblings, 1 reply; 6+ messages in thread
From: Kunwu Chan @ 2024-02-02  9:46 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: dhowells, marc.dionne, davem, edumazet, kuba, pabeni, linux-afs,
	netdev, linux-kernel

On 2024/2/1 20:47, Jiri Pirko wrote:
> Thu, Feb 01, 2024 at 11:09:24AM CET, chentao@kylinos.cn wrote:
>> Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
>> to simplify the creation of SLAB caches.
>>
>> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
> 
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> 
> btw, why don't you bulk these changes into patchsets of 15 patches? Or,
> given the low complexicity of the patch, just merge multiple patches
> that are changing similar locations togeter.
Sorry, I haven't sent a patchset, I'm worried about messing up.
I'll try to deal with these similar issues in the way you recommended in 
the future, thank you for the reminder.
-- 
Thanks,
   Kunwu


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] rxrpc: Simplify the allocation of slab caches
  2024-02-02  9:46   ` [PATCH net-next] " Kunwu Chan
@ 2024-02-02 10:28     ` Jiri Pirko
  2024-02-04  3:00       ` Kunwu Chan
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Pirko @ 2024-02-02 10:28 UTC (permalink / raw)
  To: Kunwu Chan
  Cc: dhowells, marc.dionne, davem, edumazet, kuba, pabeni, linux-afs,
	netdev, linux-kernel

Fri, Feb 02, 2024 at 10:46:33AM CET, chentao@kylinos.cn wrote:
>On 2024/2/1 20:47, Jiri Pirko wrote:
>> Thu, Feb 01, 2024 at 11:09:24AM CET, chentao@kylinos.cn wrote:
>> > Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
>> > to simplify the creation of SLAB caches.
>> > 
>> > Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
>> 
>> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
>> 
>> btw, why don't you bulk these changes into patchsets of 15 patches? Or,
>> given the low complexicity of the patch, just merge multiple patches
>> that are changing similar locations togeter.
>Sorry, I haven't sent a patchset, I'm worried about messing up.
>I'll try to deal with these similar issues in the way you recommended in the
>future, thank you for the reminder.

Also, please fix your email client. It breaks threads.

>-- 
>Thanks,
>  Kunwu
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] rxrpc: Simplify the allocation of slab caches
  2024-02-02 10:28     ` Jiri Pirko
@ 2024-02-04  3:00       ` Kunwu Chan
  0 siblings, 0 replies; 6+ messages in thread
From: Kunwu Chan @ 2024-02-04  3:00 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: dhowells, marc.dionne, davem, edumazet, kuba, pabeni, linux-afs,
	netdev, linux-kernel

On 2024/2/2 18:28, Jiri Pirko wrote:
> Fri, Feb 02, 2024 at 10:46:33AM CET, chentao@kylinos.cn wrote:
>> On 2024/2/1 20:47, Jiri Pirko wrote:
>>> Thu, Feb 01, 2024 at 11:09:24AM CET, chentao@kylinos.cn wrote:
>>>> Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
>>>> to simplify the creation of SLAB caches.
>>>>
>>>> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
>>>
>>> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
>>>
>>> btw, why don't you bulk these changes into patchsets of 15 patches? Or,
>>> given the low complexicity of the patch, just merge multiple patches
>>> that are changing similar locations togeter.
>> Sorry, I haven't sent a patchset, I'm worried about messing up.
>> I'll try to deal with these similar issues in the way you recommended in the
>> future, thank you for the reminder.
> 
> Also, please fix your email client. It breaks threads.
Thanks for the reminder. Maybe it's my company email gateway that does 
something bad with email.
The last email was quarantined, this one is the same.
I asked the administrator to release it temporarily, and now it looks 
like there is still a problem with the gateway of my email.

I'll try to use a new email.

> 
>> -- 
>> Thanks,
>>   Kunwu
>>
-- 
Thanks,
   Kunwu


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-04  3:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-01 10:09 [PATCH net-next] rxrpc: Simplify the allocation of slab caches Kunwu Chan
2024-02-01 12:47 ` Jiri Pirko
2024-02-01 15:38 ` [net-next] " Markus Elfring
     [not found] ` <1706866812511330.14.seg@mailgw>
2024-02-02  9:46   ` [PATCH net-next] " Kunwu Chan
2024-02-02 10:28     ` Jiri Pirko
2024-02-04  3:00       ` Kunwu Chan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox