[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87siu5vnvk.fsf@tassilo.jf.intel.com>
Date: Fri, 06 Dec 2013 10:24:31 -0800
From: Andi Kleen <andi@...stfloor.org>
To: Jaegeuk Kim <jaegeuk.kim@...sung.com>
Cc: unlisted-recipients:; (no To-header on input)
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net,
Chao Yu <chao2.yu@...sung.com>
Subject: Re: [PATCH] f2fs: add unlikely() macro for compiler more aggressively
Jaegeuk Kim <jaegeuk.kim@...sung.com> writes:
> struct page *page;
> repeat:
> page = grab_cache_page(mapping, index);
> - if (!page) {
> + if (unlikely(!page)) {
This is completely pointless, gcc already considers any test for NULL
unlikely.
In general i would advise against splattering unlikely all over your
code, the benefits are very minimal and programers often get it wrong.
-Andi
--
ak@...ux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists