Re: [PATCH 2/2] Futex non-page-pinning fix

From: Andrew Morton
Date: Thu Aug 28 2003 - 03:55:58 EST


Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:
>
> > I think a better place to rehash the futex would be at the point where the
> > page is added to and removed from swapcache.
>
> This is simplest: the current code actually moves the futex queue out
> of the hash. If we make the rule: "call futex_rehash" every time
> page->mapping (or page->index) changes, we avoid races and make the
> code simpler.
>
> But this means it could be called quite often.

Moving pages to and from swapcache really is not a fastpath at all,
so I wouldn't be worrying about that.

And even if the code is sucky, it will only be sucky when there is a lot of
swapcache activity AND a lot of futexes are in use.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/