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: <17dbffb9-ded6-4605-a7bb-b6f2624313ed@gmail.com>
Date: Tue, 15 Jul 2025 09:35:21 +0800
From: Sheng Yong <shengyong2021@...il.com>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: shengyong2021@...il.com, shengyong1@...omi.com, agk@...hat.com,
 snitzer@...nel.org, nhuck@...gle.com, dm-devel@...ts.linux.dev,
 linux-kernel@...r.kernel.org, Wang Shuai <wangshuai12@...omi.com>
Subject: Re: [PATCH] dm-bufio: fix sched in atomic context

On 7/15/25 01:17, Mikulas Patocka wrote:
> 
> 
> On Thu, 10 Jul 2025, Sheng Yong wrote:
> 
>> From: Sheng Yong <shengyong1@...omi.com>
>>
[..]
>>
>> diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
>> index ec84ba5e93e5..caf6ae9a8b52 100644
>> --- a/drivers/md/dm-bufio.c
>> +++ b/drivers/md/dm-bufio.c
>> @@ -2742,7 +2742,9 @@ static unsigned long __evict_a_few(unsigned long nr_buffers)
>>   		__make_buffer_clean(b);
>>   		__free_buffer_wake(b);
>>   
>> +		dm_bufio_unlock(c);
>>   		cond_resched();
>> +		dm_bufio_lock(c);
>>   	}
>>   
>>   	dm_bufio_unlock(c);
>> -- 
>> 2.43.0
> 
> Hi
> 
> I accepted this patch. I changed it to:
> 
> -               cond_resched();
> +               if (need_resched()) {
> +                       dm_bufio_unlock(c);
> +                       cond_resched();
> +                       dm_bufio_lock(c);
> +               }
>          }
> 
>          dm_bufio_unlock(c);
> 
> so that we are not hammering on the dm bufio lock when scheduling is not
> needed.

Hi, Mikulas,

Thank you for the update. It looks good to me.

thanks,
Yong
> 
> Mikulas
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ