Re: [PATCH 1/2] fs: add FMODE_DIO_PARALLEL_WRITE flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/18/23 14:42, Miklos Szeredi wrote:
> On Sat, 15 Apr 2023 at 15:15, Jens Axboe <axboe@xxxxxxxxx> wrote:
> 
>> Yep, that is pretty much it. If all writes to that inode are serialized
>> by a lock on the fs side, then we'll get a lot of contention on that
>> mutex. And since, originally, nothing supported async writes, everything
>> would get punted to the io-wq workers. io_uring added per-inode hashing
>> for this, so that any punt to io-wq of a write would get serialized.
>>
>> IOW, it's an efficiency thing, not a correctness thing.
> 
> We could still get a performance regression if the majority of writes
> still trigger the exclusive locking.  The questions are:
> 
>   - how often does that happen in real life?

Application depending? My personal opinion is that 
applications/developers knowing about uring would also know that they 
should set the right file size first. Like MPIIO is extending files 
persistently and it is hard to fix with all these different MPI stacks 
(I can try to notify mpich and mvapich developers). So best would be to 
document it somewhere in the uring man page that parallel extending 
files might have negative side effects?


>   - how bad the performance regression would be?

I can give it a try with fio and fallocate=none over fuse during the 
next days.

> 
> Without first attempting to answer those questions, I'd be reluctant
> to add  FMODE_DIO_PARALLEL_WRITE to fuse.
> 


Bernd




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux