From: Jan Kara <jack@suse.cz>
To: Josef Bacik <josef@toxicpanda.com>
Cc: hannes@cmpxchg.org, linux-mm@kvack.org,
akpm@linux-foundation.org, jack@suse.cz,
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 11:32:46 +0100 [thread overview]
Message-ID: <20171109103246.GB9263@quack2.suse.cz> (raw)
In-Reply-To: <1510167660-26196-2-git-send-email-josef@toxicpanda.com>
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...
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
--
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 10:32 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 [this message]
2017-11-09 14:28 ` Josef Bacik
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=20171109103246.GB9263@quack2.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=jbacik@fb.com \
--cc=josef@toxicpanda.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;
as well as URLs for NNTP newsgroup(s).