Skip to contentSkip to conversation

speedfreq: epia + longhaul + speedfreq + copying large files = freeze

DISCUSSION Jeremy Fitzhardinge 3 participants 7 messages Dec 22, 2004 – Dec 23, 2004 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 3 lines · Sebastian

Dear Jeremy,

thanks for your tool! I like it best of all cpufreq daemons,

Thanks!

This problem sounds like a bug in the longhaul driver though, which I don't really know anything about. (The system should never crash, regardless of what speedfreqd does.)

I've cc:d the cpufreq list to see if someone there can help. Dave?

J

Quoted 36 lines

Anyway, the Epia board normally runs fine with speedfreq. Frequency gets adjusted between 400Mhz and 600MHz. But when I start cutting advertisements out of the DVB recordings with the VDR software (Video Disk Recorder from Klaus Schmiedinger, www.cadsoft.de/vdr) after a short while it freezes. The cutting process is simply like copying large files from one folder to another folder on the same partition. Mostly 1.7 to 2.7GB. I tried the following:

1. Cutting a recording, cpufreq enabled, speedfreq daemon running:

System freeze.

2. Copying large files manually, cpufreq enabled, speedfreq daemon running:

System freeze.

3. Cutting a recording, cpufreq enabled, speedfreq daemon disabled:

Works.

4. Copying large files manually, cpufreq enabled, speedfreq daemon disabled:

Works.

I'd like to add that sometimes I get messages in syslog telling me that speedfreq thought the actual frequency was xxx and discovered that the real frequency was something else. Once that was the last thing in syslog before a freeze. I don't know if this is relevant, because 99% of the freezes the syslog stays like it is, nothing gets added.

The kernel is a vanilla 2.6.9. The Linux Distribution is Gentoo stable. Flags are "-O2 -march=c3 -fomit-frame-pointer -mmmx -m3dnow -pipe". I have no 4k stacks, no preemption, no nptl, no perl ithreads.

Maybe speedfreq changing frequencies too fast for the little Epia is the reason for the freezes? What can I do?

#2 lore raw
Quoted 5 lines · Jeremy Fitzhardinge
Quoted 3 lines · Sebastian

Dear Jeremy,

thanks for your tool! I like it best of all cpufreq daemons,

Quoted 7 lines

Thanks!

This problem sounds like a bug in the longhaul driver though, which I don't really know anything about. (The system should never crash, regardless of what speedfreqd does.)

I've cc:d the cpufreq list to see if someone there can help. Dave?

Yeah, longhaul is badly broken right now, and tbh, I've no idea what on earth is wrong. Speed transitions happen, and work correctly. Then a few minutes later, system locks up.

I've been trying all sorts of things, from disabling PCI mastering, disabling CPU caches, etc, but nothing seems to help. I'm truly puzzled.

Dave

#3 lore raw
Quoted 6 lines · Dave Jones

Yeah, longhaul is badly broken right now, and tbh, I've no idea what on earth is wrong. Speed transitions happen, and work correctly. Then a few minutes later, system locks up.

I've been trying all sorts of things, from disabling PCI mastering, disabling CPU caches, etc, but nothing seems to help. I'm truly puzzled.

I remember old versions of the C3 used to forget to snoop DMA traffic while in the hlt instruction, so it wouldn't surprise me if there's some other bug like that related to longhaul.

Do you mean that it will crash some minutes after a single transition, or is it less deterministic than that? Do lots of transitions make it worse? Is the delay between transition and crash a random or approximately fixed length, and does it depend on either core or bus speed?

The reason I ask is that I have the ear of Via engineering support at the moment (we're using embedded C3's in a product at work), so I could ask a few well-placed questions.

J

#7 lore raw
In reply to Dave Jones
Quoted 14 lines · Dave Jones
Quoted 5 lines · Jeremy Fitzhardinge
Quoted 3 lines · Sebastian

Dear Jeremy,

thanks for your tool! I like it best of all cpufreq daemons,

Quoted 7 lines

Thanks!

This problem sounds like a bug in the longhaul driver though, which I don't really know anything about. (The system should never crash, regardless of what speedfreqd does.)

I've cc:d the cpufreq list to see if someone there can help. Dave?

Quoted 10 lines

Yeah, longhaul is badly broken right now, and tbh, I've no idea what on earth is wrong. Speed transitions happen, and work correctly. Then a few minutes later, system locks up.

I've been trying all sorts of things, from disabling PCI mastering, disabling CPU caches, etc, but nothing seems to help. I'm truly puzzled.

Dave

Dear Jeremy, dear Dave, dear list,

I tried to collect more information using cpufreq.debug={1,2,3,4}. But I don't see anything helpful in the output. Maybe you can find somehing, so I'm going to attach it anyway. Would it be interesting to see if a previous kernel version like 2.6.5 worked? I sure could install an earlier kernel if you like. Maybe this has not so much to do with the cpufreq-longhaul driver but with changes to the IO-section of the kernel? A few days ago I converted all partitions on the computer from reiserfs to xfs, but as you can see, this didn't change anything regarding the freezes :)

Regards

Sebastian

P.S.: I hope you don't mind me attaching the various output as a .bz-file. Unpacked it's ~24kB, bzipped only ~3kB.

Thanks

Sebastian

_______________________________________________
Cpufreq mailing list
[email protected]
http://www.linux.org.uk/mailman/listinfo/cpufreq

#4 lore raw
In reply to Jeremy Fitzhardinge
Quoted 6 lines · Jeremy Fitzhardinge
Quoted 2 lines

I've been trying all sorts of things, from disabling PCI mastering, disabling CPU caches, etc, but nothing seems to help. I'm truly puzzled.

I remember old versions of the C3 used to forget to snoop DMA traffic while in the hlt instruction, so it wouldn't surprise me if there's some other bug like that related to longhaul.

That's why I was hoping disablign mastering would do the trick.

Quoted 2 lines

Do you mean that it will crash some minutes after a single transition, or is it less deterministic than that?

Usually takes a few. I've noticed if I run cpuspeed, it steps it down from 1.2GHz to 500MHz through a half dozen or so steps. Whilst it does this, its stable. If I then kill cpuspeed, its stable.
But, if I leave cpuspeed run, and then do something CPU intensive, it tries to jump up to fullspeed quickly (through less steps than it took to scale down), when it does this, it hangs shortly afterwards.

We're not doing voltage scaling in longhaul yet, but that shouldn't matter, as we should be booting at max voltage (as we boot at max speed)

Quoted 3 lines

The reason I ask is that I have the ear of Via engineering support at the moment (we're using embedded C3's in a product at work), so I could ask a few well-placed questions.

I speak with the centaur folks regularly, but they haven't got any ideas what the problem could be either.

Dave

#5 lore raw
Quoted 6 lines · Dave Jones

Usually takes a few. I've noticed if I run cpuspeed, it steps it down from 1.2GHz to 500MHz through a half dozen or so steps. Whilst it does this, its stable. If I then kill cpuspeed, its stable.
But, if I leave cpuspeed run, and then do something CPU intensive, it tries to jump up to fullspeed quickly (through less steps than it took to scale down), when it does this, it hangs shortly afterwards.

Sebastian is reporting the problem with speedfreqd, which will use the same number of steps both ways (and, depending on the CPU load curve, at the same rate).

Does rate-limiting the transitions help stability?

Quoted 2 lines

We're not doing voltage scaling in longhaul yet, but that shouldn't matter, as we should be booting at max voltage (as we boot at max speed)

Is voltage switching complex? It might be worth trying - its not something which normally improves stability, but maybe there's some regulator issue under load changes, or something...

J

#6 lore raw
Quoted 5 lines · Jeremy Fitzhardinge

Sebastian is reporting the problem with speedfreqd, which will use the same number of steps both ways (and, depending on the CPU load curve, at the same rate).

Does rate-limiting the transitions help stability?

that's something worth trying maybe.

Quoted 6 lines
Quoted 2 lines

We're not doing voltage scaling in longhaul yet, but that shouldn't matter, as we should be booting at max voltage (as we boot at max speed)

Is voltage switching complex? It might be worth trying - its not something which normally improves stability, but maybe there's some regulator issue under load changes, or something...

With longhaul, its a little more complicated than it is with powernow, as theres no bios table telling us which voltage should be used for each frequency, and they vary depending on stepping & speed of the part. The first version of the longhaul driver did actually do voltage scaling, but the 'match the voltage to the speed' code was very crude, and assumed that the voltage table was 1:1 with the frequency, which worked for the most part, but was far from being 'the right thing'.

I'm not convinced that adding it back in would fix the stability problems. If anything, it would add another variable.

Dave