lkml.org 
[lkml]   [2004]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] conditionalize some boring buffer_head checks
Jeff Garzik <jgarzik@pobox.com> wrote:
>
>
> These checks are executed billions of times per day, with no stack dump
> bug reports sent to lkml. Arguably, they will only trigger on buggy
> filesystems (programmer error), and thus IMO shouldn't even be executed
> in a non-debug kernel.
>
> Even though BUG_ON() includes unlikely(), I think this patch -- or
> something like it -- is preferable. The buffer_error() checks aren't
> even marked unlikely().
>
> This is a micro-optimization on a key kernel fast path.
>

buffer_error() was always supposed to be temporary. Once per month someone
reports the one in __find_get_block_slow(), but that's all. The only
reason for keeping it around is as a debug aid to filesystem developers.

We could make it a no-op if !CONFIG_BUFFER_DEBUG.
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.066 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site