Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756712Ab2BMVze (ORCPT ); Mon, 13 Feb 2012 16:55:34 -0500 Received: from mail-pz0-f46.google.com ([209.85.210.46]:40065 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754273Ab2BMVzd (ORCPT ); Mon, 13 Feb 2012 16:55:33 -0500 Date: Mon, 13 Feb 2012 13:55:31 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Dan Smith cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Ensure that walk_page_range()'s start and end are page-aligned In-Reply-To: <87zkcm23az.fsf@caffeine.danplanet.com> Message-ID: References: <1328902796-30389-1-git-send-email-danms@us.ibm.com> <87zkcm23az.fsf@caffeine.danplanet.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1143 Lines: 24 On Mon, 13 Feb 2012, Dan Smith wrote: > DR> It doesn't "ensure" anything without CONFIG_DEBUG_VM enabled, which > DR> isn't the default. > > Are you proposing a change in verbiage or a stronger check? A > VM_BUG_ON() seemed on par with other checks, such as the one in > get_user_pages_fast(). > That's not a precedent, there's a big difference between the performance of gup_fast(), where we can't spare an additional compare and branch, and walk_page_range(). VM_BUG_ON() is typically used in situations where a debug kernel has been built, including CONFIG_DEBUG_VM, and the check helps to isolate a problem that would be otherwise difficult to find. If that fits the criteria, fine, but it doesn't "ensure" walk_page_range() always has start and end addresses that are page aligned, so the changelog needs to be modified to describe why an error in this path wouldn't be evident. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/