[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a8de785f-8cc3-4075-a5f2-259e20222dcb@os.amperecomputing.com>
Date: Wed, 28 Feb 2024 21:23:23 +0800
From: Adam Li <adamli@...amperecomputing.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: corbet@....net, davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
willemb@...gle.com, yangtiezhu@...ngson.cn, atenart@...nel.org,
kuniyu@...zon.com, wuyun.abel@...edance.com, leitao@...ian.org,
alexander@...alicyn.com, dhowells@...hat.com, paulmck@...nel.org,
joel.granados@...il.com, urezki@...il.com, joel@...lfernandes.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, patches@...erecomputing.com,
cl@...amperecomputing.com, shijie@...amperecomputing.com
Subject: Re: [PATCH] net: make SK_MEMORY_PCPU_RESERV tunable
On 2/28/2024 4:38 AM, Eric Dumazet wrote:
>>
>> sk_prot->memory_allocated points to global atomic variable:
>> atomic_long_t tcp_memory_allocated ____cacheline_aligned_in_smp;
>>
>> If increasing the per-cpu cache size from 1MB to e.g. 16MB,
>> changes to sk->sk_prot->memory_allocated can be further reduced.
>> Performance may be improved on system with many cores.
>
> This looks good, do you have any performance numbers to share ?
I ran localhost memcached test on system with 320 CPU threads,
perf shows 4% cycles spent in __sk_mem_raise_allocated() -->sk_memory_allocated().
If increasing SK_MEMORY_PCPU_RESERV to 16MB, perf cycles spent in
__sk_mem_raise_allocated() drops to 0.4%.
Thanks,
-adam
Powered by blists - more mailing lists