[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9e38121a-14ab-5ee4-b379-ad10371392f0@linux.alibaba.com>
Date: Mon, 13 Mar 2023 11:46:07 +0800
From: Kai <KaiShen@...ux.alibaba.com>
To: Tony Lu <tonylu@...ux.alibaba.com>
Cc: kgraul@...ux.ibm.com, wenjia@...ux.ibm.com, jaka@...ux.ibm.com,
kuba@...nel.org, davem@...emloft.net, netdev@...r.kernel.org,
linux-s390@...r.kernel.org, linux-rdma@...r.kernel.org
Subject: Re: [PATCH net-next v3] net/smc: Use percpu ref for wr tx reference
On 3/13/23 9:20 AM, Kai wrote:
>
>
> On 3/8/23 4:30 PM, Tony Lu wrote:
>>> redis-benchmark on smc-r with atomic wr_tx_refcnt:
>>> SET: 525817.62 requests per second, p50=0.087 msec
>>> GET: 570841.44 requests per second, p50=0.087 msec
>>>
>>> redis-benchmark on the percpu_ref version:
>>> SET: 539956.81 requests per second, p50=0.087 msec
>>> GET: 587613.12 requests per second, p50=0.079 msec
>>
>> Does the test data need to be refreshed?
>>
> Will do.
>>> diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h
>>> index 08b457c2d294..1645fba0d2d3 100644
>>> --- a/net/smc/smc_core.h
>>> +++ b/net/smc/smc_core.h
>>> @@ -106,7 +106,10 @@ struct smc_link {
>>> unsigned long *wr_tx_mask; /* bit mask of used
>>> indexes */
>>> u32 wr_tx_cnt; /* number of WR send buffers */
>>> wait_queue_head_t wr_tx_wait; /* wait for free WR send
>>> buf */
>>> - atomic_t wr_tx_refcnt; /* tx refs to link */
>>> + struct {
>>> + struct percpu_ref wr_tx_refs;
>>> + } ____cacheline_aligned_in_smp;
>>> + struct completion tx_ref_comp;
>>
>> For the variable names suffixed with wr_*_refs, should we continue to
>> use wr_*_refcnt?
>>
>> Thanks.
> In my opinion, we can't get the count of the percpu reference until it
> we start to destroy it. So maybe using wr_*_refcnt here is more
> appropriate?
I mean wr_*_refs here. Sorry for the mistake.
Powered by blists - more mailing lists