lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <43cd6283-c8c4-7764-f828-39a59596e33c@linux.alibaba.com>
Date:   Mon, 13 Mar 2023 09:20:25 +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/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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ