Skip to contentSkip to conversation

Tracing over a suspend/resume cycle

DISCUSSION Bruno Prémont 1 participant 1 message Jun 7, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello,

Attached is a tarball with script and log of such a suspend cycle.

The tarball contains:
- config: kernel config
- dmesg.log: kernel log
- mmiotrace.sh script used
(/sbin/tinyinit is a shell script that runs a few things to mount virtual filesystems like proc, sys, tmp; pupulate /dev; run sshd; start netconsole; root partition remains RO)
- mmiotrace.log is output of mmiotrace.sh
(note, I inserted the comment regarding "rmmod nvidia" for the sequence as to when I did it)
- trace.log is what came out of /sys/kernel/debug/tracing/trace_pipe

System details:
00:00.0 Host bridge [0600]: nVidia Corporation nForce CPU bridge [10de:01a4] (rev b2)
00:00.1 RAM memory [0500]: nVidia Corporation nForce 220/420 Memory Controller [10de:01ac] (rev b2) 00:00.2 RAM memory [0500]: nVidia Corporation nForce 220/420 Memory Controller [10de:01ad] (rev b2) 00:00.3 RAM memory [0500]: nVidia Corporation nForce 420 Memory Controller (DDR) [10de:01ab] (rev b2) 00:01.0 ISA bridge [0601]: nVidia Corporation nForce ISA Bridge [10de:01b2] (rev c3)
00:01.1 SMBus [0c05]: nVidia Corporation nForce PCI System Management [10de:01b4] (rev c1)
00:02.0 USB Controller [0c03]: nVidia Corporation nForce USB Controller [10de:01c2] (rev c3)
00:03.0 USB Controller [0c03]: nVidia Corporation nForce USB Controller [10de:01c2] (rev c3)
00:04.0 Ethernet controller [0200]: nVidia Corporation nForce Ethernet Controller [10de:01c3] (rev c2) 00:05.0 Multimedia audio controller [0401]: nVidia Corporation nForce Audio Processing Unit [10de:01b0] (rev c2) 00:06.0 Multimedia audio controller [0401]: nVidia Corporation nForce AC'97 Audio Controller [10de:01b1] (rev c2) 00:08.0 PCI bridge [0604]: nVidia Corporation nForce PCI-to-PCI bridge [10de:01b8] (rev c2)
00:09.0 IDE interface [0101]: nVidia Corporation nForce IDE [10de:01bc] (rev c3)
00:1e.0 PCI bridge [0604]: nVidia Corporation nForce AGP to PCI Bridge [10de:01b7] (rev b2)
01:04.0 RAID bus controller [0104]: HighPoint Technologies, Inc. HPT374 [1103:0008] (rev 07)
01:04.1 RAID bus controller [0104]: HighPoint Technologies, Inc. HPT374 [1103:0008] (rev 07)
02:00.0 VGA compatible controller [0300]: nVidia Corporation NVCrush11 [GeForce2 MX Integrated Graphics] [10de:01a0] (rev b1)

Kernel used:
Nearly vanilla (just one patch of mine for pata_hpt37x so it does most init operations during resume - I will post that patch later on).

Distribution is Gentoo

Bruno

Quoted 37 lines · On Sun, 07 June 2009 Pekka Paalanen <[email protected]> wrote:

Hello,

a long time ago I had reports, that mmiotracing over a suspend/resume cycle worked fine. Perhaps by accident, but there were successful runs.

Right now, it does not work for the user "bonbons". Nothing after resume gets to the log, even though 'cat .../trace_pipe' is still running. Kernel log shows that mmiotrace is still noticing ioremaps and iounmaps, but either they don't get into the ring buffer, or the ring buffer is somehow disabled. The mmiotrace session is practically dead. Switching to the "nop" tracer and then back to "mmiotrace" makes things work again.

If you need further information about this case, I hope bonbons can provide that. And also correct me if I got something wrong. His kernel version is 2.6.30-rc7-git4 and suspending here means
echo mem > /sys/power/state

Steven, you probably know the tracing and ring buffer framework very well. Are there any known issues with tracing over a suspend/resume cycle? Is it suspend/resume aware at all? Should it be to make this work?

A traced driver may do a lot of things while processing suspend and resume events, but here mmiotrace does not say it's losing events.

Now that I think of it, it sounds like a very difficult problem to make tracing over suspend reliable. The user space should be kept running, so that the ring buffer may drain, and at the same time the drivers should be doing their suspending. Is this even possible by other means than pure luck (of not running out of free ring buffer space)?

Tracing over a suspend/resume cycle is useful for e.g. spying on nvidia how they suspend their GPU.