From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754736Ab2EGSId (ORCPT ); Mon, 7 May 2012 14:08:33 -0400 Received: from mail-pz0-f51.google.com ([209.85.210.51]:60491 "EHLO mail-pz0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752521Ab2EGSIc (ORCPT ); Mon, 7 May 2012 14:08:32 -0400 Date: Mon, 7 May 2012 11:08:28 -0700 From: Tejun Heo To: Johannes Weiner Cc: Andrew Morton , Gavin Shan , David Miller , Yinghai Lu , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch 02/10] mm: bootmem: remove redundant offset check when finally freeing bootmem Message-ID: <20120507180828.GE19417@google.com> References: <1336390672-14421-1-git-send-email-hannes@cmpxchg.org> <1336390672-14421-3-git-send-email-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1336390672-14421-3-git-send-email-hannes@cmpxchg.org> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 07, 2012 at 01:37:44PM +0200, Johannes Weiner wrote: > When bootmem releases an unaligned BITS_PER_LONG pages chunk of memory > to the page allocator, it checks the bitmap if there are still > unreserved pages in the chunk (set bits), but also if the offset in > the chunk indicates BITS_PER_LONG loop iterations already. > > But since the consulted bitmap is only a one-word-excerpt of the full > per-node bitmap, there can not be more than BITS_PER_LONG bits set in > it. The additional offset check is unnecessary. > > Signed-off-by: Johannes Weiner Acked-by: Tejun Heo Thanks. -- tejun