Received: by 10.213.65.68 with SMTP id h4csp1112853imn; Sat, 24 Mar 2018 03:53:41 -0700 (PDT) X-Google-Smtp-Source: AG47ELvA73z4OQaum9zmd4KzhxIhekGpZ3O1mUEh9BK29wjdnuYjbfJ0SCbWJ0g5UDIFQR/ardFy X-Received: by 2002:a17:902:864a:: with SMTP id y10-v6mr29881518plt.45.1521888821905; Sat, 24 Mar 2018 03:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521888821; cv=none; d=google.com; s=arc-20160816; b=jwVYFOXHNITpOY2xQa/u0y4kuRCGkxD/OT/GH3Ii4OJCNBB0hSyAUtV12RBjWCnJIo 9v9oS/kj90tAnkdZscZ4/U79sRq33pJc/LIgDuum3Al0kPzKW7TjKgtBcKH1FAnNZkhs 0UlFPJqZkiHjha7e9fR48logwVLVi+PO5MtOuBf6+88xGiepkl22ijV3wtmEPeWelLXH jDe8ynurwde1FLClhAM4vPlEech4WO0NP/ut7RsTRbq7LGmtHfrwKAvXqVuJpqVFKkYz TcppXPcAgnsro2pa/65gZ89jClIkXIbMPFF/JToRapLRRkK4l1JRMAm87Ix05FMgrjJZ 1Q+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=O/pbeYZa4TK5vZwTqXMACePNaaW8JGgOY2FeWj0p+eg=; b=mLs5TXsS2GFBDK2aowN8FGGW/06PPuE4AeSNSjnXRTftCdsk5htNgKjf8O+Fl953hf ZeJNG0RZ8mhpk9VbNBDYtUPJ+BQv6RKEGiJCDnOZ9klHaAAfjN20IEa7mQTMRBWuw6v5 OrXehWcNTYzs2iDTuKZZZJmi0DJsUnzhiiknw+l6W/W7hVh6KPDoxyCGdD1aF9uskKwZ eFJEkhHYj8jY2b4gig1KGisyiy0e165B1z3Y8MlHcqFWc7jAgr7wZMVw68rkeUosNLLi /eDNy5pGw4Vi5/d0u+0Ch5q06P/kMQIOQBmUWl+HF95A+DJbQITTWW4NFtVYMY6ElREW FzXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si7340692pge.181.2018.03.24.03.52.55; Sat, 24 Mar 2018 03:53:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751915AbeCXKu2 (ORCPT + 99 others); Sat, 24 Mar 2018 06:50:28 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:42840 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751883AbeCXKu1 (ORCPT ); Sat, 24 Mar 2018 06:50:27 -0400 Received: from p4fea5f09.dip0.t-ipconnect.de ([79.234.95.9] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ezgki-0007Wh-5S; Sat, 24 Mar 2018 11:50:24 +0100 Date: Sat, 24 Mar 2018 11:50:23 +0100 (CET) From: Thomas Gleixner To: Ingo Molnar cc: Eric Dumazet , x86 , lkml , Eric Dumazet , "H. Peter Anvin" , Ingo Molnar , Borislav Petkov , Hugh Dickins , Peter Zijlstra Subject: Re: [PATCH v3 1/2] x86, msr: allow rdmsr_safe_on_cpu() to schedule In-Reply-To: <20180324080946.3db4xdkl5i6jx2rc@gmail.com> Message-ID: References: <20180323215818.127774-1-edumazet@google.com> <20180324080946.3db4xdkl5i6jx2rc@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 24 Mar 2018, Ingo Molnar wrote: > * Eric Dumazet wrote: > > > I noticed high latencies caused by a daemon periodically reading > > various MSR on all cpus. KASAN kernels would see ~10ms latencies > > simply reading one MSR. Even without KASAN, sending IPI to CPU > > in deep sleep state or blocking hard IRQ in a a long section, > > then waiting for the answer can consume hundreds of usec. > > > > Converts rdmsr_safe_on_cpu() to use a completion instead > > of busy polling. > > > > Overall daemon cpu usage was reduced by 35 %, > > and latencies caused by msr_read() disappeared. > > What "daemon" is this and why is it reading MSRs? Why? Just because it can ....