Re: [PATCH 2/2] Fix console handling during suspend/resume

Benjamin Herrenschmidt
2006-06-21T22:54:53Z

On Wed, 2006-06-21 at 08:15 -0700, Linus Torvalds wrote:
>
> On Wed, 21 Jun 2006, Benjamin Herrenschmidt wrote:
> >
> > Not stopping queues but not servicing them instead ... hrm ... not that
> > much difference if you ask me :)
>
> A _huge_ difference.
>
> You still don't seem to see it:
>
> > In fact, there is very little difference in practice as far as the
> > driver implementation is concerned. I don't care either way as long as
> > the driver is hardened against incoming things (requests, ioctl,
> > whatever) happening after it's been suspended...
>
> The difference is _exactly_ on the driver level.
>
> If you stop the queues, most drivers don't have to care any more. They are
> quiescent _without_ any driver impact what-so-ever.

(Note that I'm talking about STR here ...)

As long as there is a notion of "queues" separate from the driver itself
that can be stopped by some global thing... might be true for the block
layer, might even be true for the network layer (but in that case, it's
really easy for the driver to do with a single call), is not true with
everything going through ioctl's (unless you have frozen userland and no
internal kernel daemon is hitting driver ioctl's), and other direct
callbacks that don't go through a "queue"...

In many cases, it's actually fairly easy to harden the driver tho :)

Ben.