public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
To: Pavel Machek <pavel-AlSwsSmVLrQ@public.gmane.org>
Cc: Patrick Mochel <mochel-3NddpPZAyC0@public.gmane.org>,
	acpi-devel-pyega4qmqnRoyOMFzWx49A@public.gmane.org
Subject: Re: suspend.c vs driver-model.txt
Date: Tue, 30 Jul 2002 20:18:09 +0200	[thread overview]
Message-ID: <20020730181810.30687@192.168.4.1> (raw)
In-Reply-To: <20020730182921.GD7567-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>

>Why? You should modify network stack not to post any packets to them.

No, you should have the _driver_ ask the network stack not to get
packets on _this_ specific interface.

>>  - Block drivers just need to stop their queue
>
>Block layer should not attempt to pass anything to driver when
>suspended. (Theres one block layer, but 100 block drivers; which one
>would you like to modify?)

Again, it's a specific driver that has to inform the block layer.

Suspend hierarchy isn't per-subsystem. You may well need a given
subsystem to be alive for a separate driver to suspend itself
properly. It has to be bus-driven.

However, the bus-binding of a driver is completely orthogonal
to the subsystems to which that driver is attached (and gets
requests from).

>[Currently I'm stopping it at even higher level by stopping
>processes. I still think stopping everything is easiest solution, and
>probably only one doable for 2.6.]

Well, it could be done stopping process first, until all drivers are
safe enouh. That mean keeping the IO blocking semantics for drivers
while having the process stopped to help deal with drivers not
implementing that at first, but I'd prefer doing it the right way
first.

>>  - Things like serial drivers usually don't have to do anything
>>    terrific, just stop the chip interrupt and users will be blocked
>>    (or will timeout, but that is not a problem at this point)
>>  - For pmac sound driver, I choose to have a mutex that cause users
>>    to be blocked, but that was the "easy" way to quickly get that
>>    done, a more subtle mecanism could be done, dropping samples at
>>    approximately the output rate. The mutex makes it easy to make
>>    the whole driver SMP safe as well regarding mixer tweaks though.
>
>Why don't you just put that mutex into sys_read etc? Or why not system
>stopping? There's just too much drivers.

sys_read, sys_ioctl, etc... ? well, drivers can be kicked by other
means than just syscalls. And if you tear down subsystems, you take
the risk of stopping a subsystem before a driver that need it for
proper suspend had a chance to use it.

>Kernel tells them that console is being switched away; so it is their
>responsibility. Surprise, special console for suspend is not only
>pretty but also usefull ;-).

Yes, in this specific case, I agree, it's much better than make faked
fbcon ops I use in fbdev drivers ;)

Ben.




-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

  parent reply	other threads:[~2002-07-30 18:18 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020729180037.GB1233@elf.ucw.cz>
     [not found] ` <20020729180037.GB1233-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-29 17:55   ` suspend.c vs driver-model.txt Benjamin Herrenschmidt
     [not found]     ` <20020729175556.13645-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-29 19:02       ` Pavel Machek
     [not found]         ` <20020729190219.GD13729-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-30  7:53           ` Benjamin Herrenschmidt
     [not found]             ` <20020730075329.26474-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 18:29               ` Pavel Machek
     [not found]                 ` <20020730182921.GD7567-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:18                   ` Benjamin Herrenschmidt [this message]
     [not found]                     ` <20020730181810.30687-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:38                       ` Pavel Machek
     [not found]                         ` <20020730193857.GC12091-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:39                           ` Benjamin Herrenschmidt
     [not found]                             ` <20020730183941.6386-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:51                               ` Pavel Machek
     [not found]                                 ` <20020730195149.GI12091-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:50                                   ` Benjamin Herrenschmidt
2002-07-30 18:47                   ` Patrick Mochel
     [not found]                     ` <Pine.LNX.4.44.0207301136050.22697-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-30 18:54                       ` Pavel Machek
2002-07-30 21:54               ` ACPI Suspend Standby Sleep A.MAINS
     [not found]                 ` <000001c23813$a8888ad0$9865fea9-9tCyY70DaME@public.gmane.org>
2002-08-01  9:48                   ` Pavel Machek
2002-07-30  8:04           ` suspend.c vs driver-model.txt Benjamin Herrenschmidt
     [not found]             ` <20020730080418.11907-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 18:22               ` Pavel Machek
     [not found]                 ` <20020730182255.GC7567-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:32                   ` Patrick Mochel
     [not found]                     ` <Pine.LNX.4.44.0207301125370.22697-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-30 18:44                       ` Pavel Machek
     [not found]                         ` <20020730184442.GE7567-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:22                           ` Benjamin Herrenschmidt
     [not found]                             ` <20020730182219.13608-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:42                               ` Pavel Machek
     [not found]                                 ` <20020730194214.GD12091-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:43                                   ` Benjamin Herrenschmidt
     [not found]                                     ` <20020730184305.23369-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:56                                       ` Pavel Machek
     [not found]                                         ` <20020730195655.GK12091-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:57                                           ` Benjamin Herrenschmidt
     [not found]                                             ` <20020730185730.615-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 20:06                                               ` Pavel Machek
     [not found]                                                 ` <20020730200634.GA16297-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 21:21                                                   ` Patrick Mochel
     [not found]                                                     ` <Pine.LNX.4.44.0207301406440.22697-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-31 21:44                                                       ` Pavel Machek
2002-07-30 22:33                                                   ` Benjamin Herrenschmidt
2002-07-30 18:51                           ` Patrick Mochel
     [not found]                             ` <Pine.LNX.4.44.0207301148350.22697-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-30 18:25                               ` Benjamin Herrenschmidt
     [not found]                                 ` <20020730182552.1477-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:47                                   ` Pavel Machek
2002-07-30 19:00                               ` Pavel Machek
     [not found]                                 ` <20020730190041.GH7567-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:27                                   ` Benjamin Herrenschmidt
2002-07-30 19:03                                   ` Patrick Mochel
     [not found]                                     ` <Pine.LNX.4.44.0207301202250.22697-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-30 19:11                                       ` Pavel Machek
     [not found]                                         ` <20020730191127.GB11531-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 19:12                                           ` Patrick Mochel
2002-07-30 20:46                                   ` Alan Cox
     [not found]                                     ` <1028061979.7974.40.camel-MMxVpc8zpTQVh3rx8e9g/fyykp6/JSeS3vcXtXqGYxw@public.gmane.org>
2002-07-30 18:34                                       ` Benjamin Herrenschmidt
     [not found]                                         ` <20020730183448.20582-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:53                                           ` Pavel Machek
     [not found]                                             ` <20020730195348.GJ12091-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:51                                               ` Benjamin Herrenschmidt
2002-07-30 20:11                       ` Alan Cox
2002-07-30  0:25 Grover, Andrew
  -- strict thread matches above, loose matches on Subject: below --
2002-07-24 19:43 Grover, Andrew
     [not found] ` <59885C5E3098D511AD690002A5072D3C07990D78-OU+JdkIUtvcLll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2002-07-29 22:50   ` Patrick Mochel
     [not found] <lwspm@o-o.yi.org>
     [not found] ` <20020724133821.5598714808-RAHWjsxJnJUdnm+yROfE0A@public.gmane.org>
2002-07-24 13:47   ` Lyle
     [not found]     ` <20020724134715.6060914808-RAHWjsxJnJUdnm+yROfE0A@public.gmane.org>
2002-07-24 15:51       ` Patrick Mochel
2002-07-24 17:07   ` Pavel Machek
     [not found] <mochel@osdl.org>
     [not found] ` <Pine.LNX.4.44.0207240843090.954-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-24 16:37   ` Lyle
     [not found]     ` <20020724163701.D99F714808-RAHWjsxJnJUdnm+yROfE0A@public.gmane.org>
2002-07-24 18:25       ` Patrick Mochel
     [not found]         ` <Pine.LNX.4.44.0207241100080.954-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-24 17:38           ` Benjamin Herrenschmidt
     [not found]             ` <20020724173809.10194-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-29  9:00               ` Pavel Machek
     [not found]                 ` <20020729090041.GB115-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-29 15:08                   ` Benjamin Herrenschmidt
     [not found]                     ` <20020729150807.3604-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-29 17:56                       ` Pavel Machek
     [not found]                         ` <20020729175650.GA1233-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-29 17:33                           ` Benjamin Herrenschmidt
     [not found]                             ` <20020729173302.30557-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-29 18:31                               ` Pavel Machek
     [not found]                                 ` <20020729183143.GA13729-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-29 18:05                                   ` Benjamin Herrenschmidt
     [not found]                                     ` <20020729180547.20998-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-29 19:11                                       ` Pavel Machek
     [not found]                                         ` <20020729191146.GE13729-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-30  7:57                                           ` Benjamin Herrenschmidt
2002-07-29 22:36               ` Patrick Mochel
2002-07-24 17:56   ` Lyle
2002-07-24 13:38 Lyle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020730181810.30687@192.168.4.1 \
    --to=benh-xvmvhmargas8u2djnn8i7kb+6bgklq7r@public.gmane.org \
    --cc=acpi-devel-pyega4qmqnRoyOMFzWx49A@public.gmane.org \
    --cc=mochel-3NddpPZAyC0@public.gmane.org \
    --cc=pavel-AlSwsSmVLrQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox