android_kernel_google_msm/sound
Konstantin Ozerkov 228cf79376 ALSA: intel8x0: Improve performance in virtual environment
v3: detection code is x86 and KVM specific, hide it under ifdef
v2: add detection for virtual environments (KVM and Parallels)

This patch is intended to improve performance in virtualized environments
like Parallels Desktop or KVM/VirtualBox/QEMU (virtual ICH/AC97 audio).

I/O access is very time-expensive operation in virtual world: VCPU
can be rescheduled and in the worst case we get more than 10ms delay on
each I/O access.

In the virtual environment loop exit rule
(old_civ == current_civ && old_picb == current_picb) is never satisfied,
because old_picb is never the same as current_picb due to delay inspired
by reading current_civ. As a result loop ended by timeout and we get 10x
more I/O operations.

Experimental data from Prallels Desktop 7, RHEL6 guest (I/O ops per
second):

Original code:
In Port    Counter         Callback
   f014      41550         fffff00000179d00 ac97_bm_read_civ+0x000
   f018      41387         fffff0000017a580 ac97_bm_read_picb+0x000

With patch:
In Port    Counter         Callback
   f014       4090         fffff00000179d00 ac97_bm_read_civ+0x000
   f018       1964         fffff0000017a580 ac97_bm_read_picb+0x000

Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-31 10:03:28 +01:00
..
aoa Merge branch 'fix/misc' into topic/misc 2011-09-16 08:29:04 +02:00
arm sound: irq: Remove IRQF_DISABLED 2011-09-22 11:19:20 +02:00
atmel Merge branch 'master' into for-next 2011-07-11 14:15:55 +02:00
core ALSA: hwdep: silence integer overflow warning 2011-10-31 09:52:43 +01:00
drivers Merge branch 'topic/remove-irqf_disable' into for-linus 2011-10-26 23:51:48 +02:00
firewire ALSA: firewire-speakers: fix locking 2011-10-04 07:16:31 +02:00
i2c [media] tea575x: remove useless input ioctls 2011-07-27 17:53:08 -03:00
isa sound: irq: Remove IRQF_DISABLED 2011-09-22 11:19:20 +02:00
mips sound: irq: Remove IRQF_DISABLED 2011-09-22 11:19:20 +02:00
oss sound: oss: use strlcpy() in sound_timer_init() 2011-09-29 08:12:33 +02:00
parisc
pci ALSA: intel8x0: Improve performance in virtual environment 2011-10-31 10:03:28 +01:00
pcmcia ALSA: pcmcia - Use pcmcia_request_irq() 2011-07-08 10:11:35 +02:00
ppc sound: irq: Remove IRQF_DISABLED 2011-09-22 11:19:20 +02:00
sh
soc Merge branch 'topic/asoc' into for-linus 2011-10-27 10:43:40 +02:00
sparc sound: irq: Remove IRQF_DISABLED 2011-09-22 11:19:20 +02:00
spi ALSA: atmel - update author email for ABDAC, AC97C and AT73C213 2011-06-28 16:56:07 +02:00
synth
usb Merge branch 'topic/misc' into for-linus 2011-10-26 23:51:43 +02:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c
sound_firmware.c