Re: [RFC] what to do with IOCB_DSYNC?

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

 



On 6/21/21 8:35 AM, Christoph Hellwig wrote:
> On Mon, Jun 21, 2021 at 02:32:46PM +0000, Al Viro wrote:
>> 	I'd rather have a single helper for those checks, rather than
>> open-coding IS_SYNC() + IOCB_DSYNC in each, for obvious reasons...
> 
> Yes, I think something like:
> 
> static inline bool iocb_is_sync(struct kiocb *iocb)
> {
> 	return (iocb->ki_flags & IOCB_DSYNC) ||
> 		S_SYNC(iocb->ki_filp->f_mapping->host);
> }
> 
> should do the job.

I think that's the right approach.

FWIW, my more recent testing does show the init of the iocb being the
big cycler eater causing slowdowns for sync IO in conversions to the
iter handlers instead of ->read/write. Would really welcome the
improvements suggested here, various conversions are stalled because of
it.

-- 
Jens Axboe




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux