linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2][RFC] Provide accounting for dirty metadata
@ 2016-08-09 19:08 Josef Bacik
  2016-08-09 19:08 ` [PATCH 1/2] remove mapping from balance_dirty_pages*() Josef Bacik
  2016-08-09 19:08 ` [PATCH 2/2] writeback: allow for dirty metadata accounting Josef Bacik
  0 siblings, 2 replies; 15+ messages in thread
From: Josef Bacik @ 2016-08-09 19:08 UTC (permalink / raw)
  To: linux-btrfs, linux-fsdevel, kernel-team, jack, viro, dchinner,
	hch

Btrfs has always had a dummy inode that we used to allocate pages for our
metadata.  This has allowed us to take advantage of balance_dirty_pages() since
our dirty metadata is unbounded otherwise.  This has worked fine for years, but
now we want to add sub pagesize blocksize support.  The easiest way to do this
would be to just kmalloc() our pages, since we already do all of our buffer
management ourselves anyway.  But in order to switch over to that we need to
kill the metadata inode and allow us to make our own allocations for metadata.

Enter these two patches.  The first one is fairly straightforward.
balance_dirty_pages() works on a per-bdi case, the only reason we pass mapping
around is so we can check and see if the fs we are working against has writeback
cgroups enabled.  So this change is just changing function arguments and has no
behavior change at all.

The second patch is where I'd like a little more attention.  I've added some
helpers to deal with the dirty metadata page accounting.  Basically this just
adds some page stats that balance_dirty_pages() can take into account when
deciding whether to kick the background writeback.  Then I've added a sb
callback to handle writing back dirty metadata, and I've added a list to the bdi
for the sb's attached to that bdi.  My plan is to just add/remove the btrfs sb
to it when we mount/umount.

Any suggestions are welcome, this is relatively self contained and doesn't
complicate things too much so I think works well, but I may not be thinking of
other cases.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-08-10 21:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-09 19:08 [PATCH 0/2][RFC] Provide accounting for dirty metadata Josef Bacik
2016-08-09 19:08 ` [PATCH 1/2] remove mapping from balance_dirty_pages*() Josef Bacik
2016-08-09 19:30   ` kbuild test robot
2016-08-09 19:32   ` kbuild test robot
2016-08-09 20:12   ` kbuild test robot
2016-08-09 20:50   ` kbuild test robot
2016-08-10  8:27   ` Jan Kara
2016-08-10  8:29     ` Jan Kara
2016-08-10 19:56   ` Tejun Heo
2016-08-09 19:08 ` [PATCH 2/2] writeback: allow for dirty metadata accounting Josef Bacik
2016-08-10 10:09   ` Jan Kara
2016-08-10 14:05     ` Josef Bacik
2016-08-10 20:12   ` Tejun Heo
2016-08-10 21:16     ` Josef Bacik
2016-08-10 21:39       ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).