Cc: Kyle Moffett <mrmacman_g4@...>, Nigel Cunningham <nigel@...>, Pavel Machek <pavel@...>, Rafael J. Wysocki <rjw@...>, Matthew Garrett <mjg59@...>, <linux-kernel@...>, <linux-pm@...>
> Spinning in the driver with the lock not held is impossible, since the
That's wrong. The freezer is NOT a solution for that sort of thing. Just
because you guys can't get your locking right.
I've explained already multiple times that the freezer will not do what
you guys expect it to do. IOs can be submited at non-task time and there
is no clear distinction between IO generating threads that must and
those that must not be frozen.
I really can't understand why you guys work so hard at trying to avoid
the right solutions systematically.
Because I'm intimately convinced that the freezer is a wrong approach
that cannot be made solid enough.
Too bad, that's where the interesting points that show that the freezer
cannot work are..
sysfs is a matter of driver. If a sysfs read/write callback in a driver
is hitting the HW, it most certainly already has some kind of locking.
That locking can/should be extended to deal with blocking when the HW is
suspended.
However, since it seems that people universally consider it very hard to
get right (I don't but heh), Linus and Paul have come up with a solution
for most simple enough directly-mapped drivers such as PCI (ok, that
doesn't include USB) which is to simply do the HW suspend in a late
callback after IRQs are off, and not bother with the rest.
You made the same mistake I did when reading Nigel's mail ... BIOs ->
Block IO requests, not BIOS :-)
Ben.
-