From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao2.yu@samsung.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 06/11] f2fs: skip unnecessary data writes during fsync
Date: Tue, 29 Jul 2014 05:43:17 -0700 [thread overview]
Message-ID: <20140729124317.GE84378@jaegeuk-mac02> (raw)
In-Reply-To: <008201cfab21$e5c57ff0$b1507fd0$@samsung.com>
On Tue, Jul 29, 2014 at 07:39:45PM +0800, Chao Yu wrote:
> Hi,
>
> > -----Original Message-----
> > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> > Sent: Saturday, July 26, 2014 6:47 AM
> > To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org;
> > linux-f2fs-devel@lists.sourceforge.net
> > Cc: Jaegeuk Kim
> > Subject: [f2fs-dev] [PATCH 06/11] f2fs: skip unnecessary data writes during fsync
> >
> > This patch intends to improve the fsync performance by skipping remaining the
> > recovery information, only when there is no data that we should recover.
> >
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> > fs/f2fs/file.c | 16 ++++++++++++++++
> > 1 file changed, 16 insertions(+)
> >
> > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> > index 7c652b3..121689a 100644
> > --- a/fs/f2fs/file.c
> > +++ b/fs/f2fs/file.c
> > @@ -133,6 +133,17 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int
> > datasync)
> > return ret;
> > }
> >
> > + /*
> > + * if there is no written data, don't waste time to write recovery info.
> > + */
> > + if (!is_inode_flag_set(fi, FI_APPEND_WRITE) &&
> > + !exist_written_data(sbi, inode->i_ino, APPEND_INO)) {
> > + if (is_inode_flag_set(fi, FI_UPDATE_WRITE) &&
> > + exist_written_data(sbi, inode->i_ino, UPDATE_INO))
>
> Should we shift this to is_inode_flag_set(fi, FI_UPDATE_WRITE) ||
> exist_written_data(sbi, inode->i_ino, UPDATE_INO) ?
Hehe, I found that and was going to submit new patch. :)
Small changes are not a big deal, so I'll test and then push them into the tree.
The for-next tree can be rebased all the time, so if you have any suggestion,
let me know.
Thanks,
>
> > + goto flush_out;
> > + goto out;
> > + }
> > +
> > /* guarantee free sections for fsync */
> > f2fs_balance_fs(sbi);
> >
> > @@ -188,6 +199,11 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int
> > datasync)
> > ret = wait_on_node_pages_writeback(sbi, inode->i_ino);
> > if (ret)
> > goto out;
> > +
> > + /* once recovery info is written, don't need to tack this */
> > + remove_dirty_inode(sbi, inode->i_ino, APPEND_INO);
> > +flush_out:
> > + remove_dirty_inode(sbi, inode->i_ino, UPDATE_INO);
> > ret = f2fs_issue_flush(F2FS_SB(inode->i_sb));
> > }
> > out:
> > --
> > 1.8.5.2 (Apple Git-48)
> >
> >
> > ------------------------------------------------------------------------------
> > Want fast and easy access to all the code in your enterprise? Index and
> > search up to 200,000 lines of code with a free copy of Black Duck
> > Code Sight - the same software that powers the world's largest code
> > search on Ohloh, the Black Duck Open Hub! Try it now.
> > http://p.sf.net/sfu/bds
> > _______________________________________________
> > Linux-f2fs-devel mailing list
> > Linux-f2fs-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
next prev parent reply other threads:[~2014-07-29 12:43 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 22:47 [PATCH 01/11] f2fs: add nobarrier mount option Jaegeuk Kim
2014-07-25 22:47 ` [PATCH 02/11] f2fs: punch the core function for inode management Jaegeuk Kim
2014-07-29 11:29 ` Chao Yu
2014-07-25 22:47 ` [PATCH 03/11] f2fs: add infra for ino management Jaegeuk Kim
2014-07-29 11:30 ` Chao Yu
2014-07-25 22:47 ` [PATCH 04/11] f2fs: use radix_tree " Jaegeuk Kim
2014-07-29 11:32 ` Chao Yu
2014-07-29 12:34 ` Jaegeuk Kim
2014-07-25 22:47 ` [PATCH 05/11] f2fs: add info of appended or updated data writes Jaegeuk Kim
2014-07-29 11:38 ` Chao Yu
2014-07-25 22:47 ` [PATCH 06/11] f2fs: skip unnecessary data writes during fsync Jaegeuk Kim
2014-07-29 11:39 ` Chao Yu
2014-07-29 12:43 ` Jaegeuk Kim [this message]
2014-07-30 11:58 ` Chao Yu
2014-07-25 22:47 ` [PATCH 07/11] f2fs: enable in-place-update for fdatasync Jaegeuk Kim
2014-07-29 0:41 ` Changman Lee
2014-07-29 12:22 ` [f2fs-dev] " Jaegeuk Kim
2014-07-29 23:54 ` Changman Lee
2014-07-30 1:08 ` Jaegeuk Kim
2014-07-30 1:56 ` [f2fs-dev] " Changman Lee
2014-07-30 3:11 ` Jaegeuk Kim
2014-07-30 2:45 ` [f2fs-dev] " Chao Yu
2014-07-30 3:13 ` Jaegeuk Kim
2014-07-30 12:48 ` [f2fs-dev] " Chao Yu
2014-07-25 22:47 ` [PATCH 08/11] f2fs: fix wrong condition for unlikely Jaegeuk Kim
2014-07-30 1:44 ` Chao Yu
2014-07-30 3:18 ` Jaegeuk Kim
2014-07-30 12:58 ` Chao Yu
2014-07-25 22:47 ` [PATCH 09/11] f2fs: test before set/clear bits Jaegeuk Kim
2014-07-25 22:47 ` [PATCH 10/11] f2fs: avoid checkpoint when error was occurred Jaegeuk Kim
2014-07-29 11:41 ` Chao Yu
2014-07-29 13:00 ` Jaegeuk Kim
2014-07-25 22:47 ` [PATCH 11/11] f2fs: avoid retrying wrong recovery routine " Jaegeuk Kim
2014-07-29 13:01 ` [PATCH v2 " Jaegeuk Kim
2014-07-29 11:28 ` [PATCH 01/11] f2fs: add nobarrier mount option Chao Yu
2014-07-29 12:22 ` Jaegeuk Kim
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=20140729124317.GE84378@jaegeuk-mac02 \
--to=jaegeuk@kernel.org \
--cc=chao2.yu@samsung.com \
--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).