lkml.org 
[lkml]   [2012]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Ensure that walk_page_range()'s start and end are page-aligned
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.


\
 
 \ /
  Last update: 2012-02-13 22:57    [W:0.170 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site