lkml.org 
[lkml]   [2002]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: hashed waitqueues
William Lee Irwin III wrote:
>
> This is a long-discussed space optimization for the VM system, with
> what is expected to be a minor time tradeoff.

Nice code.

> ...
> + /*
> + * Although the default semantics of wake_up() are
> + * to wake all, here the specific function is used
> + * to make it even more explicit that a number of
> + * pages are being waited on here.
> + */
> + if(waitqueue_active(page_waitqueue(page)))
> + wake_up_all(page_waitqueue(page));

Does the compiler CSE these two calls to page_waitqueue()?
All versions? I'd be inclined to do CSE-by-hand here.

Also, why wake_up_all()? That will wake all tasks which are sleeping
in __lock_page(), even though they've asked for exclusive wakeup
semantics. Will a bare wake_up() here not suffice?

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