lkml.org 
[lkml]   [2003]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] might_sleep() improvements


Linus Torvalds wrote:

>Nick Piggin wrote:
>
>>I think these should be pushed down to where the sleeping
>>actually happens if possible.
>>
>
>No, that ends up doing the wrong thing for most of the really common cases.
>
>In particular, most of the memory allocation functions very seldom actually
>sleep. After all, they'll find plenty of free memory (or easily freeable
>memory) without having to wait for any pageouts or anything like that.
>
>Yet the bug is there - the call _could_ have slept.
>
>So "might_sleep()" really does what the name suggests: it is used to say
>that a particular case _may_ sleep, even if it ends up being unlikely.
>
>Because what we're after is not a bug actually happening, but a latent bug
>that has been hidden by the fact that it happens so rarely in practice.
>
>This is why "might_sleep()" should happen as early as possible, and not
>get pushed down.
>
>

Yes I see. I agree. I thought some could be pushed down further without
losing info. I was mainly worried about adding the might_sleep_if
function.


-
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 13:48    [W:3.681 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site