Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758269AbcC2Vh4 (ORCPT ); Tue, 29 Mar 2016 17:37:56 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:35338 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758138AbcC2Vhx (ORCPT ); Tue, 29 Mar 2016 17:37:53 -0400 MIME-Version: 1.0 From: Andy Lutomirski Date: Tue, 29 Mar 2016 14:37:32 -0700 Message-ID: Subject: Getting rid of inside_vm in intel8x0 To: Luis Rodriguez , Konstantin Ozerkov , Takashi Iwai , "linux-kernel@vger.kernel.org" , ALSA development Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1136 Lines: 29 Would it be possible to revert: commit 228cf79376f13b98f2e1ac10586311312757675c Author: Konstantin Ozerkov Date: Wed Oct 26 19:11:01 2011 +0400 ALSA: intel8x0: Improve performance in virtual environment Presumably one or more of the following is true: a) The inside_vm == true case is just an optimization and should apply unconditionally. b) The inside_vm == true case is incorrect and should be fixed or disabled. c) The inside_vm == true case is a special case that makes sense then IO is very very slow but doesn't make sense when IO is fast. If so, why not literally measure the time that the IO takes and switch over to the "inside VM" path when IO is slow? There are a pile of nonsensical "are we in a VM" checks of various sorts scattered throughout the kernel, they're all a mess to maintain (there are lots of kinds of VMs in the world, and Linux may not even know it's a guest), and, in most cases, it appears that the correct solution is to delete the checks. I just removed a nasty one in the x86_32 entry asm, and this one is written in C so it should be a piece of cake :) --Andy