Re: Possible deadlock in fuse write path (Was: Re: [PATCH 0/4] Some more lock_page work..)

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

 



On Fri, Oct 16, 2020 at 02:19:08PM -0400, Vivek Goyal wrote:
> On Thu, Oct 15, 2020 at 02:21:58PM -0700, Linus Torvalds wrote:
> 
> [..]
> > 
> > I don't know why fuse does multiple pages to begin with. Why can't it
> > do whatever it does just one page at a time?
> 
> Sending multiple pages in single WRITE command does seem to help a lot
> with performance. I modified code to write only one page at a time
> and ran a fio job with sequential writes(and random writes),
> block size 64K and compared the performance on virtiofs.
> 
> NAME                    WORKLOAD                Bandwidth       IOPS
> one-page-write          seqwrite-psync          58.3mb          933
> multi-page-write        seqwrite-psync          265.7mb         4251
> 
> one-page-write          randwrite-psync         53.5mb          856
> multi-page-write        randwrite-psync         315.5mb         5047
> 
> So with multi page writes performance seems much better for this
> particular workload.

Huh. This is essentially the problem the iomap buffered write path
was designed to solve.  Filesystems like gfs2 got similar major
improvements in large buffered write throughput when switching to
use iomap for buffered IO....

Essentially, it works by having iomap_apply() first ask the
filesystem to map the IO range, then iterates the page cache across
the io range performing the desired operation (iomap_write_actor()
in the case of a buffered write), then it tells the filesystem how
much of the original range it completed copying into the cache.

Hence the filesystem only does one mapping/completion operation per
contiguous IO range instead of once per dirtied page, and the inner
loop just locks a page at a time as it works over the range.  Pages
are marked uptodate+dirty as the user data is copied into them, not
when the entire IO is completely written.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux