Re: __lock_page calls run_task_queue(&tq_disk) unecessarily?

Linus Torvalds (torvalds@transmeta.com)
Tue, 20 Feb 2001 09:11:04 -0800 (PST)


On Tue, 20 Feb 2001, Andrea Arcangeli wrote:
>
> Looks perfect. I'd also remove the `continue' from __lock_page, it's wake-one
> so it should get the wakeup only when it's time to lock the page down.

NO!

Even if it is wake-one, others may have claimed it before. There can be
new users coming in and doing a "trylock()" etc.

NEVER *EVER* think that "exclusive wait-queue" implies some sort of
critical region protection. An exlcusive wait-queue is _not_ a lock. It's
only an optimization heuristic.

Linus

-
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/