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>] [day] [month] [year] [list]
Message-Id: <20200610020610.AEB3211C066@d06av25.portsmouth.uk.ibm.com>
Date:   Wed, 10 Jun 2020 07:36:09 +0530
From:   Ritesh Harjani <riteshh@...ux.ibm.com>
To:     Hillf Danton <hdanton@...a.com>
Cc:     linux-ext4@...r.kernel.org, jack@...e.com, tytso@....edu,
        Markus Elfring <Markus.Elfring@....de>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Borislav Petkov <bp@...en8.de>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        syzbot+82f324bb69744c5f6969@...kaller.appspotmail.com
Subject: Re: [PATCHv2 1/1] ext4: mballoc: Use this_cpu_read instead of
 this_cpu_ptr



On 6/9/20 6:07 PM, Hillf Danton wrote:
> 
> On Tue, 9 Jun 2020 18:53:23 +0800 Ritesh Harjani wrote:
>>
>> Simplify reading a seq variable by directly using this_cpu_read API
>> instead of doing this_cpu_ptr and then dereferencing it.
> 
> Two of the quick questions
> 1) Why can blocks discarded in a ext4 FS help allocators in another?

I am not sure if I understand your Q correctly. But here is a brief 
about the patchset. If there were PA blocks just or about to be 
discarded by another thread, then the current thread who is doing block 
allocation should not fail with ENOSPC error instead should be able to 
allocate those blocks from another thread. The concept is better 
explained in the commit msgs, if more details are required.
Without this patchset (in some heavy multi-threaded use case) allocation 
was failing when the overall filesystem space available was more then 50%.

> 
> 2) Why is a percpu seqcount prefered over what <linux/seqlock.h>
> can offer?
> 

Since this could be a multi-threaded use case, per cpu variable helps in 
avoid cache line bouncing problem, which could happen when the same 
variable is updated by multiple threads on different cpus.

-ritesh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ