From: Josef Bacik <josef@toxicpanda.com>
To: Jan Kara <jack@suse.cz>
Cc: Josef Bacik <josef@toxicpanda.com>,
hannes@cmpxchg.org, linux-mm@kvack.org,
akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org,
Josef Bacik <jbacik@fb.com>
Subject: Re: [PATCH 2/4] writeback: allow for dirty metadata accounting
Date: Thu, 9 Nov 2017 09:28:50 -0500 [thread overview]
Message-ID: <20171109142848.uikyp7w25chg42u7@destiny> (raw)
In-Reply-To: <20171109103246.GB9263@quack2.suse.cz>
On Thu, Nov 09, 2017 at 11:32:46AM +0100, Jan Kara wrote:
> On Wed 08-11-17 14:00:58, Josef Bacik wrote:
> > From: Josef Bacik <jbacik@fb.com>
> >
> > Provide a mechanism for file systems to indicate how much dirty metadata they
> > are holding. This introduces a few things
> >
> > 1) Zone stats for dirty metadata, which is the same as the NR_FILE_DIRTY.
> > 2) WB stat for dirty metadata. This way we know if we need to try and call into
> > the file system to write out metadata. This could potentially be used in the
> > future to make balancing of dirty pages smarter.
> >
> > Signed-off-by: Josef Bacik <jbacik@fb.com>
> ...
> > diff --git a/mm/vmscan.c b/mm/vmscan.c
> > index 13d711dd8776..0281abd62e87 100644
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -3827,7 +3827,8 @@ static unsigned long node_pagecache_reclaimable(struct pglist_data *pgdat)
> >
> > /* If we can't clean pages, remove dirty pages from consideration */
> > if (!(node_reclaim_mode & RECLAIM_WRITE))
> > - delta += node_page_state(pgdat, NR_FILE_DIRTY);
> > + delta += node_page_state(pgdat, NR_FILE_DIRTY) +
> > + node_page_state(pgdat, NR_METADATA_DIRTY);
> >
> > /* Watch for any possible underflows due to delta */
> > if (unlikely(delta > nr_pagecache_reclaimable))
>
> Do you expect your metadata pages to be accounted in NR_FILE_PAGES?
> Otherwise this doesn't make sense. And even if they would, this function is
> about kswapd / direct page reclaim and I don't think you've added smarts
> there to writeout metadata. So if your metadata pages are going to show up
> in NR_FILE_PAGES, you need to subtract NR_METADATA_DIRTY from reclaimable
> pages always. It would be good to see btrfs counterpart to these patches so
> that we can answer questions like this easily...
>
Ah good point, this accounting doesn't belong here, I'll fix it up. I haven't
been sending the btrfs patch because it's fucking huge, since untangling the
btree inode usage requires a lot of reworking all at once so it's actually
buildable, so it didn't seem useful for the larger non-btrfs audience. You can
see it in my git tree here
https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git/commit/?h=new-kill-btree-inode&id=5dfd4a0012c1253260da07bee3fa3d4c13aac616
I'll fix this up. Thanks,
Josef
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-11-09 14:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-08 19:00 [PATCH 1/4] remove mapping from balance_dirty_pages*() Josef Bacik
2017-11-08 19:00 ` [PATCH 2/4] writeback: allow for dirty metadata accounting Josef Bacik
2017-11-09 10:32 ` Jan Kara
2017-11-09 14:28 ` Josef Bacik [this message]
2017-11-08 19:00 ` [PATCH 3/4] writeback: introduce super_operations->write_metadata Josef Bacik
2017-11-09 11:01 ` Jan Kara
2017-11-09 14:33 ` Josef Bacik
2017-11-08 19:01 ` [PATCH 4/4] export radix_tree_iter_tag_set Josef Bacik
2017-11-09 14:41 ` Matthew Wilcox
-- strict thread matches above, loose matches on Subject: below --
2016-09-20 20:57 [PATCH 0/4][V3] metadata throttling in writeback patches Josef Bacik
2016-09-20 20:57 ` [PATCH 2/4] writeback: allow for dirty metadata accounting Josef Bacik
2016-09-22 11:18 ` Jan Kara
2016-09-22 13:34 ` Josef Bacik
2016-09-22 19:48 ` Johannes Weiner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171109142848.uikyp7w25chg42u7@destiny \
--to=josef@toxicpanda.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=jack@suse.cz \
--cc=jbacik@fb.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox