Re: USB device cannot be reconnected and khubd "blocked for morethan 120 seconds"
From: Tejun Heo
Date: Tue Jan 15 2013 - 19:35:35 EST
Hello, Arjan.
On Tue, Jan 15, 2013 at 04:25:54PM -0800, Arjan van de Ven wrote:
> async fundamentally had the concept of a monotonic increasing number,
> and that you could always wait for "everyone before me".
> then people (like me) wanted exceptions to what "everyone" means ;-(
> I'm ok with going back to a single space and simplify the world.
If we want (or need) finer grained operation, we'll probably have to
head the other direction, so that we can definitively tell that an
async operation belongs to domains system, module load A and B, so
that each waiter knows what to wait for.
The current domain implementation is somewhere inbetween. It's not
completely simplistic system and at the same time not developed enough
to do properly stacked flushing.
> the module wait case is tricky, and I wonder if there's deadlocks
> lurking even without async.
I don't think so. It's really an async job waiting for itself.
Working around just this case is mostly trivial (working on patches
now) but it really is putting kludges on top of shaky foundation.
Maybe this is the extent of complexity that we need to go given the
rather limited use cases of async. Let's hope so. I think we'll have
to reimplement synchronization scheme if we have to go further.
> at some point in the past we had the concept of "request a module
> but don't wait for it", and I wonder if that is what should have
> been used here.
We actually want to wait for it as it creates a userland visible
behavior difference otherwise. It's just that async's way of waiting
is too ham-fisted to be used properly in more complex scenarios.
Thanks.
--
tejun
--
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/