How how latent should non-preemptive scheduling be?
Hi,
I have an EeePC 900 (Intel Celeron 900Mhz) and it seems to be skipping while playing sound through various desktop apps with a 2.6.27rc6 kernel. It is running off an SD card which really shows up slow writes but the sound is seemingly skipping even when ext3 is not being used. When look at latencytop I often see results similar to this:
Quoted 34 lines
Cause Maximum Percentage
Scheduler: waiting for cpu 247.2 msec 64.6 %futex_wait do_futex sys_futex sysenter_do_call 5.0 msec 24.8 % do_select core_sys_select sys_select sysenter_do_c 4.7 msec 0.7 % do_sys_poll sys_poll sysenter_do_call 4.5 msec 5.6 % do_sys_poll sys_ppoll sysenter_do_call 4.2 msec 1.7 % rt_mutex_timed_lock futex_lock_pi do_futex sys_fut 3.5 msec 0.5 % msleep acpi_ec_wait acpi_ec_transaction acpi_ec_re 1.9 msec 1.3 % msleep acpi_ec_wait acpi_ec_transaction acpi_ec_bu 1.9 msec 0.4 % msleep acpi_ec_wait acpi_ec_transaction acpi_ec_bu 1.9 msec 0.5 %on
acpi_ex_field_datum_ioacpi_ex_extract_from_fieldacpi_ex_read_data_from_fieldacpi_ex_resolve_node_to_valueacpi_ex_resolve_to_valueProcess rhythmbox (5694) Total: 358.4 msec Scheduler: waiting for cpu 221.8 msec 69.9 %
futex_wait do_futex sys_futex sysenter_do_call 4.5 msec 26.3 % do_sys_poll sys_poll sysenter_do_call 3.8 msec 3.2 % do_select core_sys_select sys_select sysenter_do_c 1.0 msec 0.4 % rt_mutex_timed_lock futex_lock_pi do_futex sys_fut 0.2 msec 0.1 %Cause Maximum Percentage
Scheduler: waiting for cpu 234.8 msec 31.1 % futex_wait do_futex sys_futex sysenter_do_call 5.0 msec 34.4 % do_select core_sys_select sys_select sysenter_do_c 5.0 msec 10.3 % do_sys_poll sys_ppoll sysenter_do_call 5.0 msec 6.2 % do_sys_poll sys_poll sysenter_do_call 5.0 msec 16.4 % msleep acpi_ec_wait acpi_ec_transaction acpi_ec_re 1.9 msec 0.9 % msleep acpi_ec_wait acpi_ec_transaction acpi_ec_bu 1.9 msec 0.3 % msleep acpi_ec_wait acpi_ec_transaction acpi_ec_bu 1.9 msec 0.3 % blk_execute_rq scsi_execute scsi_execute_req scsi_ 1.0 msec 0.0 %
Quoted 4 lines
Process firefox-bin (5756) Total: 482.2 msec Scheduler: waiting for cpu 234.8 msec 95.5 %
do_sys_poll sys_poll sysenter_do_call 4.1 msec 3.5 % futex_wait do_futex sys_futex sysenter_do_call 3.9 msec 1.0 % do_select core_sys_select sys_select sysenter_do_c 0.2 msec 0.0 %
top seems to show that there is CPU time still available. The kernel is compiled with voluntary preemption, dynticks and a HZ of 1000.
Is the scheduler waiting for CPU anything to do with the skips? If so what sort of maximum should I be expecting? If you are listing to music is it expected that you have preemption on? Would preemption even help?
Quoted 1 line · Sitsofe Wheeler
I have an EeePC 900 (Intel Celeron 900Mhz) and it seems to be skipping while playing sound through various desktop apps with a 2.6.27rc6 kernel. It is running off an SD card which really shows up slow writes but the sound is seemingly skipping even when ext3 is not being used. When look at latencytop I often see results similar to this:
One other small datapoint. When the skipping starts to occur regularly it seems to be exactly 30 seconds apart. ALSA doesn't report any xruns either...
Quoted 15 lines · On Wed, 17 Sep 2008 22:18:18 +0100 Sitsofe Wheeler <[email protected]> wrote:
Hi,
I have an EeePC 900 (Intel Celeron 900Mhz) and it seems to be skipping while playing sound through various desktop apps with a 2.6.27rc6 kernel. It is running off an SD card which really shows up slow writes but the sound is seemingly skipping even when ext3 is not being used. When look at latencytop I often see results similar to this:
Quoted 6 lines
Cause Maximum
Percentage Scheduler: waiting for cpu 247.2
msec 64.6 %futex_waitdo_futexsys_futexsysenter_do_call5.0 msec 24.8 %do_selectcore_sys_selectsys_selectsysenter_do_c4.7 msec 0.7 %do_sys_pollsys_pollsysenter_do_call4.5
this says you haven't done "make install" on the latencytop directory so it's not translating things for you.. can you do that please?
Quoted 6 lines · Sitsofe Wheeler
Hi,
I have an EeePC 900 (Intel Celeron 900Mhz) and it seems to be skipping while playing sound through various desktop apps with a 2.6.27rc6 kernel. It is running off an SD card which really shows up slow writes but the sound is seemingly skipping even when ext3 is not being used.
[snip snip]
If you use ALSA you could write a custom .asoundrc file and increase ALSA's default buffer size, this gives the hardware a longer buffer to play which may work around the problem. This used to do the trick for me with the old scheduler with slow machines. Not a fix but if nothing else works...
Matt
Quoted 5 lines · Matt Keenan
If you use ALSA you could write a custom .asoundrc file and increase ALSA's default buffer size, this gives the hardware a longer buffer to play which may work around the problem. This used to do the trick for me with the old scheduler with slow machines. Not a fix but if nothing else works...
In all fairness turning on preemption also helps (I don't hear any drops or see any stalls once it's on) but I'm trying to work out if this is an underlying problem that can be fixed (and then there is the case of the default desktop distros).
Signature · 1 line
Sitsofe | http://sucs.org/~sits/