From: Andi Kleen Subject: Re: [PATCH 1/3]fs/inode: iunique() Optimize Performance Date: Wed, 25 Nov 2009 16:06:22 +0100 Message-ID: <87pr76ve35.fsf@basil.nowhere.org> References: <200911252209432039291@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "linux-kernel" , "strongzgy" , "xgr178" , "Liu Hui" , "viro" , "akpm" , "jack" , "npiggin" , "linux-fsdevel" To: "Liuweni" Return-path: Received: from one.firstfloor.org ([213.235.205.2]:52750 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753101AbZKYPGR (ORCPT ); Wed, 25 Nov 2009 10:06:17 -0500 In-Reply-To: <200911252209432039291@gmail.com> (Liuweni's message of "Wed, 25 Nov 2009 22:09:45 +0800") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: "Liuweni" writes: > --- > move the if condition out the while{}. > While the function executing, the if > condition won't check again and again. > And this code won't change the function > of iunique(). Normally compiler automatically move loop invariant code out of loop bodies. Have you verified that's not the case here? -Andi -- ak@linux.intel.com -- Speaking for myself only.