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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <debb5f7d-8031-4aab-93d6-dd54a37c6c1d@huawei.com>
Date: Tue, 19 Nov 2024 16:13:25 +0800
From: Li Qiang <liqiang64@...wei.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
CC: <alibuda@...ux.alibaba.com>, <dengguangxing@...wei.com>,
	<dust.li@...ux.alibaba.com>, <gaochao24@...wei.com>,
	<guwen@...ux.alibaba.com>, <jaka@...ux.ibm.com>,
	<linux-kernel@...r.kernel.org>, <linux-s390@...r.kernel.org>,
	<luanjianhai@...wei.com>, <netdev@...r.kernel.org>,
	<tonylu@...ux.alibaba.com>, <wenjia@...ux.ibm.com>, <zhangxuzhou4@...wei.com>
Subject: Re: [PATCH net-next 1/1] Separate locks for rmbs/sndbufs linked lists
 of different lengths



在 2024/11/19 4:48, Kuniyuki Iwashima 写道:
> From: liqiang <liqiang64@...wei.com>
> Date: Mon, 18 Nov 2024 21:21:47 +0800
>> @@ -596,10 +632,26 @@ static struct smc_buf_desc *smc_llc_get_next_rmb(struct smc_link_group *lgr,
>>  static struct smc_buf_desc *smc_llc_get_first_rmb(struct smc_link_group *lgr,
>>  						  int *buf_lst)
>>  {
>> -	*buf_lst = 0;
>> +	smc_llc_lock_in_turn(lgr->rmbs_lock, buf_lst, SMC_LLC_INTURN_LOCK_INIT);
>>  	return smc_llc_get_next_rmb(lgr, buf_lst, NULL);
>>  }
>>  
>> +static inline void smc_llc_bufs_wrlock_all(struct rw_semaphore *lock, int nums)
>> +{
>> +	int i = 0;
>> +
>> +	for (; i < nums; i++)
>> +		down_write(&lock[i]);
> 
> LOCKDEP will complain here.  You may want to test with
> CONFIG_PROVE_LOCKING=y

Thanks for your reply, other implementations should be considered here.

> 
> 
>> +}
>> +
>> +static inline void smc_llc_bufs_wrunlock_all(struct rw_semaphore *lock, int nums)
>> +{
>> +	int i = 0;
>> +
>> +	for (; i < nums; i++)
>> +		up_write(&lock[i]);
>> +}
>> +
>>  static int smc_llc_fill_ext_v2(struct smc_llc_msg_add_link_v2_ext *ext,
>>  			       struct smc_link *link, struct smc_link *link_new)
>>  {
> 

-- 
Cheers,
Li Qiang


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ