Re: [PATCH] sunrpc: replace sleep_on_timeout()

From: Ingo Molnar
Date: Thu Oct 21 2004 - 02:58:10 EST



* Trond Myklebust <trond.myklebust@xxxxxxxxxx> wrote:

> > - sleep_on_timeout(&destroy_wait, 1*HZ);
> > + wait_event_timeout(destroy_wait,
> > + atomic_read(&clnt->cl_users) > 0, 1*HZ);
> > }
> >
>
> No. The above is incorrect, and has the potential for a pretty
> catastrophic hang due to the enclosing loop. Please replace with
>
> wait_event_timeout(destroy_wait, atomic_read(&clnt->cl_users) == 0,
> 1*HZ);

ah, indeed. Do you in principle agree with these sleep_on() =>
wait_event*() conversions in the NFS code? (as long as they are
correct). sleep_on() is really becoming an architectural wart these
days.

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