Re: [PATCH] xfs: don't use slab for metadata buffers

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

 



On Mon, Oct 01, 2018 at 03:09:11PM -0700, Christoph Hellwig wrote:
> It turns out the slub allocator won't always give us aligned memory,
> and on some controllers this can lead to data corruption.  Remove the
> special slab backed fast path in xfs_buf_allocate_memory.  The only
> downside of this is a slight waste of memory for metadata buffers
> smaller than page size.

NAK.

This approach creates a massive problem for 64k page size machines
with sub-page size filesystem block sizes (i.e. default
configurations). Every buffer will now be made up of a 64k page,
even though they typically only use 4kB of that page. i.e. this
blows the metadata cache footprint out by an order of magnitude and
that's going to have a massive impact of system performance.

Yes, we need to fix this alignment problem (that has only recently
been reported for the Xen blk-front driver) but removing sub-page
buffer support is not the right way to fix this. We need to:

- go back to using the block device page cache and sharing pages
  across buffers (yuk!), or
- replace the heap calls with our own aligned slabs, or
- implement a generic block layer heap that guarantees storage
  hardware aligned sub-page buffers (as I suggested to Jens)

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[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