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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a9c4365-aae1-b4fe-d31d-dfd9b42afae6@bytedance.com>
Date:   Fri, 14 Apr 2023 22:13:30 +0800
From:   Jia Zhu <zhujia.zj@...edance.com>
To:     David Howells <dhowells@...hat.com>
Cc:     linux-cachefs@...hat.com, linux-erofs@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org, jefflexu@...ux.alibaba.com,
        hsiangkao@...ux.alibaba.com, yinxin.x@...edance.com,
        zhujia.zj@...edance.com
Subject: Re: Re: [PATCH V5 4/5] cachefiles: narrow the scope of triggering
 EPOLLIN events in ondemand mode



在 2023/4/14 21:48, David Howells 写道:
> Jia Zhu <zhujia.zj@...edance.com> wrote:
> 
>>   	if (cachefiles_in_ondemand_mode(cache)) {
>> -		if (!xa_empty(&cache->reqs))
>> -			mask |= EPOLLIN;
>> +		if (!xa_empty(xa)) {
>> +			rcu_read_lock();
>> +			xa_for_each_marked(xa, index, req, CACHEFILES_REQ_NEW) {
>> +				if (!cachefiles_ondemand_is_reopening_read(req)) {
>> +					mask |= EPOLLIN;
>> +					break;
>> +				}
>> +			}
>> +			rcu_read_unlock();
> 
> You should probably use xas_for_each_marked() instead of xa_for_each_marked()
> as the former should perform better.
> 
> David

Hi David,

Thanks for your advice. I'll revise it in next version.

Jia
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ