From: Andrew Morton <akpm@linux-foundation.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: check bdi->dirty_exceeded when trying to skip data writes
Date: Wed, 2 Jul 2014 12:12:45 -0700 [thread overview]
Message-ID: <20140702121245.b940538a410975ca91b40cfc@linux-foundation.org> (raw)
In-Reply-To: <20140702093126.GA25404@jmac.local>
On Wed, 2 Jul 2014 02:31:26 -0700 Jaegeuk Kim <jaegeuk@kernel.org> wrote:
> > > --- a/fs/f2fs/node.c
> > > +++ b/fs/f2fs/node.c
> > > @@ -43,6 +43,8 @@ bool available_free_memory(struct f2fs_sb_info *sbi, int type)
> > > mem_size = (nm_i->nat_cnt * sizeof(struct nat_entry)) >> 12;
> > > res = mem_size < ((val.totalram * nm_i->ram_thresh / 100) >> 2);
> > > } else if (type == DIRTY_DENTS) {
> > > + if (sbi->sb->s_bdi->dirty_exceeded)
> > > + return false;
> > > mem_size = get_pages(sbi, F2FS_DIRTY_DENTS);
> > > res = mem_size < ((val.totalram * nm_i->ram_thresh / 100) >> 1);
> > > }
> >
> > err, filesystems should not be playing around with this.
> >
> > Perhaps VFS changes are needed. Please tell us much much more about
> > what is going on here.
>
> The f2fs has a feature which throttles IOs to merge bios in the fs level as much
> as possible by bypassing writepages in some cases.
OK, I just looked at fs/f2fs/data.c. AFAICT it has basically
bypassed/reimplemented/worked around the VFS.
That may be good or it may be bad. Maybe it indicates shortcomings in
the VFS, maybe it doesn't. Presumably there were good reasons for this
design but I am unable to determine what they were, because the code is
undocumented. No description of what it is trying to achieve or how or
why. It's just a great blob of C statements.
This is all rather a shame, because perhaps there were opportunities
here to improve the core VFS.
Oh well, I think I'll pretend I never saw it. Good luck!
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
prev parent reply other threads:[~2014-07-02 19:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-28 11:58 [PATCH] f2fs: check bdi->dirty_exceeded when trying to skip data writes Jaegeuk Kim
2014-07-02 5:54 ` Andrew Morton
2014-07-02 9:31 ` Jaegeuk Kim
2014-07-02 19:12 ` Andrew Morton [this message]
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=20140702121245.b940538a410975ca91b40cfc@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).