From: Chao Yu <chao2.yu@samsung.com>
To: 'Jaegeuk Kim' <jaegeuk.kim@samsung.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: add unlikely() macro for compiler more aggressively
Date: Fri, 06 Dec 2013 16:34:07 +0800 [thread overview]
Message-ID: <000401cef25e$16f97d60$44ec7820$@samsung.com> (raw)
In-Reply-To: <1386310509-5864-1-git-send-email-jaegeuk.kim@samsung.com>
> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk.kim@samsung.com]
> Sent: Friday, December 06, 2013 2:15 PM
> Cc: Jaegeuk Kim; linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net; Chao Yu
> Subject: [PATCH] f2fs: add unlikely() macro for compiler more aggressively
>
> This patch adds unlikely() macro into the most of codes.
> The basic rule is to add that when:
> - checking unusual errors,
> - checking page mappings,
> - and the other unlikely conditions.
Looks nice to me!
>
> Cc: Chao Yu <chao2.yu@samsung.com>
> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
> ---
> fs/f2fs/checkpoint.c | 22 ++++++----
> fs/f2fs/data.c | 63 +++++++++++++--------------
> fs/f2fs/dir.c | 10 ++---
> fs/f2fs/file.c | 23 +++++-----
> fs/f2fs/gc.c | 19 ++++-----
> fs/f2fs/inode.c | 12 +++---
> fs/f2fs/namei.c | 24 ++++++-----
> fs/f2fs/node.c | 117 +++++++++++++++++++++++++++------------------------
> fs/f2fs/recovery.c | 10 ++---
> fs/f2fs/segment.c | 42 +++++++++---------
> fs/f2fs/super.c | 83 ++++++++++++++++++------------------
> fs/f2fs/xattr.c | 28 ++++++------
> 12 files changed, 234 insertions(+), 219 deletions(-)
[snip]
> @@ -808,11 +808,11 @@ retry:
> brelse(*raw_super_buf);
> f2fs_msg(sb, KERN_ERR, "Can't find a valid F2FS filesystem "
> "in %dth superblock", block + 1);
> - if(block == 0) {
> + if(unlikely(block != 0)) {
Original code has style problem:
Space is required before the open parenthesis '('.
Thanks.
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
next prev parent reply other threads:[~2013-12-06 8:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 6:15 [PATCH] f2fs: add unlikely() macro for compiler more aggressively Jaegeuk Kim
2013-12-06 8:34 ` Chao Yu [this message]
2013-12-06 18:24 ` Andi Kleen
2013-12-10 8:03 ` [PATCH v2] " 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='000401cef25e$16f97d60$44ec7820$@samsung.com' \
--to=chao2.yu@samsung.com \
--cc=jaegeuk.kim@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).