From: Konstantin Ozerkov Date: Wed, 26 Oct 2011 15:11:01 +0000 (+0400) Subject: ALSA: intel8x0: Improve performance in virtual environment X-Git-Tag: v3.2-rc1~65^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=228cf79376f13b98f2e1ac10586311312757675c;p=pandora-kernel.git 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 Signed-off-by: Denis V. Lunev Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed