From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752803AbcGUOjJ (ORCPT ); Thu, 21 Jul 2016 10:39:09 -0400 Received: from mga14.intel.com ([192.55.52.115]:16916 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752450AbcGUOjH (ORCPT ); Thu, 21 Jul 2016 10:39:07 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,399,1464678000"; d="scan'208";a="1021332202" Subject: Re: [PATCH] make __section_nr more efficient To: zhouchengming References: <1468988310-11560-1-git-send-email-zhouchengming1@huawei.com> <578FEEC4.9060209@intel.com> <57902B8A.8040907@huawei.com> Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, tj@kernel.org, guohanjun@huawei.com, huawei.libin@huawei.com From: Dave Hansen Message-ID: <5790DE74.3080907@intel.com> Date: Thu, 21 Jul 2016 07:38:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <57902B8A.8040907@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/20/2016 06:55 PM, zhouchengming wrote: > Thanks for your reply. I don't know the compiler will optimize the loop. > But when I see the assembly code of __section_nr, it seems to still have > the loop in it. Oh, well. I guess it got broken in the last decade or so. Your patch looks good to me, and the fact that we ended up here means the original approach was at least a little fragile.