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: <986ad4f0-121b-4a12-878f-566a09c9a1e2@oracle.com>
Date: Tue, 18 Mar 2025 09:12:47 +0000
From: John Garry <john.g.garry@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: brauner@...nel.org, djwong@...nel.org, cem@...nel.org, dchinner@...hat.com,
        linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, ojaswin@...ux.ibm.com,
        ritesh.list@...il.com, martin.petersen@...cle.com, tytso@....edu,
        linux-ext4@...r.kernel.org
Subject: Re: [PATCH v6 11/13] xfs: add xfs_file_dio_write_atomic()

On 18/03/2025 08:46, Christoph Hellwig wrote:
> On Tue, Mar 18, 2025 at 08:42:36AM +0000, John Garry wrote:
>>> I see that this is what's done in the current series now.  But that feels
>>> very wrong.  Why do you want to deprive the user of this nice and useful
>>> code if they don't have the right hardware?
>>
>> I don't think it's fair to say that we deprive the user - so far we just
>> don't and nobody has asked for atomics without HW support.
> 
> You're still keeping this nice functionality from the users..
> 
>>
>>> Why do we limit us to the
>>> hardware supported size when we support more in software?
>>
>> As I see, HW offload gives fast and predictable performance.
>>
>> The COW method is just a (slow) fallback is when HW offload is not possible.
>>
>> If we want to allow the user to avail of atomics greater than the mounted
>> bdev, then we should have a method to tell the user of the optimised
>> threshold. They could read the bdev atomic limits and infer this, but that
>> is not a good user experience.
> 
> Yes, there should be an interface to expose that. 

So we could add to statx.atomic_write_unit_max_opt, which is the 
optimised/fast limit, i.e. bdev limit. Is that sane?

Note that we already have STATX_ATTR_WRITE_ATOMIC to get the atomic 
limits. I wouldn't want to add a new flag just to get this new member. 
So I suppose that if we added statx.atomic_write_unit_max_opt, the API 
would be: if statx.atomic_write_unit_max_opt is zero, then 
statx.atomic_write_unit_max is optimised limit also.

> But even without
> the hardware acceleration a guaranteed untorn write is a really nice
> feature to have.
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ