Skip to contentSkip to conversation

Problems running latencytest: "error setting freq 1024"

DISCUSSION Frank Barknecht 5 participants 8 messages Mar 23, 2004 – Mar 24, 2004

lore
Share & tools
lore
#0 lore raw

Hallo,

I'd like to test my system's 2.6.4 latency using Takashi's
http://www.alsa-project.org/~iwai/latencytest-0.5.2.tar.gz
suite.

Building and installing so far went fine, I can run all the tests but no output is created. But I get a spurious error message which could be the reason for this. If I run "measure" by hand as it is called by "run_tests" like this:

$ measure -p ./out/x11.png -o ./out/x11.out -c 0 -f 1024 -n 2 -t 2
I get this error message: "error setting freq 1024"

This seems to have something to do with the rtc-clock, but I have no idea, what could be wrong here. Maybe it's something with my kernel config? It looks like this:

$ grep -i rtc /boot/config-2.6.4  
# CONFIG_HPET_EMULATE_RTC is not set
# CONFIG_APM_RTC_IS_GMT is not set
CONFIG_RTC=m
CONFIG_GEN_RTC=m
CONFIG_GEN_RTC_X=y
CONFIG_SND_RTCTIMER=m

Modules latency_test and rtc are loaded.

Any ideas?

ciao

Signature · 8 lines
 Frank Barknecht                               _ ______footils.org__


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
#1 lore raw
Quoted 2 lines
$ measure -p ./out/x11.png -o ./out/x11.out -c 0 -f 1024 -n 2 -t 2
I get this error message: "error setting freq 1024"

probably a permissions problem. try it as root.

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#2 lore raw

Hallo,

Quoted 4 lines · Paul Davis hat gesagt: // Paul Davis wrote:
Quoted 2 lines
$ measure -p ./out/x11.png -o ./out/x11.out -c 0 -f 1024 -n 2 -t 2
I get this error message: "error setting freq 1024"

probably a permissions problem. try it as root.

This is while runng at root. (Sorry for the "$" I typed that one by hand).

A tip from Tim Goetze to do:

 # echo 2048 > /proc/sys/dev/rtc/max-user-freq
(^ sic!)

didn't help either yet. I did a strace on the measure run now, which showed something equally strange (to my eyes):

mlockall(MCL_CURRENT|MCL_FUTURE)        = 0
sched_get_priority_max(0x1)             = 99
sched_setscheduler(0, 0x1, 0xbfffe254)  = 0
open("/dev/midi0", O_RDWR)              = 3
ioctl(3, 0x40047401, 0x400)             = -1 ENOTTY (Inappropriate ioctl for device)

write(2, "error setting freq 1024\n", 24) = 24
exit_group(1) = ?

I'm still puzzled. Why "/dev/midi0"?

ciao

Signature · 8 lines
 Frank Barknecht                               _ ______footils.org__


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
#3 lore raw
Quoted 21 lines
Quoted 4 lines
Quoted 2 lines
$ measure -p ./out/x11.png -o ./out/x11.out -c 0 -f 1024 -n 2 -t 2
I get this error message: "error setting freq 1024"

probably a permissions problem. try it as root.

This is while runng at root. (Sorry for the "$" I typed that one by hand).

A tip from Tim Goetze to do:

 # echo 2048 > /proc/sys/dev/rtc/max-user-freq
(^ sic!)

didn't help either yet. I did a strace on the measure run now, which showed something equally strange (to my eyes):

mlockall(MCL_CURRENT|MCL_FUTURE)        = 0
sched_get_priority_max(0x1)             = 99
sched_setscheduler(0, 0x1, 0xbfffe254)  = 0
open("/dev/midi0", O_RDWR)              = 3
ioctl(3, 0x40047401, 0x400)             = -1 ENOTTY (Inappropriate ioctl for device)
Quoted 4 lines

write(2, "error setting freq 1024\n", 24) = 24
exit_group(1) = ?

I'm still puzzled. Why "/dev/midi0"?

Takashi is apparently using that to communicate with the latency test kernel module (I think he mentions it in the README :-)

I have it running here with no problems, will post pointers to some results (2.6.4 + 2.6.5rc2 + bk2 + lsm + drm lowlat patches, w and w/o preempt).

-- Fernando

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#4 lore raw
In reply to Frank Barknecht

At Tue, 23 Mar 2004 22:42:05 +0100,

Quoted 20 lines · Frank Barknecht

Hallo,

Quoted 4 lines · Paul Davis hat gesagt: // Paul Davis wrote:
Quoted 2 lines
$ measure -p ./out/x11.png -o ./out/x11.out -c 0 -f 1024 -n 2 -t 2
I get this error message: "error setting freq 1024"

probably a permissions problem. try it as root.

This is while runng at root. (Sorry for the "$" I typed that one by hand).

A tip from Tim Goetze to do:

 # echo 2048 > /proc/sys/dev/rtc/max-user-freq
(^ sic!)

didn't help either yet. I did a strace on the measure run now, which showed something equally strange (to my eyes):

Quoted 7 lines
mlockall(MCL_CURRENT|MCL_FUTURE)        = 0
sched_get_priority_max(0x1)             = 99
sched_setscheduler(0, 0x1, 0xbfffe254)  = 0
open("/dev/midi0", O_RDWR)              = 3
ioctl(3, 0x40047401, 0x400)             = -1 ENOTTY (Inappropriate ioctl for device)

write(2, "error setting freq 1024\n", 24) = 24
exit_group(1) = ?

please make sure that you loaded latency-test module.

Quoted 1 line

I'm still puzzled. Why "/dev/midi0"?

that's because the latency-test kernel module requires a device file for ioctls. i chose it simply because the file is unused (it's for tclmidi).

BTW, i uploaded latencytest-0.5.3. it includes i/o workloads in parallel.

	http://www.alsa-project.org/~iwai/latencytest-0.5.3.tar.gz

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#5 lore raw

Hallo,

Quoted 11 lines · Takashi Iwai hat gesagt: // Takashi Iwai wrote:

At Tue, 23 Mar 2004 22:42:05 +0100,

Quoted 7 lines · Frank Barknecht
mlockall(MCL_CURRENT|MCL_FUTURE)        = 0
sched_get_priority_max(0x1)             = 99
sched_setscheduler(0, 0x1, 0xbfffe254)  = 0
open("/dev/midi0", O_RDWR)              = 3
ioctl(3, 0x40047401, 0x400)             = -1 ENOTTY (Inappropriate ioctl for device)

write(2, "error setting freq 1024\n", 24) = 24
exit_group(1) = ?

please make sure that you loaded latency-test module.

Yes, it is loaded.

Quoted 5 lines
Quoted 1 line

I'm still puzzled. Why "/dev/midi0"?

that's because the latency-test kernel module requires a device file for ioctls. i chose it simply because the file is unused (it's for tclmidi).

Maybe that is my problem. Here, /dev/midi is a link to /dev/midi0:

$ ls -l /dev/midi
lrwxrwxrwx    1 root     root           10 Jul 30  2003 /dev/midi -> /dev/midi0
$ ls -l /dev/midi0
crw-rw----    1 root     audio     14,   2 Jul 30  2003 /dev/midi0

I don't know why it is set up this way, but on another machine I can ssh to it looks different:

$ ls -l /dev/midi
lrwxrwxrwx    1 root     root            6 May 27  2003 /dev/midi ->
midi00
$ ls -l /dev/midi0
crw-rw-rw-    1 root     audio     35,   0 Mar 14  2003 /dev/midi0

Here I get the device number 35 for midi0, and another symlink.

Did I mess up big time?

ciao

Signature · 8 lines
 Frank Barknecht                               _ ______footils.org__


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
#6 lore raw
In reply to Frank Barknecht
Quoted 6 lines · Frank Barknecht

Hallo,

I'd like to test my system's 2.6.4 latency using Takashi's
http://www.alsa-project.org/~iwai/latencytest-0.5.2.tar.gz
suite.

Quoted 6 lines

Building and installing so far went fine, I can run all the tests but no output is created. But I get a spurious error message which could be the reason for this. If I run "measure" by hand as it is called by "run_tests" like this:

$ measure -p ./out/x11.png -o ./out/x11.out -c 0 -f 1024 -n 2 -t 2
I get this error message: "error setting freq 1024"

Frequency should be equal or greater than 5000Hz.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#7 lore raw
Quoted 4 lines · Jaroslav Kysela
Quoted 2 lines
$ measure -p ./out/x11.png -o ./out/x11.out -c 0 -f 1024 -n 2 -t 2
I get this error message: "error setting freq 1024"

Frequency should be equal or greater than 5000Hz.

Sorry, it appears to be the rtc frequency, of course. I was referring to the PCM rate.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click