On Tue 25-10-16 14:41:42, Josef Bacik wrote: > Btrfs has no bounds except memory on the amount of dirty memory that we have in > use for metadata. Historically we have used a special inode so we could take > advantage of the balance_dirty_pages throttling that comes with using pagecache. > However as we'd like to support different blocksizes it would be nice to not > have to rely on pagecache, but still get the balance_dirty_pages throttling > without having to do it ourselves. > > So introduce *METADATA_DIRTY_BYTES and *METADATA_WRITEBACK_BYTES. These are > zone and bdi_writeback counters to keep track of how many bytes we have in > flight for METADATA. We need to count in bytes as blocksizes could be > percentages of pagesize. We simply convert the bytes to number of pages where > it is needed for the throttling. > > Also introduce NR_METADATA_BYTES so we can keep track of the total amount of > pages used for metadata on the system. This is also needed so things like dirty > throttling know that this is dirtyable memory as well and easily reclaimed. > > Signed-off-by: Josef Bacik <jbacik@xxxxxx> The patch looks good to me. You can add: Reviewed-by: Jan Kara <jack@xxxxxxx> Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html