[RFC, PATCH 0/8] xfs: get rid of xfs_cluster_write()

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

 



Hi folks,

This patchset is the first small step to removing bufferheads from
the ->writepage path. The first step to doing this is to simplify
the ->writepage path such that we only look up pages once in the
radix tree for writeback. This means we only operate on a single page at
a time, but a simple conversion loses the mapping efficiency that
xfs_cluster_write() gives us.

To do this without losing any efficiency we need to retain the
active bmbt mapping and ioend chains we build across multiple calls
to ->writepage. In general, those multiple sequential page calls
come from ->writepages, so we can create a context structure at
xfs_vm_writepages() and pass that all the way through to every
xfs_vm_writepage() call that occurs from a single writepages
context. This allows us to cache the current bmbt mapping as well as
keep the ioend chain connected and not have to continually remap the
same extent or submit page sized bios and rely on block layer
merging to build large IOs.

This patch series introduces the struct xfs_writepage_context to act
as the holding container for this state, converts the code to use it
and removes xfs_cluster_write() as it is no longer needed to
efficiently build large IOs. Indeed, the new code is more efficient
than the existing code as it does not have arbitrary write clustering
limits, and it only does one radix tree lookup per page instead of
two. Hence the new code has less CPU overhead, builds larger IOs
where appropriate and removes more code than it adds.

The last patch of the series (patch 8) is not really a patch - I've
included it as information/documentation for the next series of
changes that will follow this series that begin one the path of
removing bufferheads - mapping pages direct to bios and chaining
bios to ioends rather than using bufferheads for this purpose. Once
the writepage path is not dependent on bufferheads, we can move to
working on the VFS read/write paths that use bufferheads. This will
be based on the multipage-write pages that have been floating around
for years to - again - map pages directly and operate on them
according to the mapping state rather than bufferhead state.
This needs to be done to make the COW operations for reflink sane,
so that's what is driving this patchset even if it doesn't appear to
be connected yet.

Comments, flames, thoughts and testing appreciated!

-Dave.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux