This is the start of the stable review cycle for the 2.6.21.2 release.
There are 69 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let us know. If anyone is a maintainer of the proper subsystem, and
wants to add a Signed-off-by: line to the patch, please respond with it.
These patches are sent out with a number of different people on the
Cc: line. If you wish to be a reviewer, please email [email protected]
to add your name to the list. If you want to be off the reviewer list,
also email us.
Responses should be made by Wed May 23 19:15 UTC. Anything received
after that time might be too late.
thanks,
the -stable release team
--
On Mon, 21 May 2007 12:16:12 -0700
Chris Wright <[email protected]> wrote:
> This is the start of the stable review cycle for the 2.6.21.2 release.
Gee a lot of these are fixing recently-added regressions :(
Did we fix oprofile on x86_64 yet? If not, I'd suggest we should
hold off 2.6.21.2 until we have done so.
I assume ftp://ftp.firstfloor.org/pub/ak/x86_64/quilt/patches/oprofile-allocation
is what we want.
* Andrew Morton ([email protected]) wrote:
> On Mon, 21 May 2007 12:16:12 -0700
> Chris Wright <[email protected]> wrote:
>
> > This is the start of the stable review cycle for the 2.6.21.2 release.
>
> Gee a lot of these are fixing recently-added regressions :(
>
> Did we fix oprofile on x86_64 yet? If not, I'd suggest we should
> hold off 2.6.21.2 until we have done so.
No, we've seen 2 versions of the patch, no word from Andi, and nothing
upstream that I saw. Andi?
> I assume ftp://ftp.firstfloor.org/pub/ak/x86_64/quilt/patches/oprofile-allocation
> is what we want.
Chris Wright wrote:
> This is the start of the stable review cycle for the 2.6.21.2 release.
> There are 69 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let us know. If anyone is a maintainer of the proper subsystem, and
> wants to add a Signed-off-by: line to the patch, please respond with it.
>
What happened to:
"Fix ACPI suspend / device suspend ordering problem"
52ade9b3b97fd3bea42842a056fe0786c28d0555
On Mon, 21 May 2007, Chuck Ebbert wrote:
>
> What happened to:
>
> "Fix ACPI suspend / device suspend ordering problem"
> 52ade9b3b97fd3bea42842a056fe0786c28d0555
I would suggest waiting on problem reports for that one a bit longer.
Maybe it fixes everything, and has no downsides. But the problem it fixed
isn't new, and the order change certainly has the _potential_ to be scary.
Do we have reports of that one fixing a lot of machines? I know of only
one person it made a difference for..
Linus
* Linus Torvalds ([email protected]) wrote:
> On Mon, 21 May 2007, Chuck Ebbert wrote:
> >
> > What happened to:
> >
> > "Fix ACPI suspend / device suspend ordering problem"
> > 52ade9b3b97fd3bea42842a056fe0786c28d0555
>
> I would suggest waiting on problem reports for that one a bit longer.
It's queued for the next 21.y stable, to give it a little more time.
thanks,
-chris
* Chris Wright ([email protected]) wrote:
> This is the start of the stable review cycle for the 2.6.21.2 release.
> There are 69 patches in this series, all will be posted as a response
> to this one.
Roll-up patch available at:
http://www.kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.21.2-rc1.{gz,bz2}
thanks,
-chris
Chris Wright a ?crit :
> * Andrew Morton ([email protected]) wrote:
>> On Mon, 21 May 2007 12:16:12 -0700
>> Chris Wright <[email protected]> wrote:
>>
>>> This is the start of the stable review cycle for the 2.6.21.2 release.
>> Gee a lot of these are fixing recently-added regressions :(
>>
>> Did we fix oprofile on x86_64 yet? If not, I'd suggest we should
>> hold off 2.6.21.2 until we have done so.
>
> No, we've seen 2 versions of the patch, no word from Andi, and nothing
> upstream that I saw. Andi?
>
Seems Linus tree includes a fix from Andi, check commit
6c977aad03a18019015035958c65b6729cd0574c
Probably good enough for 2.6.21.2 ?
* Eric Dumazet ([email protected]) wrote:
> Chris Wright a ?crit :
> >* Andrew Morton ([email protected]) wrote:
> >>On Mon, 21 May 2007 12:16:12 -0700
> >>Chris Wright <[email protected]> wrote:
> >>
> >>>This is the start of the stable review cycle for the 2.6.21.2 release.
> >>Gee a lot of these are fixing recently-added regressions :(
> >>
> >>Did we fix oprofile on x86_64 yet? If not, I'd suggest we should
> >>hold off 2.6.21.2 until we have done so.
> >
> >No, we've seen 2 versions of the patch, no word from Andi, and nothing
> >upstream that I saw. Andi?
>
> Seems Linus tree includes a fix from Andi, check commit
> 6c977aad03a18019015035958c65b6729cd0574c
Indeed, it's there now.
thanks,
-chris
On Mon, May 21, 2007 at 12:31:48PM -0700, Andrew Morton wrote:
> On Mon, 21 May 2007 12:16:12 -0700
> Chris Wright <[email protected]> wrote:
>
> > This is the start of the stable review cycle for the 2.6.21.2 release.
>
> Gee a lot of these are fixing recently-added regressions :(
>...
If only it would fix all of them...
Michal's list [1] currently contains 51 different regressions in
2.6.21 compared to 2.6.20 (12 of them were already reported before
2.6.21 was released).
cu
Adrian
[1] http://kernelnewbies.org/known_regressions [2]
[2] the 2.6.21 regressions are listed after the 28 known 2.6.22-rc
regressions
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Adrian Bunk wrote:
> On Mon, May 21, 2007 at 12:31:48PM -0700, Andrew Morton wrote:
>> On Mon, 21 May 2007 12:16:12 -0700
>> Chris Wright <[email protected]> wrote:
>>
>>> This is the start of the stable review cycle for the 2.6.21.2 release.
>> Gee a lot of these are fixing recently-added regressions :(
>> ...
>
> If only it would fix all of them...
>
> Michal's list [1] currently contains 51 different regressions in
> 2.6.21 compared to 2.6.20 (12 of them were already reported before
> 2.6.21 was released).
Yeah, 2.6.21 seems awfully buggy, and patches to fix many of the bugs
haven't appeared.
Another 2.6.20 update seems to be in order...
* Chuck Ebbert ([email protected]) wrote:
> Another 2.6.20 update seems to be in order...
Yes, the queue's there, just not ready to go yet. There's still bits that were
for sent for to .21 and are applicable to .20 (which I'm wading through ATM).
thanks,
-chris
On Tue, 22 May 2007, Romano Giannetti wrote:
>
> It's an useful patch for me. Without it, my sony vaio pcg-fx701 was very
> erratic in resume (kernel 2.6.21.1; it works well with the .17 ubuntu
> kernel). With this patch, I have done 7 cycles flawlessly. Even the
> out-of-tree rtl8180 wireless driver [1] works ok across resumes.
Ok, good to hear.
> The only problem is that there is an gaping delay of 60 seconds (more or
> less) on resume. I have the syslog trace copied below; could be a timer
> problem? Is it known? (It is scaring because the laptop seems dead
> during this time. I'm not and expert, but it seems here:
It's not known, no, and yeah, that's scary (and 60 seconds is long enough
that most people would have grown bored and pushed the power button for
five seconds, having considered the resume a failure).
> [ 1.617972] pcmcia: registering new device pcmcia1.0
> [ 61.612517] PM: Writing back config space on device 0000:00:[...]
>
> ...and time do not advance.
Do you mean that doing "date" twice does not increase the seconds? If so,
that's almost certainly related to the gaping delay. Which timer do you
end up using (what does "dmesg | grep clocksource" say)? Does adding
"clocksource=acpi_pm" to the kernel command line change things?
Also, what does your lspci look like?
Linus
> -----Message d'origine-----
> De : [email protected]
> [mailto:[email protected]] De la part de Chuck Ebbert
> Envoy? : 21 mai 2007 18:24
>
> Adrian Bunk wrote:
> > On Mon, May 21, 2007 at 12:31:48PM -0700, Andrew Morton wrote:
> >> On Mon, 21 May 2007 12:16:12 -0700
> >> Chris Wright <[email protected]> wrote:
> >>
> >>> This is the start of the stable review cycle for the 2.6.21.2 release.
> >> Gee a lot of these are fixing recently-added regressions :( ...
> >
> > If only it would fix all of them...
> >
> > Michal's list [1] currently contains 51 different regressions in
> > 2.6.21 compared to 2.6.20 (12 of them were already reported before
> > 2.6.21 was released).
>
> Yeah, 2.6.21 seems awfully buggy, and patches to fix many of
> the bugs haven't appeared.
>
> Another 2.6.20 update seems to be in order...
Hi,
If there is a new stable 2.6.20 / 2.6.21, would it be possible that they both contain also this patch to keep the same behaviour between 2.6.20 -> 2.6.22 kernels regarding paravirt_ops GPL export?
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21564fd2a3deb48200b595332f9ed4c9f311f2a7
Thnx!
- vin
On Tue, May 22, 2007 at 09:28:34PM -0400, Fortier,Vincent [Montreal] wrote:
> > -----Message d'origine-----
> > De : [email protected]
> > [mailto:[email protected]] De la part de Chuck Ebbert
> > Envoy? : 21 mai 2007 18:24
> >
> > Adrian Bunk wrote:
> > > On Mon, May 21, 2007 at 12:31:48PM -0700, Andrew Morton wrote:
> > >> On Mon, 21 May 2007 12:16:12 -0700
> > >> Chris Wright <[email protected]> wrote:
> > >>
> > >>> This is the start of the stable review cycle for the 2.6.21.2 release.
> > >> Gee a lot of these are fixing recently-added regressions :( ...
> > >
> > > If only it would fix all of them...
> > >
> > > Michal's list [1] currently contains 51 different regressions in
> > > 2.6.21 compared to 2.6.20 (12 of them were already reported before
> > > 2.6.21 was released).
> >
> > Yeah, 2.6.21 seems awfully buggy, and patches to fix many of
> > the bugs haven't appeared.
> >
> > Another 2.6.20 update seems to be in order...
>
> Hi,
>
> If there is a new stable 2.6.20 / 2.6.21, would it be possible that they both contain also this patch to keep the same behaviour between 2.6.20 -> 2.6.22 kernels regarding paravirt_ops GPL export?
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21564fd2a3deb48200b595332f9ed4c9f311f2a7
Why? Is there an in-kernel use for that export?
thanks,
greg k-h
(changing email. My employer server adds a stupid and malformed
disclaimer, so that vger refuses the post. Oh well. I will no trim the
quot to my original message so that it's here for anyone).
On Tue, 2007-05-22 at 15:07 -0700, Linus Torvalds wrote:
>
> On Tue, 22 May 2007, Romano Giannetti wrote:
> >
> > It's an useful patch for me. Without it, my sony vaio pcg-fx701 was very
> > erratic in resume (kernel 2.6.21.1; it works well with the .17 ubuntu
> > kernel). With this patch, I have done 7 cycles flawlessly. Even the
> > out-of-tree rtl8180 wireless driver [1] works ok across resumes.
>
> Ok, good to hear.
>
> > The only problem is that there is an gaping delay of 60 seconds (more or
> > less) on resume. I have the syslog trace copied below; could be a timer
> > problem? Is it known? (It is scaring because the laptop seems dead
> > during this time. I'm not and expert, but it seems here:
>
> It's not known, no, and yeah, that's scary (and 60 seconds is long enough
> that most people would have grown bored and pushed the power button for
> five seconds, having considered the resume a failure).
>
> > [ 1.617972] pcmcia: registering new device pcmcia1.0
> > [ 61.612517] PM: Writing back config space on device 0000:00:[...]
> >
> > ...and time do not advance.
>
> Do you mean that doing "date" twice does not increase the seconds? If so,
> that's almost certainly related to the gaping delay. Which timer do you
> end up using (what does "dmesg | grep clocksource" say)? Does adding
> "clocksource=acpi_pm" to the kernel command line change things?
>
I forgot to mention that I have Ingo cfs patch in. But I had the same
behaviour without, so I do not think it's related.
root@rukbat:/sys/power# dmesg | grep clock
[ 19.600060] Time: tsc clocksource has been installed.
[ 23.028323] Time: acpi_pm clocksource has been installed.
The "time do not advance was an error of my side... I was basing myself
on the timestamp on the syslog, but then realized that this has nothig
to do with the time at which te message is sent.
Will try to reboot with clocksource=acpi_pm, althoughI think that this
is the one I'm using.
> Also, what does your lspci look like?
>
> Linus
00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133] (rev 03)
00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133 AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40)
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1a)
00:07.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1a)
00:07.4 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)
00:07.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 50)
00:07.6 Communication controller: VIA Technologies, Inc. AC'97 Modem Controller (rev 30)
00:0a.0 CardBus bridge: Texas Instruments PCI1420
00:0a.1 CardBus bridge: Texas Instruments PCI1420
00:0e.0 FireWire (IEEE 1394): Texas Instruments TSB12LV26 IEEE-1394 Controller (Link)
00:10.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
01:00.0 VGA compatible controller: ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 64)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8180L 802.11b MAC (rev 20)
By the way, suspend to disk (ehem... snapshot/restart) is busted too
(and yes, I have done the echo shutdown > /sys/power/disk thing, he
machine resumes but X no...worked like a charm in 2.6.17.13).
Romano
(resent, using gmail)
On Mon, 2007-05-21 at 14:25 -0700, Chris Wright wrote:
> * Linus Torvalds ([email protected]) wrote:
> > On Mon, 21 May 2007, Chuck Ebbert wrote:
> > >
> > > What happened to:
> > >
> > > "Fix ACPI suspend / device suspend ordering problem"
> > > 52ade9b3b97fd3bea42842a056fe0786c28d0555
> >
> > I would suggest waiting on problem reports for that one a bit longer.
>
> It's queued for the next 21.y stable, to give it a little more time.
>
It's an useful patch for me. Without it, my sony vaio pcg-fx701 was very
erratic in resume (kernel 2.6.21.1; it works well with the .17 ubuntu
kernel). With this patch, I have done 7 cycles flawlessly. Even the
out-of-tree rtl8180 wireless driver [1] works ok across resumes.
The only problem is that there is an gaping delay of 60 seconds (more or
less) on resume. I have the syslog trace copied below; could be a timer
problem? Is it known? (It is scaring because the laptop seems dead
during this time. I'm not and expert, but it seems here:
[ 1.617972] pcmcia: registering new device pcmcia1.0
[ 61.612517] PM: Writing back config space on device 0000:00:[...]
...and time do not advance.
Romano
[1] http://rtl-wifi.sourceforge.net/wiki/Main_Page
May 22 17:55:28 localhost kernel: [ 0.565042] Back to C!
May 22 17:55:28 localhost kernel: [ 0.566588] Applying VIA southbridge workaround.
May 22 17:55:28 localhost kernel: [ 0.566598] PCI: Disabling Via external APIC routing
May 22 17:55:28 localhost kernel: [ 0.595156] PM: Writing back config space on device 0000:00:00.0 at offset 1 (was 2100006, writing b2100006)
May 22 17:55:28 localhost kernel: [ 0.595181] PM: Writing back config space on device 0000:00:01.0 at offset 9 (was fff0, writing 40004000)
May 22 17:55:28 localhost kernel: [ 0.595207] PCI: Setting latency timer of device 0000:00:01.0 to 64
May 22 17:55:28 localhost kernel: [ 0.605346] ACPI: PCI Interrupt 0000:00:07.2[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
May 22 17:55:28 localhost kernel: [ 0.605355] PCI: Setting latency timer of device 0000:00:07.2 to 64
May 22 17:55:28 localhost kernel: [ 0.605395] usb usb1: root hub lost power or was reset
May 22 17:55:28 localhost kernel: [ 0.616334] ACPI: PCI Interrupt 0000:00:07.3[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
May 22 17:55:28 localhost kernel: [ 0.616342] PCI: Setting latency timer of device 0000:00:07.3 to 64
May 22 17:55:28 localhost kernel: [ 0.616379] usb usb2: root hub lost power or was reset
May 22 17:55:28 localhost kernel: [ 0.629345] ACPI: PCI Interrupt 0000:00:07.5[C] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
May 22 17:55:28 localhost kernel: [ 0.629356] PCI: Setting latency timer of device 0000:00:07.5 to 64
May 22 17:55:28 localhost kernel: [ 1.617815] pccard: PCMCIA card inserted into slot 1
May 22 17:55:28 localhost kernel: [ 1.617972] pcmcia: registering new device pcmcia1.0
May 22 17:55:28 localhost kernel: [ 61.612517] PM: Writing back config space on device 0000:00:0e.0 at offset 3 (was 8, writing 4008)
May 22 17:55:28 localhost kernel: [ 61.612526] PM: Writing back config space on device 0000:00:0e.0 at offset 1 (was 2100012, writing 2100016)
May 22 17:55:28 localhost kernel: [ 61.663580] ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[9] MMIO=[e8004000-e80047ff] Max Packet=[2048] IR/IT contexts=[4/8]
May 22 17:55:28 localhost kernel: [ 61.666769] PM: Writing back config space on device 0000:00:10.0 at offset 5 (was 0, writing e8004800)
May 22 17:55:28 localhost kernel: [ 61.666777] PM: Writing back config space on device 0000:00:10.0 at offset 4 (was 1, writing 1801)
May 22 17:55:28 localhost kernel: [ 61.666785] PM: Writing back config space on device 0000:00:10.0 at offset 1 (was 2900000, writing 2900003)
May 22 17:55:28 localhost kernel: [ 61.668452] pnp: Device 00:08 activated.
May 22 17:55:28 localhost kernel: [ 61.668484] pnp: Failed to activate device 00:0a.
May 22 17:55:28 localhost kernel: [ 61.668501] pnp: Failed to activate device 00:0b.
May 22 17:55:28 localhost kernel: [ 62.713961] usbdev1.2_ep00: PM: resume from 0, parent 1-2 still 2
May 22 17:55:28 localhost kernel: [ 62.713968] usbhid 1-2:1.0: PM: resume from 2, parent 1-2 still 2
May 22 17:55:28 localhost kernel: [ 62.713972] usbdev1.2_ep81: PM: resume from 0, parent 1-2:1.0 still 2
May 22 17:55:28 localhost kernel: [ 62.713977] usbdev1.2: PM: resume from 0, parent 1-2 still 2
May 22 17:55:28 localhost kernel: [ 62.714451] Restarting tasks ... done.
May 22 17:55:28 localhost kernel: [ 62.799267] pcmcia: request for exclusive IRQ could not be fulfilled.
May 22 17:55:28 localhost kernel: [ 62.799279] pcmcia: the driver needs updating to supported shared IRQ lines.
May 22 17:55:28 localhost kernel: [ 62.842007] eth0: 3Com 3c589, io 0x300, irq 3, hw_addr 00:00:86:1A:4E:A8
May 22 17:55:28 localhost kernel: [ 62.842019] 8K FIFO split 5:3 Rx:Tx, auto xcvr
May 22 17:55:28 localhost kernel: [ 62.843128] pcmcia: registering new device pcmcia1.1
May 22 17:55:28 localhost kernel: [ 62.843327] pcmcia: request for exclusive IRQ could not be fulfilled.
May 22 17:55:28 localhost kernel: [ 62.843331] pcmcia: the driver needs updating to supported shared IRQ lines.
May 22 17:55:28 localhost kernel: [ 62.883453] usb 1-2: USB disconnect, address 2
May 22 17:55:28 localhost firmware_helper[6082]: main: error loading '/lib/firmware/3CXEM556.cis' for device '/class/firmware/1.0' with driver '(unknown)'
May 22 17:55:28 localhost kernel: [ 62.898934] 1.1: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
May 22 17:55:28 localhost gnome-power-manager: (romano) Resuming computer
May 22 17:55:29 localhost kernel: [ 63.122753] usb 1-2: new low speed USB device using uhci_hcd and address 3
May 22 17:55:29 localhost kernel: [ 63.266890] usb 1-2: configuration #1 chosen from 1 choice
May 22 17:55:29 localhost kernel: [ 63.283145] input: HID 062a:0001 as /class/input/input8
May 22 17:55:29 localhost kernel: [ 63.283254] input: USB HID v1.10 Mouse [HID 062a:0001] on usb-0000:00:07.2-2
May 22 17:55:31 localhost kernel: [ 65.443554] tsdev (compaq touchscreen emulation) is scheduled for removal.
May 22 17:55:31 localhost kernel: [ 65.443560] See Documentation/feature-removal-schedule.txt for details.
May 22 17:55:32 localhost kernel: [ 66.383183] 8139too Fast Ethernet driver 0.9.28
May 22 17:55:32 localhost kernel: [ 66.384536] ACPI: PCI Interrupt 0000:00:10.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
May 22 17:55:32 localhost kernel: [ 66.385555] eth0: RealTek RTL8139 at 0xe0bae800, 08:00:46:6e:93:a8, IRQ 10
May 22 17:55:32 localhost kernel: [ 66.385562] eth0: Identified 8139 chip type 'RTL-8139C'
May 22 17:55:33 localhost kernel: [ 67.631633] input: Power Button (FF) as /class/input/input9
May 22 17:55:33 localhost kernel: [ 67.631865] ACPI: Power Button (FF) [PWRF]
May 22 17:55:33 localhost kernel: [ 67.632345] input: Sleep Button (CM) as /class/input/input10
May 22 17:55:33 localhost kernel: [ 67.642920] ACPI: Sleep Button (CM) [SBTN]
May 22 17:55:33 localhost kernel: [ 67.643101] input: Lid Switch as /class/input/input11
May 22 17:55:33 localhost kernel: [ 67.643130] ACPI: Lid Switch [LID]
May 22 17:55:33 localhost kernel: [ 68.336279] ACPI: Thermal Zone [THRM] (51 C)
May 22 17:55:34 localhost kernel: [ 68.494424] ACPI: AC Adapter [ACAD] (on-line)
May 22 17:55:34 localhost kernel: [ 68.853089] ACPI: Battery Slot [BAT1] (battery present)
May 22 17:55:34 localhost kernel: [ 68.857492] ACPI: Battery Slot [BAT2] (battery absent)
May 22 17:55:34 localhost anacron[6386]: Anacron 2.3 started on 2007-05-22
May 22 17:55:34 localhost anacron[6386]: Normal exit (0 jobs run)
On Wed, 23 May 2007 09:09:00 +0200
Romano Giannetti <[email protected]> wrote:
> Will try to reboot with clocksource=acpi_pm, althoughI think that this
> is the one I'm using.
you can see that with:
cat /sys/devices/system/clocksource/clocksource0/current_clocksource
--
Paolo Ornati
Linux 2.6.22-rc2-gd2579053 on x86_64
On Wed, 2007-05-23 at 09:19 +0200, Paolo Ornati wrote:
> On Wed, 23 May 2007 09:09:00 +0200
> Romano Giannetti <[email protected]> wrote:
>
> > Will try to reboot with clocksource=acpi_pm, althoughI think that this
> > is the one I'm using.
>
> you can see that with:
>
> cat /sys/devices/system/clocksource/clocksource0/current_clocksource
>
Hmmm:
# cat /sys/devices/system/clocksource/clocksource0/current_clocksource
acpi_pm
So I am using it.
Thanks
On Tue, 2007-05-22 at 15:07 -0700, Linus Torvalds wrote:
>
> On Tue, 22 May 2007, Romano Giannetti wrote:
> >
> It's not known, no, and yeah, that's scary (and 60 seconds is long enough
> that most people would have grown bored and pushed the power button for
> five seconds, having considered the resume a failure).
>
> > [ 1.617972] pcmcia: registering new device pcmcia1.0
> > [ 61.612517] PM: Writing back config space on device 0000:00:[...]
> >
I discovered that SysRq-t works during the pause. So I pressed it more
or less halfway the pause; the full result is here:
http://www.dea.icai.upcomillas.es/romano/linux/info/dmesg-resume.txt
It seems that most of the tasks are in
[<c0138931>] refrigerator+0x41/0x60
So, I tried to suspend without any card in the pcmcia slot. Guess what?
I extracted the card and the system did not suspend. Just stopped dead.
Sigh.
Romano
--
Romano Giannetti --- [email protected]
Sorry for the following disclaimer, it's attached by our otugoing server
and I cannot shut it up.
--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribución, reproducción o uso de esta comunicación y/o de la información contenida en la misma están estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por favor, notifíquelo inmediatamente al remitente contestando a este mensaje y proceda a continuación a destruirlo. Gracias por su colaboración.
This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation.
(Changing subject to something more informative. You are lost,
original thread is at http://lkml.org/lkml/2007/5/23/38 )
On Thu, 2007-05-24 at 14:06 +0200, Romano Giannetti wrote:
> On Tue, 2007-05-22 at 15:07 -0700, Linus Torvalds wrote:
> >
> > On Tue, 22 May 2007, Romano Giannetti wrote:
> > >
>
> > It's not known, no, and yeah, that's scary (and 60 seconds is long enough
> > that most people would have grown bored and pushed the power button for
> > five seconds, having considered the resume a failure).
> >
> > > [ 1.617972] pcmcia: registering new device pcmcia1.0
> > > [ 61.612517] PM: Writing back config space on device 0000:00:[...]
> > >
More data. I compiled 2.6.21.2 + the patch "Fix ACPI suspend / device
suspend ordering problem (52ade9b3b97fd3bea42842a056fe0786c28d0555)
and I discovered that if I do not put the 3Com 3CXEM556B card into the
pcmcia slot, the suspend/resume (and the snapshot/restore) works ok,
without delay at all. It continues to work even with a cardbus wifi in
the slot, so my conclusions are that the probable culprit is restricted
to:
* a race when loading the .cis file from userspace
* the serial_cs or 3c589_cs driver (only when the device is in;
they are loaded still now and all is working ok)
...what now?
Romano
--
Romano Giannetti --- [email protected]
Sorry for the following disclaimer, it's attached by our otugoing server
and I cannot shut it up.
--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribución, reproducción o uso de esta comunicación y/o de la información contenida en la misma están estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por favor, notifíquelo inmediatamente al remitente contestando a este mensaje y proceda a continuación a destruirlo. Gracias por su colaboración.
This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation.
On Thu, 24 May 2007, Romano Giannetti wrote:
>
> More data. I compiled 2.6.21.2 + the patch "Fix ACPI suspend / device
> suspend ordering problem (52ade9b3b97fd3bea42842a056fe0786c28d0555)
>
> and I discovered that if I do not put the 3Com 3CXEM556B card into the
> pcmcia slot, the suspend/resume (and the snapshot/restore) works ok,
> without delay at all.
Ok. That was probably true even before you added the suspend ordering
patch.
> It continues to work even with a cardbus wifi in the slot, so my
> conclusions are that the probable culprit is restricted to:
>
> * a race when loading the .cis file from userspace
> * the serial_cs or 3c589_cs driver (only when the device is in;
> they are loaded still now and all is working ok)
>
> ...what now?
Can you compile those two modules with PCMCIA_DEBUG=4?
Something like
make EXTRA_CFLAGS=-DPCMCIA_DEBUG=4
should do it. You might also enable CONFIG_PCMCIA_DEBUG while you're at
it. And then the extra debugging output hopefully will narrow down where
things go south.
Linus
On Thu, 24 May 2007, Linus Torvalds wrote:
>
> Ok. That was probably true even before you added the suspend ordering
> patch.
Oh, no it apparently wasn't. I missed your other email that said
"So, I tried to suspend without any card in the pcmcia slot. Guess what?
I extracted the card and the system did not suspend. Just stopped dead."
so apparently the patch actually did matter for you. Can you double-check
and confirm?
Linus
On Thu, 24 May 2007, Romano Giannetti wrote:
>
> I discovered that SysRq-t works during the pause. So I pressed it more
> or less halfway the pause; the full result is here:
> http://www.dea.icai.upcomillas.es/romano/linux/info/dmesg-resume.txt
>
> It seems that most of the tasks are in
>
> [<c0138931>] refrigerator+0x41/0x60
Yeah, but the interesting one is this pair:
events/0 R running 0 4 1 (L-TLB)
sleep.sh D 0000014F 0 5798 5789 (NOTLB)
Call Trace:
[<c01d3c01>] kobject_uevent_env+0x3a1/0x4a0
[<c02d8509>] wait_for_completion+0x79/0xb0
[<c0116640>] default_wake_function+0x0/0x10
[<c0238a08>] _request_firmware+0x1c8/0x310
[<c0238bef>] request_firmware+0xf/0x20
[<e0a35d5d>] pcmcia_bus_match+0x28d/0x3c0 [pcmcia]
[<c02864a7>] netlink_broadcast+0x1f7/0x310
[<c0233d74>] driver_probe_device+0x34/0xc0
[<c02d79ee>] klist_next+0x4e/0xa0
[<c0233014>] bus_for_each_drv+0x44/0x70
[<c0233eba>] device_attach+0x7a/0x80
[<c0233e00>] __device_attach+0x0/0x10
[<c0232f56>] bus_attach_device+0x26/0x60
[<c0231d06>] device_add+0x5e6/0x6e0
[<c01d350f>] kobject_init+0x2f/0x50
[<e0a360f5>] pcmcia_device_add+0x185/0x220 [pcmcia]
[<e0a36261>] pcmcia_card_add+0xa1/0xc0 [pcmcia]
[<e0913900>] ti12xx_power_hook+0x180/0x1d0 [yenta_socket]
[<e0a36300>] ds_event+0x80/0xb0 [pcmcia]
[<e0967359>] send_event+0x39/0x70 [pcmcia_core]
[<e09677b6>] socket_insert+0x86/0xe0 [pcmcia_core]
[<e0967c2b>] pcmcia_socket_dev_resume+0x7b/0x90 [pcmcia_core]
[<c01e135f>] pci_device_resume+0x1f/0x60
[<c023815f>] resume_device+0x5f/0xf0
ie we have a deadlock because resume wants to do that firmware request,
but the event daemon is apparently spinning like mad.
And yes, request_firmware() has a "loading_timeout" in seconds. And
it's 60. So that explains your pause right there!
It might be some unfortunate interaction with process freezing (my
favorite whipping boy), but it could also be something else. I suspect
we should treat suspend/resume as a bootup event, and not allow execve()
for that case at all. Right now we have:
retval = -EPERM;
if (current->fs->root)
retval = kernel_execve(sub_info->path,
sub_info->argv, sub_info->envp);
in kernel/kmod.c, and that "current->fs->root" thing basically protects
us from trying to run a user-mode helper early in the boot sequence, but
we might want to add a conditional like "&& !resuming" to that test..
Linus
Hi!
> Yeah, but the interesting one is this pair:
>
> events/0 R running 0 4 1 (L-TLB)
>
> sleep.sh D 0000014F 0 5798 5789 (NOTLB)
> Call Trace:
> [<c01d3c01>] kobject_uevent_env+0x3a1/0x4a0
> [<c02d8509>] wait_for_completion+0x79/0xb0
> [<c0116640>] default_wake_function+0x0/0x10
> [<c0238a08>] _request_firmware+0x1c8/0x310
> [<c0238bef>] request_firmware+0xf/0x20
> [<e0a35d5d>] pcmcia_bus_match+0x28d/0x3c0 [pcmcia]
> [<c02864a7>] netlink_broadcast+0x1f7/0x310
> [<c0233d74>] driver_probe_device+0x34/0xc0
> [<c02d79ee>] klist_next+0x4e/0xa0
> [<c0233014>] bus_for_each_drv+0x44/0x70
> [<c0233eba>] device_attach+0x7a/0x80
> [<c0233e00>] __device_attach+0x0/0x10
> [<c0232f56>] bus_attach_device+0x26/0x60
> [<c0231d06>] device_add+0x5e6/0x6e0
> [<c01d350f>] kobject_init+0x2f/0x50
> [<e0a360f5>] pcmcia_device_add+0x185/0x220 [pcmcia]
> [<e0a36261>] pcmcia_card_add+0xa1/0xc0 [pcmcia]
> [<e0913900>] ti12xx_power_hook+0x180/0x1d0 [yenta_socket]
> [<e0a36300>] ds_event+0x80/0xb0 [pcmcia]
> [<e0967359>] send_event+0x39/0x70 [pcmcia_core]
> [<e09677b6>] socket_insert+0x86/0xe0 [pcmcia_core]
> [<e0967c2b>] pcmcia_socket_dev_resume+0x7b/0x90 [pcmcia_core]
> [<c01e135f>] pci_device_resume+0x1f/0x60
> [<c023815f>] resume_device+0x5f/0xf0
>
> ie we have a deadlock because resume wants to do that firmware request,
> but the event daemon is apparently spinning like mad.
>
> And yes, request_firmware() has a "loading_timeout" in seconds. And
> it's 60. So that explains your pause right there!
If someone does request_firmware from resume function... that's
bad. Resume function should be fixed. Pcmcia? ti12xx driver?
> It might be some unfortunate interaction with process freezing (my
> favorite whipping boy), but it could also be something else. I
> suspect
Well. we'd like to present hardware in working state as soon as we
resume (if eth0 was there before resume, it should be there after
resume. not 3 seconds after resume); so if someone needs to load the
firmware, they should just store it in the kernel memory, and load it
during boot or during (very early) suspend.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Thu, 2007-05-24 at 08:28 -0700, Linus Torvalds wrote:
>
> Can you compile those two modules with PCMCIA_DEBUG=4?
>
> Something like
>
> make EXTRA_CFLAGS=-DPCMCIA_DEBUG=4
>
> should do it. You might also enable CONFIG_PCMCIA_DEBUG while you're at
> it. And then the extra debugging output hopefully will narrow down where
> things go south.
Compiling now. I had lost a lot of time because at first try it stopped
in ntfs:
CC [M] fs/ntfs/super.o
fs/ntfs/super.c: In function ‘init_ntfs_fs’:
fs/ntfs/super.c:3152: error: expected ‘)’ before ‘NTFS_VERSION’
fs/ntfs/super.c: At top level:
fs/ntfs/super.c:3262: error: expected ‘,’ or ‘;’ before ‘NTFS_VERSION’
make[2]: *** [fs/ntfs/super.o] Error 1
make[1]: *** [fs/ntfs] Error 2
make: *** [fs] Error 2
I suppose because NTFS_VERSION were defined as EXTRA_CFLAGS too in the Makefile,
and I corrected it adding a fake #define NTFS_VERSION in super.c. Then I
got to a meeting, and coming back:
CC [M] fs/xfs/quota/xfs_dquot.o
fs/xfs/quota/xfs_dquot.c:18:17: error: xfs.h: No such file or directory
fs/xfs/quota/xfs_dquot.c:19:20: error: xfs_fs.h: No such file or directory
fs/xfs/quota/xfs_dquot.c:20:21: error: xfs_bit.h: No such file or directory
fs/xfs/quota/xfs_dquot.c:21:21: error: xfs_log.h: No such file or directory
So I gave up and lost^Wused a couple of hours trimming down .config, and
now it's compiling.
Romano
On Thu, 2007-05-24 at 08:52 -0700, Linus Torvalds wrote:
>
> On Thu, 24 May 2007, Linus Torvalds wrote:
> >
> > Ok. That was probably true even before you added the suspend ordering
> > patch.
>
> Oh, no it apparently wasn't. I missed your other email that said
>
> "So, I tried to suspend without any card in the pcmcia slot. Guess what?
> I extracted the card and the system did not suspend. Just stopped dead."
>
> so apparently the patch actually did matter for you. Can you double-check
> and confirm?
>
Well, I've made a bit of a mess. The setup that has not the delay when
the card is out is a plain 2.6.21.2 (without suspend ordering).
The lockup ocurred on a 2.6.21.1 WITH the suspend ordering patch, but
was just one time, after I plugged and unplugged the card several time.
Could not reproduce it, however. Puzzled.
Romano
On Thu, 24 May 2007, Pavel Machek wrote:
>
> If someone does request_firmware from resume function... that's
> bad. Resume function should be fixed. Pcmcia? ti12xx driver?
Probably pcmcia "ds" driver and CONFIG_PCMCIA_LOAD_CIS.
> Well. we'd like to present hardware in working state as soon as we
> resume (if eth0 was there before resume, it should be there after
> resume. not 3 seconds after resume); so if someone needs to load the
> firmware, they should just store it in the kernel memory, and load it
> during boot or during (very early) suspend.
Equally arguably, we should just have a "resume_late()" call that can be
used to do this after everything is up and running.
And quite frankly, I don't actually see any reason why firmware loading
shouldn't work in the resume path. I really do think that this is ANOTHER
bug that has no other reason than the fact that that f*cking freezer
killed the system for no really good reason.
Linus
On Thu, 24 May 2007, Romano Giannetti wrote:
>
> Well, I've made a bit of a mess. The setup that has not the delay when
> the card is out is a plain 2.6.21.2 (without suspend ordering).
>
> The lockup ocurred on a 2.6.21.1 WITH the suspend ordering patch, but
> was just one time, after I plugged and unplugged the card several time.
> Could not reproduce it, however. Puzzled.
Ok, I'm pretty sure that the suspend ordering doesn't matter at all for
you.
Occasional lockups on resume is probably a separate issue, and it might
well be a race, or even just firmware timing bugs.
Linus
On Thu, 24 May 2007, Linus Torvalds wrote:
>
> Occasional lockups on resume is probably a separate issue, and it might
> well be a race, or even just firmware timing bugs.
Btw, to solve the 60-second timeout problem, do you actually _need_ to
have CONFIG_PCMCIA_LOAD_CIS enabled for those cards to work for you? Quite
likely that's the "firmware" that screws up for you, and it's also not
totally unlikely that you don't even need it.
Linus
On Thursday, 24 May 2007 22:27, Linus Torvalds wrote:
>
> On Thu, 24 May 2007, Pavel Machek wrote:
> >
> > If someone does request_firmware from resume function... that's
> > bad. Resume function should be fixed. Pcmcia? ti12xx driver?
>
> Probably pcmcia "ds" driver and CONFIG_PCMCIA_LOAD_CIS.
>
> > Well. we'd like to present hardware in working state as soon as we
> > resume (if eth0 was there before resume, it should be there after
> > resume. not 3 seconds after resume); so if someone needs to load the
> > firmware, they should just store it in the kernel memory, and load it
> > during boot or during (very early) suspend.
>
> Equally arguably, we should just have a "resume_late()" call that can be
> used to do this after everything is up and running.
>
> And quite frankly, I don't actually see any reason why firmware loading
> shouldn't work in the resume path. I really do think that this is ANOTHER
> bug that has no other reason than the fact that that f*cking freezer
> killed the system for no really good reason.
Well, if I understand request_firmware() correctly, it does something in sysfs
and waits for the user land to react, but at this point the user land can't do
anything.
Greetings,
Rafael
On Thu, 24 May 2007 22:14:08 +0200
Romano Giannetti <[email protected]> wrote:
> Compiling now. I had lost a lot of time because at first try it stopped
> in ntfs:
>
> CC [M] fs/ntfs/super.o
> fs/ntfs/super.c: In function ___init_ntfs_fs___:
> fs/ntfs/super.c:3152: error: expected ___)___ before ___NTFS_VERSION___
> fs/ntfs/super.c: At top level:
> fs/ntfs/super.c:3262: error: expected ___,___ or ___;___ before ___NTFS_VERSION___
> make[2]: *** [fs/ntfs/super.o] Error 1
> make[1]: *** [fs/ntfs] Error 2
> make: *** [fs] Error 2
>
> I suppose because NTFS_VERSION were defined as EXTRA_CFLAGS too in the Makefile,
ntfs is being naughty.
--- a/fs/ntfs/Makefile~a
+++ a/fs/ntfs/Makefile
@@ -6,7 +6,7 @@ ntfs-objs := aops.o attrib.o collate.o c
index.o inode.o mft.o mst.o namei.o runlist.o super.o sysctl.o \
unistr.o upcase.o
-EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.28\"
+EXTRA_CFLAGS += -DNTFS_VERSION=\"2.1.28\"
ifeq ($(CONFIG_NTFS_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG
_
akpm:/usr/src/linux-2.6.22-rc2> grep -r EXTRA_CFLAGS . | fgrep '+=' | wc -l
131
akpm:/usr/src/linux-2.6.22-rc2> grep -r EXTRA_CFLAGS . | fgrep -v '+=' | wc -l
55
hm, lots of Makefiles commit the same sin. Sam, is this as busted as
I think it is?
On Thu, May 24, 2007 at 02:01:54PM -0700, Andrew Morton wrote:
> On Thu, 24 May 2007 22:14:08 +0200
> Romano Giannetti <[email protected]> wrote:
>
> > Compiling now. I had lost a lot of time because at first try it stopped
> > in ntfs:
> >
> > CC [M] fs/ntfs/super.o
> > fs/ntfs/super.c: In function ___init_ntfs_fs___:
> > fs/ntfs/super.c:3152: error: expected ___)___ before ___NTFS_VERSION___
> > fs/ntfs/super.c: At top level:
> > fs/ntfs/super.c:3262: error: expected ___,___ or ___;___ before ___NTFS_VERSION___
> > make[2]: *** [fs/ntfs/super.o] Error 1
> > make[1]: *** [fs/ntfs] Error 2
> > make: *** [fs] Error 2
> >
> > I suppose because NTFS_VERSION were defined as EXTRA_CFLAGS too in the Makefile,
>
> ntfs is being naughty.
>
> --- a/fs/ntfs/Makefile~a
> +++ a/fs/ntfs/Makefile
> @@ -6,7 +6,7 @@ ntfs-objs := aops.o attrib.o collate.o c
> index.o inode.o mft.o mst.o namei.o runlist.o super.o sysctl.o \
> unistr.o upcase.o
>
> -EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.28\"
> +EXTRA_CFLAGS += -DNTFS_VERSION=\"2.1.28\"
>
> ifeq ($(CONFIG_NTFS_DEBUG),y)
> EXTRA_CFLAGS += -DDEBUG
> _
>
>
> akpm:/usr/src/linux-2.6.22-rc2> grep -r EXTRA_CFLAGS . | fgrep '+=' | wc -l
> 131
> akpm:/usr/src/linux-2.6.22-rc2> grep -r EXTRA_CFLAGS . | fgrep -v '+=' | wc -l
> 55
>
> hm, lots of Makefiles commit the same sin. Sam, is this as busted as
> I think it is?
I really cannot see why it makes a difference.
If you use += (and :=) make will resolve EXTRA_CFLAGS when it see it.
Whereas with = make will resolve it only when actually referenced.
But the way we use EXTRA_CFLAGS it should not matter.
If the fix above really helps nfs I need to take a closer look tomorrow.
Sam
On Thu, 24 May 2007 23:12:37 +0200
Sam Ravnborg <[email protected]> wrote:
> On Thu, May 24, 2007 at 02:01:54PM -0700, Andrew Morton wrote:
> > On Thu, 24 May 2007 22:14:08 +0200
> > Romano Giannetti <[email protected]> wrote:
> >
> > > Compiling now. I had lost a lot of time because at first try it stopped
> > > in ntfs:
> > >
> > > CC [M] fs/ntfs/super.o
> > > fs/ntfs/super.c: In function ___init_ntfs_fs___:
> > > fs/ntfs/super.c:3152: error: expected ___)___ before ___NTFS_VERSION___
> > > fs/ntfs/super.c: At top level:
> > > fs/ntfs/super.c:3262: error: expected ___,___ or ___;___ before ___NTFS_VERSION___
> > > make[2]: *** [fs/ntfs/super.o] Error 1
> > > make[1]: *** [fs/ntfs] Error 2
> > > make: *** [fs] Error 2
> > >
> > > I suppose because NTFS_VERSION were defined as EXTRA_CFLAGS too in the Makefile,
> >
> > ntfs is being naughty.
> >
> > --- a/fs/ntfs/Makefile~a
> > +++ a/fs/ntfs/Makefile
> > @@ -6,7 +6,7 @@ ntfs-objs := aops.o attrib.o collate.o c
> > index.o inode.o mft.o mst.o namei.o runlist.o super.o sysctl.o \
> > unistr.o upcase.o
> >
> > -EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.28\"
> > +EXTRA_CFLAGS += -DNTFS_VERSION=\"2.1.28\"
> >
> > ifeq ($(CONFIG_NTFS_DEBUG),y)
> > EXTRA_CFLAGS += -DDEBUG
> > _
> >
> >
> > akpm:/usr/src/linux-2.6.22-rc2> grep -r EXTRA_CFLAGS . | fgrep '+=' | wc -l
> > 131
> > akpm:/usr/src/linux-2.6.22-rc2> grep -r EXTRA_CFLAGS . | fgrep -v '+=' | wc -l
> > 55
> >
> > hm, lots of Makefiles commit the same sin. Sam, is this as busted as
> > I think it is?
>
> I really cannot see why it makes a difference.
> If you use += (and :=) make will resolve EXTRA_CFLAGS when it see it.
> Whereas with = make will resolve it only when actually referenced.
It's not a matter of when it's evaluated. The user is supposed to be
able to set EXTRA_CFLAGS on the command-line, yes? If they do that then
the "=" in there will rub out their efforts. The makefiles should be
appending new things to EXTRA_CFLAGS, rather than doing a replacement?
On Thu, 2007-05-24 at 14:01 -0700, Andrew Morton wrote:
> On Thu, 24 May 2007 22:14:08 +0200
> Romano Giannetti <[email protected]> wrote:
>
> ntfs is being naughty.
>
> hm, lots of Makefiles commit the same sin. Sam, is this as busted as
> I think it is?
Hmmm...
CC [M] drivers/ide/pci/amd74xx.o
drivers/ide/pci/amd74xx.c:28:24: error: ide-timing.h: No such file or
directory
(etc etc)
... and in Makefile:
EXTRA_CFLAGS := -Idrivers/ide
I changed it to
EXTRA_CFLAGS += -Idrivers/ide
but I have the same error. Puzzled (yes, again).
On Thu, 2007-05-24 at 13:35 -0700, Linus Torvalds wrote:
>
> On Thu, 24 May 2007, Linus Torvalds wrote:
> >
> > Occasional lockups on resume is probably a separate issue, and it might
> > well be a race, or even just firmware timing bugs.
>
> Btw, to solve the 60-second timeout problem, do you actually _need_ to
> have CONFIG_PCMCIA_LOAD_CIS enabled for those cards to work for you? Quite
> likely that's the "firmware" that screws up for you, and it's also not
> totally unlikely that you don't even need it.
I could try to undefine it. As a fast try, I simply removed the .cis
file, and the card do not work (complains it can't find cis file). I do
not remember where, but I read that I need this file --- I think I found
it mentioned in the cardmgr->pccardctl conversion HOWTO.
Romano
On Thu, 2007-05-24 at 23:12 +0200, Sam Ravnborg wrote:
>
> I really cannot see why it makes a difference.
> If you use += (and :=) make will resolve EXTRA_CFLAGS when it see it.
> Whereas with = make will resolve it only when actually referenced.
>
> But the way we use EXTRA_CFLAGS it should not matter.
> If the fix above really helps nfs I need to take a closer look tomorrow.
>
No, you're right, it doesn't help. What could help is a form of saying
to make "add this EXTRA_CFLAGS to whatever is specified in the command
line". No idea if it exists.
Romano
Hi!
> > Well. we'd like to present hardware in working state as soon as we
> > resume (if eth0 was there before resume, it should be there after
> > resume. not 3 seconds after resume); so if someone needs to load the
> > firmware, they should just store it in the kernel memory, and load it
> > during boot or during (very early) suspend.
>
> Equally arguably, we should just have a "resume_late()" call that can be
> used to do this after everything is up and running.
Yes, we can do that. But userland will see devices "not there" for a
few seconds after boot.
...that is ugly, but we can survive it for ethernet cards etc... but
it will be really fatal for any block device. Pcmcia block devices
exist, so I do not think we can do that.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Fri, 25 May 2007, Pavel Machek wrote:
> >
> > Equally arguably, we should just have a "resume_late()" call that can be
> > used to do this after everything is up and running.
>
> Yes, we can do that. But userland will see devices "not there" for a
> few seconds after boot.
No they won't.
Why the HELL cannot you realize that kernel threads are different?
The right thing to do is AND HAS ALWAYS BEEN, to stop and start user
threads only around the whole thing.
Don't touch those kernel threads. Stop freezing them.
Then, what you do is:
- stop user space
- suspend
- resume
- start user space
and at no point do you touch any kernel threads.
And yes, that "resume" part is multi-phase. We already have
"resume_early()" to do bus-level setup, and then "resume()" to do the
"make devices work". I was suggesting adding a "resume_late()" phase to
let the devices do things that require other devices to work, like doing
firmware loading.
But stopping kernel threads is STUPID. As long as we continue to do that,
it will never _ever_ work.
Yeah, we could re-start the kernel thread before "resume_late()", but the
fact is, they shouldn't have been stopped in the first place.
Linus
On Thu, 2007-05-24 at 08:28 -0700, Linus Torvalds wrote:
> Can you compile those two modules with PCMCIA_DEBUG=4?
>
> Something like
>
> make EXTRA_CFLAGS=-DPCMCIA_DEBUG=4
>
Well, I have to give up for tonight... that make do not works (see the
problem explained in other messages, some part of the kernel fails to
compile for the redefined EXTRA_CFLAGS); I naively tried to do:
make EXTRA_CFLAGS=-DPCMCIA_DEBUG=4 drivers/pcmcia/
(which worked)
and then
make
(alone) but the second one recompiled the drivers/pcmcia/ subdir, too.
Too tired to think right now (good excuse), so I will try to find a bit
of time tomorrow.
Another naive doubt I have is: in 2.6.17.13, with additional patches
http://zeus2.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d834c16516d1ebec4766fc58c059bf01311e6045
http://zeus2.kernel.org/git/?p=linux/kernel/git/brodo/pcmcia-fixes-2.6.git;a=commitdiff;h=f755c48254ce743a3d4c1fd6b136366c018ee5b2
http://zeus2.kernel.org/git/?p=linux/kernel/git/brodo/pcmcia-fixes-2.6.git;a=commitdiff;h=e6248ff596dd15bce0be4d780c60f173389b11c3
(now in the mainline), it works. And it used the cis file too.
Romano
--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribución, reproducción o uso de esta comunicación y/o de la información contenida en la misma están estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por favor, notifíquelo inmediatamente al remitente contestando a este mensaje y proceda a continuación a destruirlo. Gracias por su colaboración.
This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation.
On Thu 2007-05-24 15:10:29, Linus Torvalds wrote:
>
>
> On Fri, 25 May 2007, Pavel Machek wrote:
> > >
> > > Equally arguably, we should just have a "resume_late()" call that can be
> > > used to do this after everything is up and running.
> >
> > Yes, we can do that. But userland will see devices "not there" for a
> > few seconds after boot.
>
> No they won't.
>
> Why the HELL cannot you realize that kernel threads are different?
Ugh? We are talking about request_firmware() here, right? That's
calling userland helper to load the firmware...? Looks like USER
thread to me.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Thu, 24 May 2007, Linus Torvalds wrote:
>
> Then, what you do is:
> - stop user space
> - suspend
> - resume
> - start user space
Btw, this is where things like "udevd" can be really problematic. That
whole "uevent over netlink" stuff is really nasty for things like this.
It's quite possible that even for user-level threads, we simply MUST NOT
freeze them the way we do. Exactly because of deadlocks.
I'm personally really really convinced that the whole freezer thing is a
total disaster. I don't know how anybody can even imagine anything else.
It's simply deadlock city.
We should freeze IO, not processes.
Linus
On Thu, May 24, 2007 at 11:51:53PM +0200, Romano Giannetti wrote:
> On Thu, 2007-05-24 at 23:12 +0200, Sam Ravnborg wrote:
>
> >
> > I really cannot see why it makes a difference.
> > If you use += (and :=) make will resolve EXTRA_CFLAGS when it see it.
> > Whereas with = make will resolve it only when actually referenced.
> >
> > But the way we use EXTRA_CFLAGS it should not matter.
> > If the fix above really helps nfs I need to take a closer look tomorrow.
>
> No, you're right, it doesn't help. What could help is a form of saying
> to make "add this EXTRA_CFLAGS to whatever is specified in the command
> line". No idea if it exists.
The GNU make manual says:
"To append more text to a variable defined on the command line, use:
override VARIABLE += MORE TEXT
"
HTH,
Johannes
Hi!
>
> On Fri, 25 May 2007, Pavel Machek wrote:
> > >
> > > Equally arguably, we should just have a "resume_late()" call that can be
> > > used to do this after everything is up and running.
> >
> > Yes, we can do that. But userland will see devices "not there" for a
> > few seconds after boot.
>
> No they won't.
>
> Why the HELL cannot you realize that kernel threads are different?
>
> The right thing to do is AND HAS ALWAYS BEEN, to stop and start user
> threads only around the whole thing.
>
> Don't touch those kernel threads. Stop freezing them.
>
> Then, what you do is:
> - stop user space
> - suspend
> - resume
~~~~~~~~~~~
notice how resume of pcmcia card that poor user has needs
userspace. So this does not work.
> - start user space
My proposed solution is "fix pcmcia to load firmware before suspend
even starts"
- HERE
> - stop user space
> - suspend
> - resume
> - start user space
Maybe freezer causes cancer in small children, but lets not blame it
for this.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Thu 2007-05-24 15:23:56, Linus Torvalds wrote:
>
>
> On Thu, 24 May 2007, Linus Torvalds wrote:
> >
> > Then, what you do is:
> > - stop user space
> > - suspend
> > - resume
> > - start user space
>
> Btw, this is where things like "udevd" can be really problematic. That
> whole "uevent over netlink" stuff is really nasty for things like this.
>
> It's quite possible that even for user-level threads, we simply MUST NOT
> freeze them the way we do. Exactly because of deadlocks.
Killing freezer will not help you in any way. udevd may need access to
arbitrary devices. You will still have the deadlocks, only this time
userland will be involved, too.
Just load the firmware before starting suspend.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Fri, 25 May 2007, Romano Giannetti wrote:
>
> Another naive doubt I have is: in 2.6.17.13, with additional patches
> http://zeus2.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d834c16516d1ebec4766fc58c059bf01311e6045
> http://zeus2.kernel.org/git/?p=linux/kernel/git/brodo/pcmcia-fixes-2.6.git;a=commitdiff;h=f755c48254ce743a3d4c1fd6b136366c018ee5b2
> http://zeus2.kernel.org/git/?p=linux/kernel/git/brodo/pcmcia-fixes-2.6.git;a=commitdiff;h=e6248ff596dd15bce0be4d780c60f173389b11c3
>
> (now in the mainline), it works. And it used the cis file too.
It really would be nice of you to just "git bisect" this, to see where it
started having that 60-second delay..
Linus
On Fri, 25 May 2007, Pavel Machek wrote:
> >
> > Why the HELL cannot you realize that kernel threads are different?
>
> Ugh? We are talking about request_firmware() here, right? That's
> calling userland helper to load the firmware...? Looks like USER
> thread to me.
Right. And if we had had the nice old /sbin/hotplug thing, it would all
have worked fine - because it would just have done an execve(), and things
would be happy.
But people screwed that up too, and now udevd is an undebuggable user
thread. Shit happens. See my other email about why even user threads can
probably not be frozen, and the whole freezer thing is misdesigned.
And I repeat: PowerPC had working and stable suspend five _years_ ago,
without any of that freezing crud. We should rip it out.
Linus
On Fri, 25 May 2007, Pavel Machek wrote:
> My proposed solution is "fix pcmcia to load firmware before suspend
> even starts"
s/pcmcia/all drivers that load firmware/ if you are going to go that way.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
Hi!
> > > Why the HELL cannot you realize that kernel threads are different?
> >
> > Ugh? We are talking about request_firmware() here, right? That's
> > calling userland helper to load the firmware...? Looks like USER
> > thread to me.
>
> Right. And if we had had the nice old /sbin/hotplug thing, it would all
> have worked fine - because it would just have done an execve(), and things
> would be happy.
>
> But people screwed that up too, and now udevd is an undebuggable user
> thread. Shit happens. See my other email about why even user threads can
> probably not be frozen, and the whole freezer thing is misdesigned.
I'm not ready to redesign udevd :-(.
Your other mail proves that either
1) we can stop freezing udevd, and pray udevd does not become confused
by "half hardware not available" while system is being suspended
_or_
2) we need to preload firmware during _suspend_. I AM TELLING THAT TO
PEOPLE FOR FIVE YEARS NOW.
> And I repeat: PowerPC had working and stable suspend five _years_ ago,
> without any of that freezing crud. We should rip it out.
Imageine we killed freezer. Also imagine Romano has IDE card his
PCMCIA slot. Kaboom, we solved nothing. We'll either deadlock or do
something very nasty to the filesystem on the IDE card ... because
we'll have udevd running, but fs on IDE card not available.
That does not work. "Not freezing udevd" only makes problems hard to
trigger, see?
Now... "should we rip freezer out of suspend" is a different story. It
does not help _here_. We still need to load the firmware during
_suspend_.
[Can you ack this point and we can have nice flamewar about ripping
out freezer?]
But I'd actually like to get rid of freezer for suspend (I believe
it is needed for hibernation) -- we'll need to do similar that for
runtime suspending of devices, anyway. But "just rip it out" will
cause some hard to debug breakage, we need to somehow audit the
drivers, or ask driver writers to audit them or something. ... and
yes, ripping freezer out _will_ make drivers more complex. Your video
capture card will now have to deal with
"ouch, I was already told to suspend, and now someone is calling my
ioctls() ?!".
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Thu 2007-05-24 20:16:38, Henrique de Moraes Holschuh wrote:
> On Fri, 25 May 2007, Pavel Machek wrote:
> > My proposed solution is "fix pcmcia to load firmware before suspend
> > even starts"
>
> s/pcmcia/all drivers that load firmware/ if you are going to go that way.
I'm not "going that way". It always was that way. If driver tries to
load firmware during suspend, it will deadlock.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Fri, 25 May 2007, Pavel Machek wrote:
>
> 2) we need to preload firmware during _suspend_. I AM TELLING THAT TO
> PEOPLE FOR FIVE YEARS NOW.
And people aren't listening. Have you thought about _why_?
The thing is, it should just work. Even without pre-loading.
> Imageine we killed freezer. Also imagine Romano has IDE card his
> PCMCIA slot. Kaboom, we solved nothing.
Don't be silly. We solved it. The firmware has to be loadable from
somewhere else, since otherwise his IDE card wouldn't have been accessible
in the first place!
So all your arguments are just bogus crap.
Linus
Hi Linus.
On Thu, 2007-05-24 at 17:37 -0700, Linus Torvalds wrote:
>
> On Fri, 25 May 2007, Pavel Machek wrote:
> >
> > 2) we need to preload firmware during _suspend_. I AM TELLING THAT TO
> > PEOPLE FOR FIVE YEARS NOW.
>
> And people aren't listening. Have you thought about _why_?
>
> The thing is, it should just work. Even without pre-loading.
>
> > Imageine we killed freezer. Also imagine Romano has IDE card his
> > PCMCIA slot. Kaboom, we solved nothing.
>
> Don't be silly. We solved it. The firmware has to be loadable from
> somewhere else, since otherwise his IDE card wouldn't have been accessible
> in the first place!
>
> So all your arguments are just bogus crap.
Let me see if I can help. I'll probably fail miserably, but I can only
try :)
First, let me agree with you that for the atomic copy itself, the
freezer is unnecessary. Disabling irqs and so on is enough to ensure the
atomic copy is atomic. I don't think any of us are arguing with you
there.
Where we see the problem is with what happens after the atomic copy is
made. The problem is that the atomic copy includes struct inodes, dnodes
and such like - an in memory representation of the state of mounted
filesystems. Imagine that, post atomic copy, we don't have the freezer.
Processes can then make on-disk changes to these mounted filesystems in
the time before we complete saving the image and powering down. If, at
resume time, we then restore the atomic copy, we have a mismatch between
what the in-memory data structures say and what the on-disk data says.
This leads to corruption.
How to avoid?
Well, there are only two options as far as I can see. We either stop
those changes occurring in the first place, or we make them undoable.
Freezing processes, and/or filesystems would be the first path,
checkpointing the second.
So, as far as I can see, we're stuck with freezing processes at least
until checkpointing is implemented.
I have to admit though, that even if checkpointing was implemented, I'd
like to see freezing processes remain. The image gets written faster if
we don't have to compete for cpu and i/o. It also allows us to do a
fuller image of memory than is otherwise possible (Yes, I know some
people don't care for full images, but others of us have usage patterns
that make the system far more useable if a full image is kept, or simply
prefer to have our machines as if the power had never gone away).
Without processes freezing, I'd have to work a lot harder to find a way
to do that full image. The simplest way would probably be to carry the
freezer code myself. (Yeah, I'm reconciled to the idea of never getting
Suspend2 merged. I'd like it to happen, but won't hold my breath.
Someone needs to break your suspend-to-ram or battery so you see the use
for hibernation :>).
Hope this helps.
Nigel
On Fri, 25 May 2007, Nigel Cunningham wrote:
>
> First, let me agree with you that for the atomic copy itself, the
> freezer is unnecessary. Disabling irqs and so on is enough to ensure the
> atomic copy is atomic. I don't think any of us are arguing with you
> there.
First off, realize that the problem actually happens during
suspend-to-ram.
Think about that for a second.
In fact, think about it for a _loong_ time. Because dammit, people seem to
have a really hard time even realizing this.
There is no "atomic copy".
There is no "checkpointing".
There is no "spoon".
> Hope this helps.
Hope _the_above_ helps. Why is it so hard for people to accept that
suspend-to-ram shouldn't break because of some IDIOTIC issues with disk
snapshots?
And why do you people _always_ keep mixing the two up?
Linus
Hi Linus.
On Thu, 2007-05-24 at 19:10 -0700, Linus Torvalds wrote:
>
> On Fri, 25 May 2007, Nigel Cunningham wrote:
> >
> > First, let me agree with you that for the atomic copy itself, the
> > freezer is unnecessary. Disabling irqs and so on is enough to ensure the
> > atomic copy is atomic. I don't think any of us are arguing with you
> > there.
>
> First off, realize that the problem actually happens during
> suspend-to-ram.
>
> Think about that for a second.
>
> In fact, think about it for a _loong_ time. Because dammit, people seem to
> have a really hard time even realizing this.
>
> There is no "atomic copy".
>
> There is no "checkpointing".
>
> There is no "spoon".
>
> > Hope this helps.
>
> Hope _the_above_ helps. Why is it so hard for people to accept that
> suspend-to-ram shouldn't break because of some IDIOTIC issues with disk
> snapshots?
>
> And why do you people _always_ keep mixing the two up?
It does. Sorry. I didn't read enough of the context.
To answer the question, I guess the answer is that although they're
different creatures, they have similarities. This is one of them, which
is why I could make the mistake I did. Nothing in the issue being
discussed was unique to suspend-to-ram. Perhaps we (or at least I) focus
too much on the similarities, but that doesn't mean they're not there.
Regards,
Nigel
On Fri, 25 May 2007, Nigel Cunningham wrote:
>
> To answer the question, I guess the answer is that although they're
> different creatures, they have similarities. This is one of them, which
> is why I could make the mistake I did. Nothing in the issue being
> discussed was unique to suspend-to-ram. Perhaps we (or at least I) focus
> too much on the similarities, but that doesn't mean they're not there.
I agree that the current bug is not unique to STR. In fact, I think Romano
tested both STD and STR, and both had the same bug with the 60s timeout.
But what irritates me is that STR really shouldn't have _had_ that bug at
all. The only reason STR had the same bug as STD was exactly the fact that
the two features are too closely inter-twined in the kernel.
That irritates me hugely. We had a bug we should never had had! We had a
bug because people are sharing code that shouldn't be shared! We had a bug
because of code that makes no sense in the first place!
I agree that disk snapshotting is much harder. If we had a bug just in
that part, I wouldn't mind it so much. Getting hard problems wrong isn't
something you should be ashamed of. What I mind is that the _easier_
problem got infected by all the bugs from the _harder_ issue. That just
makes me really really angry and frustrated.
Look at it this way: if you designed a CPU, and you made the integer
code-path share everything with the floating point side, because "addition
is addition", and as a result the latency for the simple arithmetic and
logical ops in integer ALU was four cycles, what would you be?
You'd be a moron, that's what.
And that is _exactly_ what the current STD/STR code does. It says "suspend
is suspend" and tries to share the same pipeline, even though the two
operations are totally different, and share nothing but the name people
use for it (and even the name is really pretty weak, and I've tried to
get people to use some other name for STD).
So yes,the two things _do_ share the problem, but they really really
shouldn't. There's no reason to think that they should. And it drives me
absolutely bonkers that people seem to have such a hard time seeing that.
That said, I think freezing is crap even for snapshotting/suspend-to-disk,
but the point of the above rant is to show how insane it is to think that
problems and complexity in one area should translate into problems and
complexity in another area.
And if the snapshot people want to screw up their snapshots with freezing,
I don't actually care that much. I'd much rather have working STR. As it
is now, they're now _both_ broken.
Linus
Hi.
On Thu, 2007-05-24 at 19:41 -0700, Linus Torvalds wrote:
>
> On Fri, 25 May 2007, Nigel Cunningham wrote:
> >
> > To answer the question, I guess the answer is that although they're
> > different creatures, they have similarities. This is one of them, which
> > is why I could make the mistake I did. Nothing in the issue being
> > discussed was unique to suspend-to-ram. Perhaps we (or at least I) focus
> > too much on the similarities, but that doesn't mean they're not there.
>
> I agree that the current bug is not unique to STR. In fact, I think Romano
> tested both STD and STR, and both had the same bug with the 60s timeout.
>
> But what irritates me is that STR really shouldn't have _had_ that bug at
> all. The only reason STR had the same bug as STD was exactly the fact that
> the two features are too closely inter-twined in the kernel.
>
> That irritates me hugely. We had a bug we should never had had! We had a
> bug because people are sharing code that shouldn't be shared! We had a bug
> because of code that makes no sense in the first place!
>
> I agree that disk snapshotting is much harder. If we had a bug just in
> that part, I wouldn't mind it so much. Getting hard problems wrong isn't
> something you should be ashamed of. What I mind is that the _easier_
> problem got infected by all the bugs from the _harder_ issue. That just
> makes me really really angry and frustrated.
>
> Look at it this way: if you designed a CPU, and you made the integer
> code-path share everything with the floating point side, because "addition
> is addition", and as a result the latency for the simple arithmetic and
> logical ops in integer ALU was four cycles, what would you be?
>
> You'd be a moron, that's what.
>
> And that is _exactly_ what the current STD/STR code does. It says "suspend
> is suspend" and tries to share the same pipeline, even though the two
> operations are totally different, and share nothing but the name people
> use for it (and even the name is really pretty weak, and I've tried to
> get people to use some other name for STD).
I think I get what you're trying to say, but I also think you're either
overstating your case ("...totally different and share nothing but the
name...") or underestimating the similiarity - they both need (albeit
for different reasons) to do the cpu hotplugging, driver suspending
(yeah, there are similarities and differences there) and irq disabling.
That's _some_ similarity. Apart from that, yeah - they are totally
different.
Re the name, we discussed changing the name of Suspend2 on IRC a night
or two ago. We came to the conclusion that, for better or for worse,
it's too well known now. I can see your logic in wanting to
differentiate them, but I seem to be a bit stuck :\. Push some more.
Maybe we'll get there anyway :) Maybe you can get rid of that horrible,
unpronounceable 'swsusp' name while you're at it? :)
> So yes,the two things _do_ share the problem, but they really really
> shouldn't. There's no reason to think that they should. And it drives me
> absolutely bonkers that people seem to have such a hard time seeing that.
>
> That said, I think freezing is crap even for snapshotting/suspend-to-disk,
> but the point of the above rant is to show how insane it is to think that
> problems and complexity in one area should translate into problems and
> complexity in another area.
Does that imply that you'd prefer to see filesystem checkpointing code,
that you think freezing can be done better, or do you have some other
solution that hasn't occurred to me?
> And if the snapshot people want to screw up their snapshots with freezing,
> I don't actually care that much. I'd much rather have working STR. As it
> is now, they're now _both_ broken.
Fair enough :).
Nigel
On Fri, 25 May 2007, Nigel Cunningham wrote:
> >
> > That said, I think freezing is crap even for snapshotting/suspend-to-disk,
> > but the point of the above rant is to show how insane it is to think that
> > problems and complexity in one area should translate into problems and
> > complexity in another area.
>
> Does that imply that you'd prefer to see filesystem checkpointing code,
> that you think freezing can be done better, or do you have some other
> solution that hasn't occurred to me?
I actually don't think that processes should be frozen really at all.
I agree that filesystems have to be frozen (and I think that checkpointing
of the filesystem or block device is "too clever"), but I just don't think
that has anything to do with freezing processes.
So I'd actually much prefer to freeze at the VFS (and socket layers, etc),
and make sure that anybody who tries to write or do something else that we
cannot do until resuming, will just be blocked (or perhaps just buffered)!
See? I actually think that this process-based thing is barking up the
wrong tree. After all, it's really not the case that we need to stop
processes, and stopping processes really does have some problems. It's
simpler in some ways, but I think a more directed solution would actually
be better.
>bviously we _do_ want to actually try to quiesce normal user processes.
>But by "normal user", I'd be willing to limit it to non-uid-zero things,
>for example. Exactly because it does turn out that the kernel kind of
>depends on user-land things for stuff like network filesystem connection
>setup etc (ie we tend to do things like the mount encryption stuff in
>userland!).
But I really don't care that deeply per se, exactly because I don't use it
myself. I think people are going down the wrong rabbit-hole, but it
wouldn't _irritate_ me that much except for the fact that it now also
impacts suspend-to-RAM.
Linus
Howdy.
On Thu, 2007-05-24 at 20:31 -0700, Linus Torvalds wrote:
>
> On Fri, 25 May 2007, Nigel Cunningham wrote:
> > >
> > > That said, I think freezing is crap even for snapshotting/suspend-to-disk,
> > > but the point of the above rant is to show how insane it is to think that
> > > problems and complexity in one area should translate into problems and
> > > complexity in another area.
> >
> > Does that imply that you'd prefer to see filesystem checkpointing code,
> > that you think freezing can be done better, or do you have some other
> > solution that hasn't occurred to me?
>
> I actually don't think that processes should be frozen really at all.
>
> I agree that filesystems have to be frozen (and I think that checkpointing
> of the filesystem or block device is "too clever"), but I just don't think
> that has anything to do with freezing processes.
>
> So I'd actually much prefer to freeze at the VFS (and socket layers, etc),
> and make sure that anybody who tries to write or do something else that we
> cannot do until resuming, will just be blocked (or perhaps just buffered)!
>
> See? I actually think that this process-based thing is barking up the
> wrong tree. After all, it's really not the case that we need to stop
> processes, and stopping processes really does have some problems. It's
> simpler in some ways, but I think a more directed solution would actually
> be better.
That does sound doable.
I'm sorry to say it, but dropping process freezing still seems to me
like the better way though. I prefer it because of the reliability
aspect. With the current code, having frozen processes, I can look at
the state of memory, calculate how much I'll need for this or that and
know that I'll have sufficient memory for the atomic copy and for doing
the I/O (making assumptions about how much memory drivers will
allocate) before I start to do either. If we stop freezing processes,
that predictability will go away. There'll always be a possibility that
some process will get memory hungry and stop me from being able to get
the image on disk, and I'll have to either abort or give up and try
again and again until I can complete writing the image, the battery runs
out or whatever...
> >bviously we _do_ want to actually try to quiesce normal user processes.
> >But by "normal user", I'd be willing to limit it to non-uid-zero things,
> >for example. Exactly because it does turn out that the kernel kind of
> >depends on user-land things for stuff like network filesystem connection
> >setup etc (ie we tend to do things like the mount encryption stuff in
> >userland!).
Not sure who you're quoting here, but it's not me. Pavel maybe? I was
unsub'd for a couple of weeks, so guess it's from during that period.
> But I really don't care that deeply per se, exactly because I don't use it
> myself. I think people are going down the wrong rabbit-hole, but it
> wouldn't _irritate_ me that much except for the fact that it now also
> impacts suspend-to-RAM.
Does that mean you never ever power off your laptop (assuming you have
one), and the battery never runs out? Surely you must power it off
completely sometimes? If you do, doesn't that ever happen at a time when
you're part way through something and you'd like to be able to pick up
your merge or whatever later without having to say "Now, where was I up
to?" *shrug* Maybe you're just exceptional :) (Yeah, we know you are in
other ways, but this way?...)
Regards,
Nigel
On Fri, 25 May 2007, Nigel Cunningham wrote:
>
> Does that mean you never ever power off your laptop (assuming you have
> one), and the battery never runs out? Surely you must power it off
> completely sometimes?
So? The bootup isn't that much worse than a disk suspend/resume, and it's
reliable.
And actually, I don't use laptops much. I use mostly desktops, and STR
works fine on at least some of them. In contrast, doing some
suspend-to-disk thing would just be insane and idiotic. If I have to wait
for half a minute and have a slow system even after that because my git
trees aren't in the cache, I really might as well just shut them off.
In contrast, STR means they are quiet and don't waste energy when I don't
use them, but they're instantly available when I care. HUGE difference.
I really think suspend-to-disk is just a total waste of my time.
Linus
On Thu, May 24, 2007 at 02:21:26PM -0700, Andrew Morton wrote:
>
> It's not a matter of when it's evaluated. The user is supposed to be
> able to set EXTRA_CFLAGS on the command-line, yes? If they do that then
> the "=" in there will rub out their efforts. The makefiles should be
> appending new things to EXTRA_CFLAGS, rather than doing a replacement?
There is no way to specify additional CFLAGS on the commandline today.
For sparse we took the shorthand CF so you can do:
make C=2 CF=-warn-bitwise
But we have no such thing for CFLAGS.
If there is a real need I can cook up something.
But frankly I have alway edited top-level Makefile and be doen with it.
I will fix it so Kbuild do not barf out if you set EXTRA_* on the commandline
but silently ignore it instead.
Sam
Hi.
On Thu, 2007-05-24 at 21:49 -0700, Linus Torvalds wrote:
>
> On Fri, 25 May 2007, Nigel Cunningham wrote:
> >
> > Does that mean you never ever power off your laptop (assuming you have
> > one), and the battery never runs out? Surely you must power it off
> > completely sometimes?
>
> So? The bootup isn't that much worse than a disk suspend/resume, and it's
> reliable.
>
> And actually, I don't use laptops much. I use mostly desktops, and STR
> works fine on at least some of them. In contrast, doing some
> suspend-to-disk thing would just be insane and idiotic. If I have to wait
> for half a minute and have a slow system even after that because my git
> trees aren't in the cache, I really might as well just shut them off.
>
> In contrast, STR means they are quiet and don't waste energy when I don't
> use them, but they're instantly available when I care. HUGE difference.
>
> I really think suspend-to-disk is just a total waste of my time.
Ah. That's because you're using [u]swsusp. If you used Suspend2, your
git trees would be in the cache, your system wouldn't be slow and you'd
still be back up in that half a minute or so - probably less time. Give
it a try for a week, and then go back to rebooting. After that, tell me
rebooting is better and I've wasted the last 5 or 6 years improving the
code.
Regards,
Nigel
On Thu, 2007-05-24 at 15:49 -0700, Linus Torvalds wrote:
>
> On Fri, 25 May 2007, Romano Giannetti wrote:
> >
> > Another naive doubt I have is: in 2.6.17.13, with additional patches
> > http://zeus2.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d834c16516d1ebec4766fc58c059bf01311e6045
> > http://zeus2.kernel.org/git/?p=linux/kernel/git/brodo/pcmcia-fixes-2.6.git;a=commitdiff;h=f755c48254ce743a3d4c1fd6b136366c018ee5b2
> > http://zeus2.kernel.org/git/?p=linux/kernel/git/brodo/pcmcia-fixes-2.6.git;a=commitdiff;h=e6248ff596dd15bce0be4d780c60f173389b11c3
> >
> > (now in the mainline), it works. And it used the cis file too.
>
> It really would be nice of you to just "git bisect" this, to see where it
> started having that 60-second delay..
>
> Linus
Yep, it would be nice. I will try; but this has to wait a week or more,
end term is approaching and this is a busy period not only for student.
Meanwhile, I tried to compile with PCMCIA debug with nil result (it
seems that a good part of the kernel do not compile if you override
EXTRA_CFLAGS on the make command line). So I tried to define
PCMCIA_DEBUG=4 in the source(s) file affected, but no joy... then I
checked in a clean tree:
cd /linux-2.6.21.3/drivers/pcmcia
% grep PCMCIA_DEBUG *
Kconfig:config PCMCIA_DEBUG
m8xx_pcmcia.c:#ifdef PCMCIA_DEBUG
m8xx_pcmcia.c:static int pc_debug = PCMCIA_DEBUG;
Makefile:ifeq ($(CONFIG_PCMCIA_DEBUG),y)
...so it's seems that only the m8xx modules uses it, and the modules
that load the drivers for my card is yenta_socket... no idea on how to
enable debug.
Romano
--
Romano Giannetti --- [email protected]
Sorry for the following disclaimer, it's attached by our otugoing server
and I cannot shut it up.
--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribución, reproducción o uso de esta comunicación y/o de la información contenida en la misma están estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por favor, notifíquelo inmediatamente al remitente contestando a este mensaje y proceda a continuación a destruirlo. Gracias por su colaboración.
This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation.
Hi!
> > 2) we need to preload firmware during _suspend_. I AM TELLING THAT TO
> > PEOPLE FOR FIVE YEARS NOW.
>
> And people aren't listening. Have you thought about _why_?
>
> The thing is, it should just work. Even without pre-loading.
But it does not work, and as you demonstrated, getting it to work w/o
preloading is awful lot of work. Feel free to send a patch. Unless you
are ready to do that, stop confusing driver authors.
> > Imageine we killed freezer. Also imagine Romano has IDE card his
> > PCMCIA slot. Kaboom, we solved nothing.
>
> Don't be silly. We solved it. The firmware has to be loadable from
> somewhere else, since otherwise his IDE card wouldn't have been accessible
> in the first place!
Firmware loader is complex userspace process. That's not silly. It is
userland, and I'd hate to explain to its authors detailed rules.
It could do 'find / -name "pcmcia-card-firmware"' for example. It
could do dbus message to tell gnome-graphical-crap to display window
to say that it is loading firmware. Maybe it also writes to syslog
when syslogd is available.
It is userland process, so it is allowed to do stupid stuff.
[If you do not agree, please try to write up
"Doc*/what-firmware-loader-must-do.txt" -- at that point you should
realize how ugly the solution you are suggesting is.]
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Thu, 2007-05-24 at 15:49 -0700, Linus Torvalds wrote:
>
> It really would be nice of you to just "git bisect" this, to see where it
> started having that 60-second delay..
...and while at it, I decided to start by learning a bit more of git,
and installed the last version...
% git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6
Initialized empty Git repository in /usr/src/git/linux-2.6/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
I cannot use git protocol from here (overfirewalling, you know...)
Romano
--
Romano Giannetti --- [email protected]
Sorry for the following disclaimer, it's attached by our otugoing server
and I cannot shut it up.
--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribución, reproducción o uso de esta comunicación y/o de la información contenida en la misma están estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por favor, notifíquelo inmediatamente al remitente contestando a este mensaje y proceda a continuación a destruirlo. Gracias por su colaboración.
This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation.
Hi!
> > To answer the question, I guess the answer is that although they're
> > different creatures, they have similarities. This is one of them, which
> > is why I could make the mistake I did. Nothing in the issue being
> > discussed was unique to suspend-to-ram. Perhaps we (or at least I) focus
> > too much on the similarities, but that doesn't mean they're not there.
>
> I agree that the current bug is not unique to STR. In fact, I think Romano
> tested both STD and STR, and both had the same bug with the 60s timeout.
>
> But what irritates me is that STR really shouldn't have _had_ that bug at
> all. The only reason STR had the same bug as STD was exactly the fact that
> the two features are too closely inter-twined in the kernel.
And what do you expect? We have three people working on
hibernation, and suspend-to-ram was created as "oh, if we do this,
this, and this, we get get suspend-to-ram with existing code".
> I agree that disk snapshotting is much harder. If we had a bug just in
> that part, I wouldn't mind it so much. Getting hard problems wrong isn't
> something you should be ashamed of. What I mind is that the _easier_
> problem got infected by all the bugs from the _harder_ issue. That just
> makes me really really angry and frustrated.
>
> Look at it this way: if you designed a CPU, and you made the integer
> code-path share everything with the floating point side, because "addition
> is addition", and as a result the latency for the simple arithmetic and
> logical ops in integer ALU was four cycles, what would you be?
You'd be seriously overstaffed in FPU side, and seriously understaffed
on ALU side.
This is basically what happened here. I tell people to get hibernation
to work _first_ because it is usually easier.
And what does that mean? We need three people to work on
suspend-to-RAM. Heck, we need at least _one_ person to work on
suspend-to-RAM, but he needs to be listed in MAINTAINERS.
With hibernation people trying to maintain suspend in their spare
cycles, how do you expect suspend to work? Similar to hibernation,
that's how it looks today.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Friday, 25 May 2007 01:19, Pavel Machek wrote:
> On Thu 2007-05-24 20:16:38, Henrique de Moraes Holschuh wrote:
> > On Fri, 25 May 2007, Pavel Machek wrote:
> > > My proposed solution is "fix pcmcia to load firmware before suspend
> > > even starts"
> >
> > s/pcmcia/all drivers that load firmware/ if you are going to go that way.
>
> I'm not "going that way". It always was that way. If driver tries to
> load firmware during suspend, it will deadlock.
Exactly.
And the freezing of user land has _nothing_ to do with that. The fact is
the user land is not reliable while device drivers are being suspended,
regardless of whether it's frozen at that point or not.
BTW, we are going (or at least I'm going) to untangle the hibernation and
suspend code paths, but I have limited time for that and I just _can't_ do this
any faster. In the meantime, we have bugs like this one that need to be fixed
_within_ the current limitations, because we just _can't_ remove these
limitations overnight..
Greetings,
Rafael
On Fri, 25 May 2007, Romano Giannetti wrote:
>
> ...and while at it, I decided to start by learning a bit more of git,
> and installed the last version...
>
> % git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6
> Initialized empty Git repository in /usr/src/git/linux-2.6/.git/
> Cannot get remote repository information.
> Perhaps git-update-server-info needs to be run there?
Heh. If you are using http://, you should _not_ ask for "git.kernel.org".
So use
git clone http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6
instead. That should work (modulo mirroring issues - but mirroring has
worked pretty well lately)
> I cannot use git protocol from here (overfirewalling, you know...)
http:// will suck, but should work. It will be a bit frustrating, because
when it downloads the big packs, it will just say something like
Getting pack 4f22c0234340c4f3470c04f912969fc59ae8babc
which contains ...
and then it will be quiet for a _loong_ time while it downloads that 164MB
pack..
And the real problem with http:// will come later, if you use git to keep
up-to-date with the kernel, and I end up repacking the archive (which I
usually do around major releases). Then it will end up fetching the newly
repacked data - even though most of it you already have.
Anyway, there's a reason why the "native" protocols are much preferred,
but the http:// one does work. It just requires http://www.kernel.org, not
git.kernel.org.
Linus
On Thu, May 24, 2007 at 03:53:28PM -0700, Linus Torvalds wrote:
> And I repeat: PowerPC had working and stable suspend five _years_ ago,
> without any of that freezing crud. We should rip it out.
As far as I can tell the PPC code simply shuts down the devices without
worrying about userspace at all. If this was reliable, what prevents us
from simply disabling the freezer for STR?
--
Matthew Garrett | [email protected]
On Sun, 27 May 2007, Matthew Garrett wrote:
>
> As far as I can tell the PPC code simply shuts down the devices without
> worrying about userspace at all. If this was reliable, what prevents us
> from simply disabling the freezer for STR?
Personally, I think that's the right thing to do.
And by "disabling the freezer", I think we should just not call it at all.
However, sadly, right now it's called from common code. I'll happily take
a tested patch to split that code sequence up, and try to do it in 2.6.23,
if somebody has the energy (I'm getting to the point where I may just do
it myself, but my lazy nature still hopes for a STR person to step
forward).
Linus
On Sun, May 27, 2007 at 09:26:00AM -0700, Linus Torvalds wrote:
> And by "disabling the freezer", I think we should just not call it at all.
> However, sadly, right now it's called from common code. I'll happily take
> a tested patch to split that code sequence up, and try to do it in 2.6.23,
> if somebody has the energy (I'm getting to the point where I may just do
> it myself, but my lazy nature still hopes for a STR person to step
> forward).
I'll take a look at this. It probably makes sense to build on Rafael's
work on splitting the codepaths up.
--
Matthew Garrett | [email protected]
On Sunday, 27 May 2007 18:43, Matthew Garrett wrote:
> On Sun, May 27, 2007 at 09:26:00AM -0700, Linus Torvalds wrote:
>
> > And by "disabling the freezer", I think we should just not call it at all.
> > However, sadly, right now it's called from common code. I'll happily take
> > a tested patch to split that code sequence up, and try to do it in 2.6.23,
> > if somebody has the energy (I'm getting to the point where I may just do
> > it myself, but my lazy nature still hopes for a STR person to step
> > forward).
>
> I'll take a look at this. It probably makes sense to build on Rafael's
> work on splitting the codepaths up.
Actaully, removing the freezer from the suspend code path is simple. You only
need to remove calls to freeze_processes() and thaw_processes() from
kernel/power/main.c .
That said, I don't think that PPC does what you say only. We've discussed this
a bit on linux-pm, in this thread:
https://lists.linux-foundation.org/pipermail/linux-pm/2007-May/012242.html
In particular, please see this message:
https://lists.linux-foundation.org/pipermail/linux-pm/2007-May/012301.html
Greetings,
Rafael
On Sun, May 27, 2007 at 08:32:14PM +0200, Rafael J. Wysocki wrote:
> In particular, please see this message:
>
> https://lists.linux-foundation.org/pipermail/linux-pm/2007-May/012301.html
Yes, there's also the notifier chain for the hardware. However, very few
drivers seem to use that - adb seems to be the only one still in the
tree. For everything else, the device tree is used in exactly the same
way as on x86. If it's safe on Macs but not on x86, then (as far as I
can tell) it looks like it's only by luck.
Anyway. I've tested the following patch on a dual-core x86. No obvious
issues yet, but I'll try to put it through a few hundred cycles.
diff --git a/include/linux/pm.h b/include/linux/pm.h
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 8812985..1db3012 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -19,7 +19,6 @@
#include <linux/console.h>
#include <linux/cpu.h>
#include <linux/resume-trace.h>
-#include <linux/freezer.h>
#include <linux/vmstat.h>
#include "power.h"
@@ -66,9 +65,10 @@ static inline void pm_finish(suspend_state_t state)
* suspend_prepare - Do prep work before entering low-power state.
* @state: State we're entering.
*
- * This is common code that is called for each state that we're
- * entering. Allocate a console, stop all processes, then make sure
- * the platform can enter the requested state.
+ * This is common code that is called for each state that we're
+ * entering. Allocate a console, then make sure the platform can
+ * enter the requested state. This is not called for
+ * suspend-to-disk.
*/
static int suspend_prepare(suspend_state_t state)
@@ -81,11 +81,6 @@ static int suspend_prepare(suspend_state_t state)
pm_prepare_console();
- if (freeze_processes()) {
- error = -EAGAIN;
- goto Thaw;
- }
-
if ((free_pages = global_page_state(NR_FREE_PAGES))
< FREE_PAGE_NUMBER) {
pr_debug("PM: free some memory\n");
@@ -93,7 +88,7 @@ static int suspend_prepare(suspend_state_t state)
if (nr_free_pages() < FREE_PAGE_NUMBER) {
error = -ENOMEM;
printk(KERN_ERR "PM: No enough memory\n");
- goto Thaw;
+ goto Exit;
}
}
@@ -118,8 +113,7 @@ static int suspend_prepare(suspend_state_t state)
device_resume();
Resume_console:
resume_console();
- Thaw:
- thaw_processes();
+ Exit:
pm_restore_console();
return error;
}
@@ -160,8 +154,8 @@ int suspend_enter(suspend_state_t state)
* suspend_finish - Do final work before exiting suspend sequence.
* @state: State we're coming out of.
*
- * Call platform code to clean up, restart processes, and free the
- * console that we've allocated. This is not called for suspend-to-disk.
+ * Call platform code to clean up and free the console that we've
+ * allocated. This is not called for suspend-to-disk.
*/
static void suspend_finish(suspend_state_t state)
@@ -170,7 +164,6 @@ static void suspend_finish(suspend_state_t state)
pm_finish(state);
device_resume();
resume_console();
- thaw_processes();
pm_restore_console();
}
--
Matthew Garrett | [email protected]
On Sunday, 27 May 2007 20:44, Matthew Garrett wrote:
> On Sun, May 27, 2007 at 08:32:14PM +0200, Rafael J. Wysocki wrote:
>
> > In particular, please see this message:
> >
> > https://lists.linux-foundation.org/pipermail/linux-pm/2007-May/012301.html
>
> Yes, there's also the notifier chain for the hardware. However, very few
> drivers seem to use that - adb seems to be the only one still in the
> tree. For everything else, the device tree is used in exactly the same
> way as on x86. If it's safe on Macs but not on x86, then (as far as I
> can tell) it looks like it's only by luck.
>
> Anyway. I've tested the following patch on a dual-core x86. No obvious
> issues yet, but I'll try to put it through a few hundred cycles.
OK
I'm working on a patch that introduces hibernation/suspend notifiers. It will
conflict with this one a bit, but OTOH it might be useful here too.
I'll post it in a while in a separate thread.
Greetings,
Rafael
On Sun, May 27, 2007 at 07:44:02PM +0100, Matthew Garrett wrote:
> Anyway. I've tested the following patch on a dual-core x86. No obvious
> issues yet, but I'll try to put it through a few hundred cycles.
This /mostly/ works - I've had my test machine cycling through a suspend
cycle every 10 seconds for the past hour without any difficulties
providing I unload USB first. If USB is loaded, the suspend occasionally
fails with one of the devices returning -EBUSY and causing it to be
aborted. I haven't looked into this in any detail yet, but it's
presumably sufficiently generic code that it's potentially biting people
on PPC anyway.
--
Matthew Garrett | [email protected]
On Monday, 28 May 2007 03:05, Matthew Garrett wrote:
> On Sun, May 27, 2007 at 07:44:02PM +0100, Matthew Garrett wrote:
>
> > Anyway. I've tested the following patch on a dual-core x86. No obvious
> > issues yet, but I'll try to put it through a few hundred cycles.
>
> This /mostly/ works - I've had my test machine cycling through a suspend
> cycle every 10 seconds for the past hour without any difficulties
> providing I unload USB first. If USB is loaded, the suspend occasionally
> fails with one of the devices returning -EBUSY and causing it to be
> aborted. I haven't looked into this in any detail yet, but it's
> presumably sufficiently generic code that it's potentially biting people
> on PPC anyway.
Most probably.
Still, please take what I said in the other thread into consideration: We've
been using the freezer for so long that at least some drivers started to rely
on it being used.
Even if there are no such drivers on your system, they can be used by other
systems.
Greetings,
Rafael
Hi!
> > As far as I can tell the PPC code simply shuts down the devices without
> > worrying about userspace at all. If this was reliable, what prevents us
> > from simply disabling the freezer for STR?
>
> Personally, I think that's the right thing to do.
>
> And by "disabling the freezer", I think we should just not call it at all.
> However, sadly, right now it's called from common code. I'll happily take
> a tested patch to split that code sequence up, and try to do it in 2.6.23,
> if somebody has the energy (I'm getting to the point where I may just do
> it myself, but my lazy nature still hopes for a STR person to step
> forward).
I guess we should warn the driver authors, then; and decide what
driver authors should do.
If I'm video4linux driver for grabbing screen, have been suspended,
and someone asks me to read a frame, should I
a) return -ESORRYIMSUSPENDED
b) just block the caller
?
a) seems ugly to my eyes (userspace should not know about suspend).
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Mon, May 28, 2007 at 10:11:15AM +0200, Rafael J. Wysocki wrote:
> On Monday, 28 May 2007 03:05, Matthew Garrett wrote:
> > This /mostly/ works - I've had my test machine cycling through a suspend
> > cycle every 10 seconds for the past hour without any difficulties
> > providing I unload USB first. If USB is loaded, the suspend occasionally
> > fails with one of the devices returning -EBUSY and causing it to be
> > aborted. I haven't looked into this in any detail yet, but it's
> > presumably sufficiently generic code that it's potentially biting people
> > on PPC anyway.
>
> Most probably.
>
> Still, please take what I said in the other thread into consideration: We've
> been using the freezer for so long that at least some drivers started to rely
> on it being used.
>
> Even if there are no such drivers on your system, they can be used by other
> systems.
Sure, but if any of these drivers run on PPC then they're broken anyway.
The assumption that processes will be frozen during suspend is true in
the specific case of ACPI and some of the ARM platforms, but not true on
PPC or APM systems. We either need to fix the drivers to stop assuming
this or add the process freezer to the other PM systems. Right now,
they're buggy.
--
Matthew Garrett | [email protected]
Hi!
> > > This /mostly/ works - I've had my test machine cycling through a suspend
> > > cycle every 10 seconds for the past hour without any difficulties
> > > providing I unload USB first. If USB is loaded, the suspend occasionally
> > > fails with one of the devices returning -EBUSY and causing it to be
> > > aborted. I haven't looked into this in any detail yet, but it's
> > > presumably sufficiently generic code that it's potentially biting people
> > > on PPC anyway.
> >
> > Most probably.
> >
> > Still, please take what I said in the other thread into consideration: We've
> > been using the freezer for so long that at least some drivers started to rely
> > on it being used.
> >
> > Even if there are no such drivers on your system, they can be used by other
> > systems.
>
> Sure, but if any of these drivers run on PPC then they're broken anyway.
> The assumption that processes will be frozen during suspend is true in
> the specific case of ACPI and some of the ARM platforms, but not true on
> PPC or APM systems. We either need to fix the drivers to stop assuming
> this or add the process freezer to the other PM systems. Right now,
> they're buggy.
Well, PPC people are aware of this, and they think they can fix the
drivers. We probably want to drop the freezer for suspend long-term,
so. PPC machines use small subset of all the drivers, so it apparently
is not big problem for them.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Mon, May 28, 2007 at 02:55:07PM +0200, Pavel Machek wrote:
> Well, PPC people are aware of this, and they think they can fix the
> drivers. We probably want to drop the freezer for suspend long-term,
> so. PPC machines use small subset of all the drivers, so it apparently
> is not big problem for them.
I'm fairly certain that PPC uses USB. In any case, it's not limited to
PPC - APM has the same issue. Any driver that assumes processes will be
frozen during suspend to RAM is broken now, not the future.
--
Matthew Garrett | [email protected]
Hi!
> > Well, PPC people are aware of this, and they think they can fix the
> > drivers. We probably want to drop the freezer for suspend long-term,
> > so. PPC machines use small subset of all the drivers, so it apparently
> > is not big problem for them.
>
> I'm fairly certain that PPC uses USB. In any case, it's not limited to
> PPC - APM has the same issue. Any driver that assumes processes will be
> frozen during suspend to RAM is broken now, not the future.
Yup, that's a possible view. Fixes welcome.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Mon, 28 May 2007, Pavel Machek wrote:
>
> I guess we should warn the driver authors, then; and decide what driver
> authors should do.
Drivers really shouldn't do anythign at all.
> If I'm video4linux driver for grabbing screen, have been suspended, and
> someone asks me to read a frame, should I
>
> a) return -ESORRYIMSUSPENDED
>
> b) just block the caller
The "subsystem" thing should have stopped the queues, and the device
should never even _see_ this.
Before we suspend a device, we call the subsystem that that device has
been registered with. Ie, we have code like this:
if (dev->class && dev->class->suspend)
error = dev->class->suspend(dev, state);
which was very much designed so that individual devices wouldn't have to
always know - if the upper layer devices for that class can handle these
things, they should.
Do people actually _do_ this, right now? No. But we do actually have the
infrastructure, and I think we have one or two classes that actually do
use it (at least the "rfkill_class" has a suspend member, dunno how well
this model actually works).
I think Greg had some patches to make network drivers use this, for
example. Network drivers right now all end up doing stuff that really
doesn't belong in the driver at all when they suspend, and the
infrastructure _should_ just do it for them (ie do all the _network_
related stuff, as opposed to the actual hardware-related stuff).
(Examples of things that we probably _should_ do for network devices on a
class level:
suspend:
netif_poll_disable()
if (netif_running(dev))
dev->stop(dev);
resume:
if (netif_running(dev))
dev->start(dev);
netif_poll_enable(dev);
or something similar).
Linus
Hi.
On Mon, 2007-05-28 at 14:03 +0100, Matthew Garrett wrote:
> On Mon, May 28, 2007 at 02:55:07PM +0200, Pavel Machek wrote:
>
> > Well, PPC people are aware of this, and they think they can fix the
> > drivers. We probably want to drop the freezer for suspend long-term,
> > so. PPC machines use small subset of all the drivers, so it apparently
> > is not big problem for them.
>
> I'm fairly certain that PPC uses USB. In any case, it's not limited to
> PPC - APM has the same issue. Any driver that assumes processes will be
> frozen during suspend to RAM is broken now, not the future.
The converse is also true, though. Any process that assumes processes
aren't frozen during suspend to RAM is also broken now, and will be
while we allow the possibility of suspending to ram after writing a
hibernation image.
In short, drivers should be designed to work whether processes are
frozen or not.
Regards,
Nigel
On Mon, May 28, 2007 at 09:53:50AM -0700, Linus Torvalds wrote:
>
> Before we suspend a device, we call the subsystem that that device has
> been registered with. Ie, we have code like this:
>
> if (dev->class && dev->class->suspend)
> error = dev->class->suspend(dev, state);
>
> which was very much designed so that individual devices wouldn't have to
> always know - if the upper layer devices for that class can handle these
> things, they should.
>
> Do people actually _do_ this, right now? No. But we do actually have the
> infrastructure, and I think we have one or two classes that actually do
> use it (at least the "rfkill_class" has a suspend member, dunno how well
> this model actually works).
>
> I think Greg had some patches to make network drivers use this, for
> example. Network drivers right now all end up doing stuff that really
> doesn't belong in the driver at all when they suspend, and the
> infrastructure _should_ just do it for them (ie do all the _network_
> related stuff, as opposed to the actual hardware-related stuff).
Yes, I started to work on it, as it is the correct thing to do, but got
sidetracked, sorry :(
> (Examples of things that we probably _should_ do for network devices on a
> class level:
>
> suspend:
> netif_poll_disable()
> if (netif_running(dev))
> dev->stop(dev);
>
> resume:
> if (netif_running(dev))
> dev->start(dev);
> netif_poll_enable(dev);
>
> or something similar).
I'll try to hack something together later this week along this line and
see how it works...
thanks,
greg k-h
On 5/25/07, Linus Torvalds <[email protected]> wrote:
> On Fri, 25 May 2007, Pavel Machek wrote:
> >
> > 2) we need to preload firmware during _suspend_. I AM TELLING THAT TO
> > PEOPLE FOR FIVE YEARS NOW.
>
> And people aren't listening. Have you thought about _why_?
>
> The thing is, it should just work. Even without pre-loading.
>
> > Imageine we killed freezer. Also imagine Romano has IDE card his
> > PCMCIA slot. Kaboom, we solved nothing.
>
> Don't be silly. We solved it. The firmware has to be loadable from
> somewhere else, since otherwise his IDE card wouldn't have been accessible
> in the first place!
The shiny userspace firmware loading causes problems since it exists,
every second box has problems with it, in all sorts of situations. If
people are still sold to the idea of userspace firmware loading, why
don't we keep the data in the driver, instead of immediately
discarding it after the first upload? Not to waste a few hundred
kilobytes? That doesn't sound like a convincing deal, after all the
years people try to work around the issues it causes.
Kay
On Sun, 2007-05-27 at 19:44 +0100, Matthew Garrett wrote:
>
> Anyway. I've tested the following patch on a dual-core x86. No obvious
> issues yet, but I'll try to put it through a few hundred cycles.
[patch to disable freezer deleted]
First of all, excuse me for being a quite lousy tester. Could not come
around to try bisecting, no time at all. Yesterday in the autobus I gave
a shot to this "wild test" and I report the results here.
- The good (?) news. I have made 7 suspend/resume cycle (to ram, I
haven't tested hibernation) with a 2.6.21.2 with that patch, applied
manually. The system did suspend and resume nicely even compiling a
kernel and opening openoffice. Normally (le me stress _normally_) no
delay was apparent on resume. I do not know how dangerous is this... :-)
- The bad (?) news. One time out of 7 I had the 60 seconds delay. I
attach here the dmesg(s) of the resumes, a good one, a delayed one, and
another good one after a reboot (where you can, by the way, see the
dancing serial effect... the card is sometime /dev/ttyS1,
sometime /dev/ttyS2).
[ 1112.984000] Back to C!
[ 1112.985000] Applying VIA southbridge workaround.
[ 1112.985000] PCI: Disabling Via external APIC routing
[ 1113.418000] PM: Writing back config space on device 0000:00:00.0 at offset 1 (was 2100006, writing 12100006)
[ 1113.418000] PM: Writing back config space on device 0000:00:01.0 at offset 9 (was fff0, writing 38003800)
[ 1113.418000] PCI: Setting latency timer of device 0000:00:01.0 to 64
[ 1114.408000] ACPI: PCI Interrupt 0000:00:07.2[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
[ 1114.408000] PCI: Setting latency timer of device 0000:00:07.2 to 64
[ 1114.408000] usb usb1: root hub lost power or was reset
[ 1114.481000] ACPI: PCI Interrupt 0000:00:07.3[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
[ 1114.481000] PCI: Setting latency timer of device 0000:00:07.3 to 64
[ 1114.481000] usb usb2: root hub lost power or was reset
[ 1114.657000] ACPI: PCI Interrupt 0000:00:07.5[C] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
[ 1114.657000] PCI: Setting latency timer of device 0000:00:07.5 to 64
[ 1115.347000] pccard: PCMCIA card inserted into slot 1
[ 1115.347000] pcmcia: registering new device pcmcia1.0
[ 1115.459000] pcmcia: request for exclusive IRQ could not be fulfilled.
[ 1115.459000] pcmcia: the driver needs updating to supported shared IRQ lines.
[ 1115.504000] eth0: 3Com 3c589, io 0x300, irq 3, hw_addr 00:00:86:1A:4E:A8
[ 1115.504000] 8K FIFO split 5:3 Rx:Tx, auto xcvr
[ 1115.504000] pcmcia: registering new device pcmcia1.1
[ 1115.504000] pcmcia: request for exclusive IRQ could not be fulfilled.
[ 1115.504000] pcmcia: the driver needs updating to supported shared IRQ lines.
[ 1115.545000] 1.1: ttyS2 at I/O 0x3e8 (irq = 3) is a 16550A
[ 1115.558000] PM: Writing back config space on device 0000:00:0e.0 at offset 3 (was 8, writing 4008)
[ 1115.558000] PM: Writing back config space on device 0000:00:0e.0 at offset 1 (was 2100012, writing 2100016)
[ 1115.609000] ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[9] MMIO=[e8004000-e80047ff] Max Packet=[2048] IR/IT contexts=[4/8]
[ 1115.615000] PM: Writing back config space on device 0000:00:10.0 at offset 5 (was 0, writing e8004800)
[ 1115.615000] PM: Writing back config space on device 0000:00:10.0 at offset 4 (was 1, writing 1801)
[ 1115.615000] PM: Writing back config space on device 0000:00:10.0 at offset 1 (was 2900000, writing 2900003)
[ 1115.670000] pnp: Device 00:08 activated.
[ 1115.670000] pnp: Failed to activate device 00:0a.
[ 1115.670000] pnp: Failed to activate device 00:0b.
[ 1117.648000] 8139too Fast Ethernet driver 0.9.28
[ 1117.650000] ACPI: PCI Interrupt 0000:00:10.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
[ 1117.653000] eth0: RealTek RTL8139 at 0xe0a72800, 08:00:46:6e:93:a8, IRQ 10
[ 1117.653000] eth0: Identified 8139 chip type 'RTL-8139C'
[ 1118.403000] input: Power Button (FF) as /class/input/input13
[ 1118.404000] ACPI: Power Button (FF) [PWRF]
[ 1118.404000] input: Sleep Button (CM) as /class/input/input14
[ 1118.405000] ACPI: Sleep Button (CM) [SBTN]
[ 1118.406000] input: Lid Switch as /class/input/input15
[ 1118.407000] ACPI: Lid Switch [LID]
[ 1118.830000] ACPI: Thermal Zone [THRM] (36 C)
[ 1119.431000] ACPI: AC Adapter [ACAD] (off-line)
[ 1119.899000] ACPI: Battery Slot [BAT1] (battery present)
[ 1119.904000] ACPI: Battery Slot [BAT2] (battery absent)
[ 1126.226000] eth1: no IPv6 routers present
suspend...
[ 2019.310000] pccard: card ejected from slot 0
[ 2019.345000] PCMCIA: socket dc99bc28: *** DANGER *** unable to remove socket power
[ 2019.346000] pccard: card ejected from slot 1
[ 2020.041000] ACPI: PCI interrupt for device 0000:00:10.0 disabled
[ 2024.641000] Suspending console(s)
[ 2024.656000] usbdev2.1: PM: suspend 0->2, parent usb2 already 2
[ 2024.656000] usbdev2.1_ep81: PM: suspend 0->2, parent 2-0:1.0 already 2
[ 2024.656000] hub 2-0:1.0: PM: suspend 2->2, parent usb2 already 2
[ 2024.656000] usbdev2.1_ep00: PM: suspend 0->2, parent usb2 already 2
[ 2026.121000] pnp: Device 00:08 disabled.
[ 2026.137000] ACPI: PCI interrupt for device 0000:00:07.5 disabled
[ 2026.158000] ACPI: PCI interrupt for device 0000:00:07.3 disabled
[ 2026.169000] ACPI: PCI interrupt for device 0000:00:07.2 disabled
[ 2026.191000] Back to C!
[ 2026.191000] Applying VIA southbridge workaround.
[ 2026.191000] PCI: Disabling Via external APIC routing
[ 2026.247000] PM: Writing back config space on device 0000:00:00.0 at offset 1 (was 2100006, writing 12100006)
[ 2026.247000] PM: Writing back config space on device 0000:00:01.0 at offset 9 (was fff0, writing 38003800)
[ 2026.247000] PCI: Setting latency timer of device 0000:00:01.0 to 64
[ 2026.258000] ACPI: PCI Interrupt 0000:00:07.2[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
[ 2026.258000] PCI: Setting latency timer of device 0000:00:07.2 to 64
[ 2026.258000] usb usb1: root hub lost power or was reset
[ 2026.269000] ACPI: PCI Interrupt 0000:00:07.3[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
[ 2026.269000] PCI: Setting latency timer of device 0000:00:07.3 to 64
[ 2026.269000] usb usb2: root hub lost power or was reset
[ 2026.282000] ACPI: PCI Interrupt 0000:00:07.5[C] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
[ 2026.282000] PCI: Setting latency timer of device 0000:00:07.5 to 64
[ 2027.240000] pccard: CardBus card inserted into slot 0
[ 2027.844000] pccard: PCMCIA card inserted into slot 1
[ 2027.844000] pcmcia: registering new device pcmcia1.0
YEP! Again!
[ 2087.910000] PM: Writing back config space on device 0000:00:0e.0 at offset 3 (was 8, writing 4008)
[ 2087.910000] PM: Writing back config space on device 0000:00:0e.0 at offset 1 (was 2100012, writing 2100016)
[ 2087.961000] ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[9] MMIO=[e8004000-e80047ff] Max Packet=[2048] IR/IT contexts=[4/8]
[ 2087.965000] PM: Writing back config space on device 0000:00:10.0 at offset 5 (was 0, writing e8004800)
[ 2087.965000] PM: Writing back config space on device 0000:00:10.0 at offset 4 (was 1, writing 1801)
[ 2087.965000] PM: Writing back config space on device 0000:00:10.0 at offset 1 (was 2900000, writing 2900003)
[ 2087.967000] pnp: Device 00:08 activated.
[ 2087.967000] pnp: Failed to activate device 00:0a.
[ 2087.967000] pnp: Failed to activate device 00:0b.
[ 2089.036000] usbdev1.2_ep00: PM: resume from 0, parent 1-2 still 2
[ 2089.036000] usbhid 1-2:1.0: PM: resume from 2, parent 1-2 still 2
[ 2089.036000] usbdev1.2_ep81: PM: resume from 0, parent 1-2:1.0 still 2
[ 2089.036000] usbdev1.2: PM: resume from 0, parent 1-2 still 2
[ 2089.108000] usb 1-2: USB disconnect, address 2
[ 2089.314000] usb 1-2: new low speed USB device using uhci_hcd and address 3
[ 2089.332000] pcmcia: registering new device pcmcia1.1
[ 2089.332000] pcmcia: request for exclusive IRQ could not be fulfilled.
[ 2089.332000] pcmcia: the driver needs updating to supported shared IRQ lines.
[ 2089.372000] 1.1: ttyS2 at I/O 0x3e8 (irq = 3) is a 16550A
[ 2089.374000] pcmcia: request for exclusive IRQ could not be fulfilled.
[ 2089.374000] pcmcia: the driver needs updating to supported shared IRQ lines.
[ 2089.417000] eth0: 3Com 3c589, io 0x300, irq 3, hw_addr 00:00:86:1A:4E:A8
[ 2089.417000] 8K FIFO split 5:3 Rx:Tx, auto xcvr
[ 2089.458000] usb 1-2: configuration #1 chosen from 1 choice
[ 2089.474000] input: HID 062a:0001 as /class/input/input17
[ 2089.474000] input: USB HID v1.10 Mouse [HID 062a:0001] on usb-0000:00:07.2-2
[ 2093.871000] 8139too Fast Ethernet driver 0.9.28
[ 2093.873000] ACPI: PCI Interrupt 0000:00:10.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
[ 2093.874000] eth0: RealTek RTL8139 at 0xe0a72800, 08:00:46:6e:93:a8, IRQ 10
[ 2093.874000] eth0: Identified 8139 chip type 'RTL-8139C'
[ 2095.392000] input: Power Button (FF) as /class/input/input18
[ 2095.393000] ACPI: Power Button (FF) [PWRF]
[ 2095.394000] input: Sleep Button (CM) as /class/input/input19
[ 2095.396000] ACPI: Sleep Button (CM) [SBTN]
[ 2095.397000] input: Lid Switch as /class/input/input20
[ 2095.398000] ACPI: Lid Switch [LID]
[ 2095.693000] ACPI: Thermal Zone [THRM] (62 C)
[ 2095.807000] ACPI: AC Adapter [ACAD] (on-line)
[ 2098.010000] ACPI: Battery Slot [BAT1] (battery present)
[ 2098.038000] ACPI: Battery Slot [BAT2] (battery absent)
[ 2102.654000] eth1: no IPv6 routers present
[ 2154.791000] pccard: card ejected from slot 0
[ 2174.376000] pccard: card ejected from slot 1
[ 2175.533000] ACPI: PCI interrupt for device 0000:00:10.0 disabled
[ 2178.997000] Suspending console(s)
[ 2179.010000] usbdev2.1: PM: suspend 0->2, parent usb2 already 2
[ 2179.010000] usbdev2.1_ep81: PM: suspend 0->2, parent 2-0:1.0 already 2
[ 2179.010000] hub 2-0:1.0: PM: suspend 2->2, parent usb2 already 2
[ 2179.010000] usbdev2.1_ep00: PM: suspend 0->2, parent usb2 already 2
[ 2180.469000] pnp: Device 00:08 disabled.
[ 2180.485000] ACPI: PCI interrupt for device 0000:00:07.5 disabled
[ 2180.498000] ACPI: PCI interrupt for device 0000:00:07.3 disabled
[ 2180.509000] ACPI: PCI interrupt for device 0000:00:07.2 disabled
[ 2180.531000] Back to C!
[ 2180.535000] Applying VIA southbridge workaround.
[ 2180.535000] PCI: Disabling Via external APIC routing
[ 2181.319000] PM: Writing back config space on device 0000:00:00.0 at offset 1 (was 2100006, writing 12100006)
[ 2181.319000] PM: Writing back config space on device 0000:00:01.0 at offset 9 (was fff0, writing 38003800)
[ 2181.319000] PCI: Setting latency timer of device 0000:00:01.0 to 64
[ 2181.330000] ACPI: PCI Interrupt 0000:00:07.2[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
[ 2181.330000] PCI: Setting latency timer of device 0000:00:07.2 to 64
[ 2181.330000] usb usb1: root hub lost power or was reset
[ 2181.356000] ACPI: PCI Interrupt 0000:00:07.3[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
[ 2181.356000] PCI: Setting latency timer of device 0000:00:07.3 to 64
[ 2181.356000] usb usb2: root hub lost power or was reset
[ 2182.038000] ACPI: PCI Interrupt 0000:00:07.5[C] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
[ 2182.038000] PCI: Setting latency timer of device 0000:00:07.5 to 64
[ 2182.676000] pccard: PCMCIA card inserted into slot 1
[ 2182.676000] pcmcia: registering new device pcmcia1.0
[ 2182.734000] pcmcia: request for exclusive IRQ could not be fulfilled.
[ 2182.734000] pcmcia: the driver needs updating to supported shared IRQ lines.
[ 2182.777000] eth0: 3Com 3c589, io 0x300, irq 3, hw_addr 00:00:86:1A:4E:A8
[ 2182.777000] 8K FIFO split 5:3 Rx:Tx, auto xcvr
[ 2182.777000] pcmcia: registering new device pcmcia1.1
[ 2182.777000] pcmcia: request for exclusive IRQ could not be fulfilled.
[ 2182.777000] pcmcia: the driver needs updating to supported shared IRQ lines.
[ 2182.818000] 1.1: ttyS2 at I/O 0x3e8 (irq = 3) is a 16550A
[ 2182.831000] PM: Writing back config space on device 0000:00:0e.0 at offset 3 (was 8, writing 4008)
[ 2182.831000] PM: Writing back config space on device 0000:00:0e.0 at offset 1 (was 2100012, writing 2100016)
[ 2182.882000] ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[9] MMIO=[e8004000-e80047ff] Max Packet=[2048] IR/IT contexts=[4/8]
[ 2182.886000] PM: Writing back config space on device 0000:00:10.0 at offset 5 (was 0, writing e8004800)
[ 2182.886000] PM: Writing back config space on device 0000:00:10.0 at offset 4 (was 1, writing 1801)
[ 2182.886000] PM: Writing back config space on device 0000:00:10.0 at offset 1 (was 2900000, writing 2900003)
[ 2182.888000] pnp: Device 00:08 activated.
[ 2182.888000] pnp: Failed to activate device 00:0a.
[ 2182.888000] pnp: Failed to activate device 00:0b.
[ 2183.798000] usb 1-2: USB disconnect, address 3
[ 2184.004000] usb 1-2: new low speed USB device using uhci_hcd and address 4
[ 2184.146000] usb 1-2: configuration #1 chosen from 1 choice
[ 2184.162000] input: HID 062a:0001 as /class/input/input21
[ 2184.162000] input: USB HID v1.10 Mouse [HID 062a:0001] on usb-0000:00:07.2-2
[ 2186.486000] 8139too Fast Ethernet driver 0.9.28
[ 2186.487000] ACPI: PCI Interrupt 0000:00:10.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
[ 2186.489000] eth0: RealTek RTL8139 at 0xe0a72800, 08:00:46:6e:93:a8, IRQ 10
[ 2186.489000] eth0: Identified 8139 chip type 'RTL-8139C'
[ 2188.033000] input: Power Button (FF) as /class/input/input22
[ 2188.034000] ACPI: Power Button (FF) [PWRF]
[ 2188.035000] input: Sleep Button (CM) as /class/input/input23
[ 2188.035000] ACPI: Sleep Button (CM) [SBTN]
[ 2188.036000] input: Lid Switch as /class/input/input24
[ 2188.037000] ACPI: Lid Switch [LID]
[ 2188.675000] ACPI: Thermal Zone [THRM] (57 C)
[ 2188.718000] ACPI: AC Adapter [ACAD] (on-line)
[ 2194.020000] eth1: no IPv6 routers present
[ 2200.209000] ACPI: Battery Slot [BAT1] (battery present)
[ 2200.213000] ACPI: Battery Slot [BAT2] (battery absent)
[ 2262.913000] pccard: card ejected from slot 1
[ 2263.924000] ACPI: PCI interrupt for device 0000:00:10.0 disabled
[ 2267.459000] Suspending console(s)
[ 2267.472000] usbdev2.1: PM: suspend 0->2, parent usb2 already 2
[ 2267.472000] usbdev2.1_ep81: PM: suspend 0->2, parent 2-0:1.0 already 2
[ 2267.472000] hub 2-0:1.0: PM: suspend 2->2, parent usb2 already 2
[ 2267.472000] usbdev2.1_ep00: PM: suspend 0->2, parent usb2 already 2
[ 2268.920000] pnp: Device 00:08 disabled.
[ 2268.936000] ACPI: PCI interrupt for device 0000:00:07.5 disabled
[ 2268.949000] ACPI: PCI interrupt for device 0000:00:07.3 disabled
[ 2268.960000] ACPI: PCI interrupt for device 0000:00:07.2 disabled
I recompiled with wireless, rebooted and it's all ok:
[ 364.711000] Back to C!
[ 364.712000] Applying VIA southbridge workaround.
[ 364.712000] PCI: Disabling Via external APIC routing
[ 364.741000] PM: Writing back config space on device 0000:00:00.0 at offset 1 (was 2100006, writing b2100006)
[ 364.741000] PM: Writing back config space on device 0000:00:01.0 at offset 9 (was fff0, writing 38003800)
[ 364.741000] PCI: Setting latency timer of device 0000:00:01.0 to 64
[ 364.754000] ACPI: PCI Interrupt 0000:00:07.2[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
[ 364.755000] PCI: Setting latency timer of device 0000:00:07.2 to 64
[ 364.755000] usb usb1: root hub lost power or was reset
[ 364.766000] ACPI: PCI Interrupt 0000:00:07.3[D] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
[ 364.766000] PCI: Setting latency timer of device 0000:00:07.3 to 64
[ 364.766000] usb usb2: root hub lost power or was reset
[ 364.803000] ACPI: PCI Interrupt 0000:00:07.5[C] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
[ 364.803000] PCI: Setting latency timer of device 0000:00:07.5 to 64
[ 365.761000] pccard: CardBus card inserted into slot 0
[ 365.819000] rtl8180: Configuring chip resources
[ 365.819000] PCI: Enabling device 0000:02:00.0 (0000 -> 0003)
[ 365.819000] ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKA] -> GSI 9 (level, low) -> IRQ 9
[ 365.819000] PCI: Setting latency timer of device 0000:02:00.0 to 64
[ 365.819000] rtl8180: Memory mapped space @ 0x34000000
[ 365.819000] rtl8180: MAC controller is a RTL8180 (v. F)
(rtl8180 deleted)
[ 367.007000] pccard: PCMCIA card inserted into slot 1
[ 367.007000] pcmcia: registering new device pcmcia1.0
[ 367.061000] pcmcia: request for exclusive IRQ could not be fulfilled.
[ 367.061000] pcmcia: the driver needs updating to supported shared IRQ lines.
[ 367.112000] eth0: 3Com 3c589, io 0x300, irq 3, hw_addr 00:00:86:1A:4E:A8
[ 367.112000] 8K FIFO split 5:3 Rx:Tx, auto xcvr
[ 367.112000] pcmcia: registering new device pcmcia1.1
[ 367.112000] pcmcia: request for exclusive IRQ could not be fulfilled.
[ 367.112000] pcmcia: the driver needs updating to supported shared IRQ lines.
[ 367.153000] 1.1: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
well, now the modem is S1. Not too much trouble, it's doing this since
immemorial time.
[ 367.165000] PM: Writing back config space on device 0000:00:0e.0 at offset 3 (was 8, writing 4008)
[ 367.165000] PM: Writing back config space on device 0000:00:0e.0 at offset 1 (was 2100012, writing 2100016)
[ 367.216000] ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[9] MMIO=[e8004000-e80047ff] Max Packet=[2048] IR/IT contexts=[4/8]
[ 367.222000] PM: Writing back config space on device 0000:00:10.0 at offset 5 (was 0, writing e8004800)
[ 367.222000] PM: Writing back config space on device 0000:00:10.0 at offset 4 (was 1, writing 1801)
[ 367.222000] PM: Writing back config space on device 0000:00:10.0 at offset 1 (was 2900000, writing 2900003)
[ 367.223000] pnp: Device 00:08 activated.
[ 367.223000] pnp: Failed to activate device 00:0a.
[ 367.223000] pnp: Failed to activate device 00:0b.
[ 368.041000] Associated successfully
[ 368.041000] Using B rates
[ 368.080000] usbdev1.2_ep00: PM: resume from 0, parent 1-2 still 2
[ 368.080000] usbhid 1-2:1.0: PM: resume from 2, parent 1-2 still 2
[ 368.080000] usbdev1.2_ep81: PM: resume from 0, parent 1-2:1.0 still 2
[ 368.080000] usbdev1.2: PM: resume from 0, parent 1-2 still 2
[ 368.151000] usb 1-2: USB disconnect, address 2
[ 368.357000] usb 1-2: new low speed USB device using uhci_hcd and address 3
[ 368.498000] usb 1-2: configuration #1 chosen from 1 choice
[ 368.515000] input: HID 062a:0001 as /class/input/input8
[ 368.515000] input: USB HID v1.10 Mouse [HID 062a:0001] on usb-0000:00:07.2-2
[ 369.826000] 8139too Fast Ethernet driver 0.9.28
[ 369.827000] ACPI: PCI Interrupt 0000:00:10.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
[ 369.828000] eth0: RealTek RTL8139 at 0xe0a98800, 08:00:46:6e:93:a8, IRQ 10
[ 369.828000] eth0: Identified 8139 chip type 'RTL-8139C'
[ 371.247000] input: Power Button (FF) as /class/input/input9
[ 371.297000] ACPI: Power Button (FF) [PWRF]
[ 371.359000] input: Sleep Button (CM) as /class/input/input10
[ 371.359000] ACPI: Sleep Button (CM) [SBTN]
[ 371.402000] input: Lid Switch as /class/input/input11
[ 371.403000] ACPI: Lid Switch [LID]
[ 371.607000] ACPI: Thermal Zone [THRM] (54 C)
[ 371.661000] ACPI: AC Adapter [ACAD] (on-line)
[ 372.010000] ACPI: Battery Slot [BAT1] (battery present)
[ 372.020000] ACPI: Battery Slot [BAT2] (battery absent)
--
Romano Giannetti --- [email protected]
Sorry for the following disclaimer, it's attached by our otugoing server
and I cannot shut it up.
--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribución, reproducción o uso de esta comunicación y/o de la información contenida en la misma están estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por favor, notifíquelo inmediatamente al remitente contestando a este mensaje y proceda a continuación a destruirlo. Gracias por su colaboración.
This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation.
On Tuesday, 29 May 2007 08:55, Kay Sievers wrote:
> On 5/25/07, Linus Torvalds <[email protected]> wrote:
> > On Fri, 25 May 2007, Pavel Machek wrote:
> > >
> > > 2) we need to preload firmware during _suspend_. I AM TELLING THAT TO
> > > PEOPLE FOR FIVE YEARS NOW.
> >
> > And people aren't listening. Have you thought about _why_?
> >
> > The thing is, it should just work. Even without pre-loading.
> >
> > > Imageine we killed freezer. Also imagine Romano has IDE card his
> > > PCMCIA slot. Kaboom, we solved nothing.
> >
> > Don't be silly. We solved it. The firmware has to be loadable from
> > somewhere else, since otherwise his IDE card wouldn't have been accessible
> > in the first place!
>
> The shiny userspace firmware loading causes problems since it exists,
> every second box has problems with it, in all sorts of situations. If
> people are still sold to the idea of userspace firmware loading, why
> don't we keep the data in the driver, instead of immediately
> discarding it after the first upload? Not to waste a few hundred
> kilobytes? That doesn't sound like a convincing deal, after all the
> years people try to work around the issues it causes.
Agreed.
Rafael
Rafael J. Wysocki wrote:
> On Tuesday, 29 May 2007 08:55, Kay Sievers wrote:
>> The shiny userspace firmware loading causes problems since it exists,
>> every second box has problems with it, in all sorts of situations. If
>> people are still sold to the idea of userspace firmware loading, why
>> don't we keep the data in the driver, instead of immediately
>> discarding it after the first upload? Not to waste a few hundred
>> kilobytes? That doesn't sound like a convincing deal, after all the
>> years people try to work around the issues it causes.
>
> Agreed.
>
> Rafael
Rather than most drivers being told to make this step, can this be added
to the firmware_class such that firmware objects are cached in RAM and
subsequent calls to request_firmware() don't have to query userspace.
This seems the least intrusive solution to this problem.
Thanks,
Michael-Luke
On Tuesday, 29 May 2007 14:00, Michael-Luke Jones wrote:
> Rafael J. Wysocki wrote:
> > On Tuesday, 29 May 2007 08:55, Kay Sievers wrote:
> >> The shiny userspace firmware loading causes problems since it exists,
> >> every second box has problems with it, in all sorts of situations. If
> >> people are still sold to the idea of userspace firmware loading, why
> >> don't we keep the data in the driver, instead of immediately
> >> discarding it after the first upload? Not to waste a few hundred
> >> kilobytes? That doesn't sound like a convincing deal, after all the
> >> years people try to work around the issues it causes.
> >
> > Agreed.
> >
> > Rafael
>
> Rather than most drivers being told to make this step, can this be added
> to the firmware_class such that firmware objects are cached in RAM and
> subsequent calls to request_firmware() don't have to query userspace.
>
> This seems the least intrusive solution to this problem.
Agreed again. :-)
Greetings,
Rafael
Hi!
> > I guess we should warn the driver authors, then; and decide what driver
> > authors should do.
>
> Drivers really shouldn't do anythign at all.
*)
> > If I'm video4linux driver for grabbing screen, have been suspended, and
> > someone asks me to read a frame, should I
> >
> > a) return -ESORRYIMSUSPENDED
> >
> > b) just block the caller
>
> The "subsystem" thing should have stopped the queues, and the device
> should never even _see_ this.
Okay, _if_ there's a subsystem, subsystem should have stopped the
queues. End result should be that userspace is blocked when trying to
access suspended device/suspended subsystem.
I guess we are in violent agreement.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Tue, 2007-05-29 at 13:00 +0100, Michael-Luke Jones wrote:
> Rafael J. Wysocki wrote:
> > On Tuesday, 29 May 2007 08:55, Kay Sievers wrote:
> >> The shiny userspace firmware loading causes problems since it exists,
> >> every second box has problems with it, in all sorts of situations. If
> >> people are still sold to the idea of userspace firmware loading, why
> >> don't we keep the data in the driver, instead of immediately
> >> discarding it after the first upload? Not to waste a few hundred
> >> kilobytes? That doesn't sound like a convincing deal, after all the
> >> years people try to work around the issues it causes.
> >
> > Agreed.
> >
> > Rafael
>
> Rather than most drivers being told to make this step, can this be added
> to the firmware_class such that firmware objects are cached in RAM and
> subsequent calls to request_firmware() don't have to query userspace.
>
> This seems the least intrusive solution to this problem.
Who is going to keep track of the data hiding in the firmware_class? On
driver unbind, module unload, you want to release the data.
Kay
Linus Torvalds wrote:
>
> On Fri, 25 May 2007, Nigel Cunningham wrote:
>> Does that mean you never ever power off your laptop (assuming you have
>> one), and the battery never runs out? Surely you must power it off
>> completely sometimes?
>
> So? The bootup isn't that much worse than a disk suspend/resume, and it's
> reliable.
I very much prefer suspend (to RAM) over hibernate (to DISK).
But once in a while, primarily when travelling, I'll use hibernate.
And the "swsusp" in the kernel is just plain crappy and slow,
which leads many people (including our beloved chief penguin, it seems)
into thinking that hibernate *has* to be too slow to be useful.
But with Suspend2, it is very quick and usable by comparism.
Try it, you'll like it (at least a little).
Cheers
Nigel Cunningham wrote:
>
> I'm sorry to say it, but dropping process freezing still seems to me
> like the better way though. I prefer it because of the reliability
> aspect. With the current code, having frozen processes, I can look at
> the state of memory, calculate how much I'll need for this or that and
> know that I'll have sufficient memory for the atomic copy and for doing
> the I/O (making assumptions about how much memory drivers will
> allocate) before I start to do either. If we stop freezing processes,
> that predictability will go away. There'll always be a possibility that
> some process will get memory hungry and stop me from being able to get
> the image on disk, and I'll have to either abort or give up and try
> again and again until I can complete writing the image, the battery runs
> out or whatever...
How about blocking brk() and mmap(MAP_ANONYMOUS) in addition to
the filesystem VFS callers? Or is that starting to get messy again?
Cheers
On Tue, 29 May 2007, Romano Giannetti wrote:
>
> - The good (?) news. I have made 7 suspend/resume cycle (to ram, I
> haven't tested hibernation) with a 2.6.21.2 with that patch, applied
> manually. The system did suspend and resume nicely even compiling a
> kernel and opening openoffice. Normally (le me stress _normally_) no
> delay was apparent on resume. I do not know how dangerous is this... :-)
>
> - The bad (?) news. One time out of 7 I had the 60 seconds delay.
Interesting. If you can re-create it, please do the sysrq-T thing again,
to see what's up. (Also, you might do "sysrq-p", which gives the current
process data, which sysrq-T does not).
Linus
Hi.
On Tue, 2007-05-29 at 10:19 -0400, Mark Lord wrote:
> Nigel Cunningham wrote:
> >
> > I'm sorry to say it, but dropping process freezing still seems to me
> > like the better way though. I prefer it because of the reliability
> > aspect. With the current code, having frozen processes, I can look at
> > the state of memory, calculate how much I'll need for this or that and
> > know that I'll have sufficient memory for the atomic copy and for doing
> > the I/O (making assumptions about how much memory drivers will
> > allocate) before I start to do either. If we stop freezing processes,
> > that predictability will go away. There'll always be a possibility that
> > some process will get memory hungry and stop me from being able to get
> > the image on disk, and I'll have to either abort or give up and try
> > again and again until I can complete writing the image, the battery runs
> > out or whatever...
>
> How about blocking brk() and mmap(MAP_ANONYMOUS) in addition to
> the filesystem VFS callers? Or is that starting to get messy again?
Yeah. Getting messy again :)
Nigel
On Wed, 30 May 2007, Nigel Cunningham wrote:
>
> On Tue, 2007-05-29 at 10:19 -0400, Mark Lord wrote:
> >
> > How about blocking brk() and mmap(MAP_ANONYMOUS) in addition to
> > the filesystem VFS callers? Or is that starting to get messy again?
>
> Yeah. Getting messy again :)
Indeed. And also misses the point - the point being that we don't actually
need to freeze anything at all most of the time. There's nothing wrong
with making memory allocations etc.
And yes, suspend is different from hibernate. I can see how hibernate
people are worried about people writing to things after doing the
snapshot, but those concerns don't exist with suspend. With suspend, the
biggest concern is accessing a device after it has been suspended, but on
the other hand, also the fact that we end up having driver writers used
to the system being "runnable", so they do things that really do require a
full-fledged system (and sometimes that means just some delayed action
using a kernel thread, other times it seems to rely on more complex
behaviour like firmware loading :^p )
Linus
Hi.
On Tue, 2007-05-29 at 14:33 -0700, Linus Torvalds wrote:
>
> On Wed, 30 May 2007, Nigel Cunningham wrote:
> >
> > On Tue, 2007-05-29 at 10:19 -0400, Mark Lord wrote:
> > >
> > > How about blocking brk() and mmap(MAP_ANONYMOUS) in addition to
> > > the filesystem VFS callers? Or is that starting to get messy again?
> >
> > Yeah. Getting messy again :)
>
> Indeed. And also misses the point - the point being that we don't actually
> need to freeze anything at all most of the time. There's nothing wrong
> with making memory allocations etc.
>
> And yes, suspend is different from hibernate. I can see how hibernate
> people are worried about people writing to things after doing the
> snapshot, but those concerns don't exist with suspend. With suspend, the
> biggest concern is accessing a device after it has been suspended, but on
> the other hand, also the fact that we end up having driver writers used
> to the system being "runnable", so they do things that really do require a
> full-fledged system (and sometimes that means just some delayed action
> using a kernel thread, other times it seems to rely on more complex
> behaviour like firmware loading :^p )
Yeah, but they can't. Even after the freezing of processes has been
removed from the normal suspend to ram path, we're still going to have
this issue with the suspend to ram after writing a hibernation image
path.
Regards,
Nigel
On Tue, 2007-05-29 at 07:55 -0700, Linus Torvalds wrote:
>
> On Tue, 29 May 2007, Romano Giannetti wrote:
> >
> > - The good (?) news. I have made 7 suspend/resume cycle (to ram, I
> > haven't tested hibernation) with a 2.6.21.2 with that patch, applied
> > manually. The system did suspend and resume nicely even compiling a
> > kernel and opening openoffice. Normally (le me stress _normally_) no
> > delay was apparent on resume. I do not know how dangerous is this... :-)
> >
> > - The bad (?) news. One time out of 7 I had the 60 seconds delay.
>
> Interesting. If you can re-create it, please do the sysrq-T thing again,
> to see what's up. (Also, you might do "sysrq-p", which gives the current
> process data, which sysrq-T does not).
I've got it, but I had a problem: I filled the dmesg buffer. I will try
to find where to enlarge it. I have posted the partial result to:
http://www.dea.icai.upcomillas.es/romano/linux/info/dmesg-resume-nofreeze.txt
in the hope that something can be used. I am running 2.6.21.2, with the
"no freeze kthreads at all" patch from Matthew Garrett, with this
add-on:
--- drivers/base/firmware_class.c.orig 2007-05-30 12:19:59.000000000 +0200
+++ drivers/base/firmware_class.c 2007-05-29 19:39:56.000000000 +0200
@@ -471,7 +471,11 @@
struct device *device)
{
int uevent = 1;
- return _request_firmware(firmware_p, name, device, uevent);
+ int rval;
+ printk(KERN_ERR "FW: requesting firmware (sync) for %s\n", name);
+ rval = _request_firmware(firmware_p, name, device, uevent);
+ printk(KERN_ERR "FW: return %d\n", rval);
+ return rval;
}
/**
@@ -545,7 +549,9 @@
struct task_struct *task;
struct firmware_work *fw_work = kmalloc(sizeof (struct firmware_work),
GFP_ATOMIC);
-
+
+ printk(KERN_ERR "FW: requesting firmware (async) for %s\n", name);
+
if (!fw_work)
return -ENOMEM;
if (!try_module_get(module)) {
@@ -569,8 +575,12 @@
fw_work->cont(NULL, fw_work->context);
module_put(fw_work->module);
kfree(fw_work);
+ printk(KERN_ERR "FW: failing return %d\n", PTR_ERR(task));
return PTR_ERR(task);
}
+
+ printk(KERN_ERR "FW: normal return\n");
+
return 0;
}
--
Romano Giannetti --- [email protected]
Sorry for the following disclaimer, it's attached by our otugoing server
and I cannot shut it up.
--
La presente comunicaci?n tiene car?cter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribuci?n, reproducci?n o uso de esta comunicaci?n y/o de la informaci?n contenida en la misma est?n estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicaci?n por error, por favor, notif?quelo inmediatamente al remitente contestando a este mensaje y proceda a continuaci?n a destruirlo. Gracias por su colaboraci?n.
This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation.
Hi!
> > > How about blocking brk() and mmap(MAP_ANONYMOUS) in addition to
> > > the filesystem VFS callers? Or is that starting to get messy again?
> >
> > Yeah. Getting messy again :)
>
> Indeed. And also misses the point - the point being that we don't actually
> need to freeze anything at all most of the time. There's nothing wrong
> with making memory allocations etc.
>
> And yes, suspend is different from hibernate. I can see how hibernate
> people are worried about people writing to things after doing the
> snapshot, but those concerns don't exist with suspend. With suspend, the
> biggest concern is accessing a device after it has been suspended, but on
> the other hand, also the fact that we end up having driver writers used
> to the system being "runnable", so they do things that really do require a
> full-fledged system (and sometimes that means just some delayed action
> using a kernel thread, other times it seems to rely on more complex
> behaviour like firmware loading :^p )
Notice that we want to be able to suspend while hibernating -- for
suspend to both behaviour. So drivers may _not_ rely on system being
runnable.
(Suspend to both is: write image to disk, then suspend to RAM. If you
do not run out of battery, resume is from RAM and fast, if you do, you
still can do resume from disk, not loosing your data).
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Wed, May 30, 2007 at 01:49:21PM +0200, Pavel Machek wrote:
(Trimmed the Cc:s quite heavily - I think this has gone somewhere beyond
the original point)
> Notice that we want to be able to suspend while hibernating -- for
> suspend to both behaviour. So drivers may _not_ rely on system being
> runnable.
So keep the driver layers read-only and unfreeze the processes after
doing the atomic copy.
--
Matthew Garrett | [email protected]
On Wed, 2007-05-30 at 13:40 +0100, Matthew Garrett wrote:
> On Wed, May 30, 2007 at 01:49:21PM +0200, Pavel Machek wrote:
>
> (Trimmed the Cc:s quite heavily - I think this has gone somewhere beyond
> the original point)
>
> > Notice that we want to be able to suspend while hibernating -- for
> > suspend to both behaviour. So drivers may _not_ rely on system being
> > runnable.
>
> So keep the driver layers read-only and unfreeze the processes after
> doing the atomic copy.
I know you probably won't care, but that's not an option for Suspend2 -
I get the possibility of a full image by overwriting LRU pages that were
saved prior to the atomic copy.
That aside, keeping the driver layers read-only sounds more complicated
than just freezing processes.
Regards,
Nigel
On Wed, May 30, 2007 at 11:17:47PM +1000, Nigel Cunningham wrote:
> That aside, keeping the driver layers read-only sounds more complicated
> than just freezing processes.
It's a problem that effectively has to be solved for STR anyway if
we're going to suspend without freezing. The midlayers need to be able
to block requests when the low-level devices are suspended, so we can
just re-use that code.
--
Matthew Garrett | [email protected]
On Wednesday, 30 May 2007 15:17, Nigel Cunningham wrote:
> On Wed, 2007-05-30 at 13:40 +0100, Matthew Garrett wrote:
> > On Wed, May 30, 2007 at 01:49:21PM +0200, Pavel Machek wrote:
> >
> > (Trimmed the Cc:s quite heavily - I think this has gone somewhere beyond
> > the original point)
> >
> > > Notice that we want to be able to suspend while hibernating -- for
> > > suspend to both behaviour. So drivers may _not_ rely on system being
> > > runnable.
> >
> > So keep the driver layers read-only and unfreeze the processes after
> > doing the atomic copy.
>
> I know you probably won't care, but that's not an option for Suspend2 -
> I get the possibility of a full image by overwriting LRU pages that were
> saved prior to the atomic copy.
This generally is a problem, not only for suspend2. :-)
Once you've unfrozen the user land, we can't rely on the hibernation image any
more, because some tasks may cause the on-disk filesystems' state to change.
Greetings,
Rafael
On Wednesday, 30 May 2007 15:29, Matthew Garrett wrote:
> On Wed, May 30, 2007 at 11:17:47PM +1000, Nigel Cunningham wrote:
>
> > That aside, keeping the driver layers read-only sounds more complicated
> > than just freezing processes.
>
> It's a problem that effectively has to be solved for STR anyway if
> we're going to suspend without freezing. The midlayers need to be able
> to block requests when the low-level devices are suspended,
Very true. And I think the right order should be to make the midlayers do
this and then remove the freezer from the STR code path, not the other way
around. :-)
> so we can just re-use that code.
Yes, that should be possible.
Greetings,
Rafael
On Wed, May 30, 2007 at 04:04:22PM +0200, Rafael J. Wysocki wrote:
> On Wednesday, 30 May 2007 15:17, Nigel Cunningham wrote:
> > On Wed, 2007-05-30 at 13:40 +0100, Matthew Garrett wrote:
> > > So keep the driver layers read-only and unfreeze the processes after
> > > doing the atomic copy.
> >
> > I know you probably won't care, but that's not an option for Suspend2 -
> > I get the possibility of a full image by overwriting LRU pages that were
> > saved prior to the atomic copy.
>
> This generally is a problem, not only for suspend2. :-)
>
> Once you've unfrozen the user land, we can't rely on the hibernation image any
> more, because some tasks may cause the on-disk filesystems' state to change.
Hence "keep the driver layers read-only" :)
--
Matthew Garrett | [email protected]
On Wed, 30 May 2007 12:26:57 +0200 Romano Giannetti wrote:
>
> On Tue, 2007-05-29 at 07:55 -0700, Linus Torvalds wrote:
> >
> > On Tue, 29 May 2007, Romano Giannetti wrote:
> > >
> > > - The good (?) news. I have made 7 suspend/resume cycle (to ram, I
> > > haven't tested hibernation) with a 2.6.21.2 with that patch, applied
> > > manually. The system did suspend and resume nicely even compiling a
> > > kernel and opening openoffice. Normally (le me stress _normally_) no
> > > delay was apparent on resume. I do not know how dangerous is this... :-)
> > >
> > > - The bad (?) news. One time out of 7 I had the 60 seconds delay.
> >
> > Interesting. If you can re-create it, please do the sysrq-T thing again,
> > to see what's up. (Also, you might do "sysrq-p", which gives the current
> > process data, which sysrq-T does not).
>
>
> I've got it, but I had a problem: I filled the dmesg buffer. I will try
> to find where to enlarge it. I have posted the partial result to:
use 'dmesg -s 100000' if it's just dmesg(8) that needs help.
If it's the kernel buffer filling up, you can rebuild the kernel
after changing CONFIG_LOG_BUF_SHIFT, but it's easier just to boot
using this:
log_buf_len=n Sets the size of the printk ring buffer, in bytes.
Format: { n | nk | nM }
n must be a power of two. The default size
is set in the kernel config file.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Hi!
> (Trimmed the Cc:s quite heavily - I think this has gone somewhere beyond
> the original point)
>
> > Notice that we want to be able to suspend while hibernating -- for
> > suspend to both behaviour. So drivers may _not_ rely on system being
> > runnable.
>
> So keep the driver layers read-only and unfreeze the processes after
> doing the atomic copy.
To read firmware you probably need to _write_ atimes.
Anyway, make-disks-read-only patch would be welcome. I just think it
is going to be more complex than freezer.
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Wed, 30 May 2007, Rafael J. Wysocki wrote:
>
> Very true. And I think the right order should be to make the midlayers do
> this and then remove the freezer from the STR code path, not the other way
> around. :-)
Yes. After all, STR simply shouldn't _care_.
The rule should be that in a well-written setup, STR "just works" whether
user processes are suspended or not. In other words, the whole freezing
part isn't about STR. It should be totally immaterial.
(Of course, that assumes that the freezing is _sane_, of course: ie the
core kernel threads shouldn't all be frozen. I think Rafael's patch to
turn the defaults around are a big step in the right direction).
Linus
Hi.
On Wed, 2007-05-30 at 16:04 +0200, Rafael J. Wysocki wrote:
> On Wednesday, 30 May 2007 15:17, Nigel Cunningham wrote:
> > On Wed, 2007-05-30 at 13:40 +0100, Matthew Garrett wrote:
> > > On Wed, May 30, 2007 at 01:49:21PM +0200, Pavel Machek wrote:
> > >
> > > (Trimmed the Cc:s quite heavily - I think this has gone somewhere beyond
> > > the original point)
> > >
> > > > Notice that we want to be able to suspend while hibernating -- for
> > > > suspend to both behaviour. So drivers may _not_ rely on system being
> > > > runnable.
> > >
> > > So keep the driver layers read-only and unfreeze the processes after
> > > doing the atomic copy.
> >
> > I know you probably won't care, but that's not an option for Suspend2 -
> > I get the possibility of a full image by overwriting LRU pages that were
> > saved prior to the atomic copy.
>
> This generally is a problem, not only for suspend2. :-)
>
> Once you've unfrozen the user land, we can't rely on the hibernation image any
> more, because some tasks may cause the on-disk filesystems' state to change.
True. I understood, perhaps wrongly, that when Matthew spoke of keeping
the drivers layers read-only, he was meaning stopping filesystem changes
by some other means.
Regards,
Nigel