Received: by 10.213.65.68 with SMTP id h4csp1029527imn; Sat, 24 Mar 2018 01:11:56 -0700 (PDT) X-Google-Smtp-Source: AG47ELuIWTRTa8bWF+2cn/A9Aw41gF7yPJbT6vI1pG6YVRCw2yfTwsu3aYxgOBL22kTKwRKV2RSD X-Received: by 10.98.174.6 with SMTP id q6mr3494441pff.140.1521879116879; Sat, 24 Mar 2018 01:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521879116; cv=none; d=google.com; s=arc-20160816; b=P8GmJ3G7b7QAfLN3oxIiiRNnE/cqYa77sqs16sdyWnof4XOcOt/enJMVnhDBSxRxgs X3JF4xEnHAX3wKiVVsoQUZYgW4kdY1792b4YyEMoRFzmGRlN2vxLSMtaOGbaOXlAw+9D l3iuxcOvbWmkz19NIeE2FNd0luU4JvHLyG+i1i53V1tTgAONOupciR/IOjk/KsSLyqIN rMv2tG6ebIDmSQF+uz7IXQ7iSRAE/an6pgiMTzMdLuJB81am4WUNVME2odTYRIAPQonH GQj/1qLLHTv4LRyAtza1JqLoxTYntMsk4kHIN09ArfoS2CyIEN8tzGk4jrMsOGGx9uax rGOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=HKMRWwEFsY+3jXQARpldEWO3GBWUfDxBnXXs0qpfhNM=; b=jymhEI6c1Wyp+QbBw8p7NqMD/gmEF1kt/5rsXQakp/joCjK4UjZBbpU21sR23ORzhA nYurLh8HgSyhdDU/AyOGq21lDE7EpAUXTKRGe4rOkYdffPlkfm0Sx8yRcgfDoYqjeV/d Udev3CLpzCKOmHgUK9cb1oJqsPEM9o315oa8GgQsMZmJXfk8C8RF5WtI7CLJ/RwNrkTF lF5K+CwKCfvjIIP49wQ7R0IrLs2gLSZiEQ64THSWJ8QoXjGCrbdJj9/0/6/OD//GBm9D rroRYB2BRlDv6YGNlfvUJ97yhlbvJOHZoA6NnAwb0hWtkIac8odlAnh6mN/VYI21CfD8 lhbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=JD/m7kiC; 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 x27si7157879pgc.4.2018.03.24.01.11.28; Sat, 24 Mar 2018 01:11:56 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=JD/m7kiC; 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 S1751699AbeCXIJx (ORCPT + 99 others); Sat, 24 Mar 2018 04:09:53 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:41661 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750797AbeCXIJu (ORCPT ); Sat, 24 Mar 2018 04:09:50 -0400 Received: by mail-wr0-f176.google.com with SMTP id f14so14180561wre.8 for ; Sat, 24 Mar 2018 01:09:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HKMRWwEFsY+3jXQARpldEWO3GBWUfDxBnXXs0qpfhNM=; b=JD/m7kiCuNM4iHQ7hlNt52bEiyqZRsGeoZ9vdpcG9+/c/fkHAkji23PLfwEcTz0hca 4ZW5orRge5VdIoZEt5BunPkmcXm4WM3FE55RzDy3bXGgaOyZFNARttbKz9gM/DULwuom dZ4iGfzAbw0Kow17QHlwhYKwgz0Ee0ImoAe6YpmK+MkWt8Wr3KOevuRrzLI5eAoyfTW2 NhQXIeXxV18vdJCyHdxoDGIzt/RVa17j/seyFe/NJrJak3nklVVKsU3WseFQ0NMmFNVB YblEcvX1VQAcpJXGbL4EI+Q2eEc06+3PHj06yLdZq64cwjbLM89Yd6PsLzm6tIsM2Nu9 /tOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=HKMRWwEFsY+3jXQARpldEWO3GBWUfDxBnXXs0qpfhNM=; b=KSdDyg26eWuHeUQOdbgpl06tlmDgIj6zPN6bGAEBlxvzeac/cHvsR9iWj2NqDyyNjq GclLe6cmmWfaAEeNkii6W82tvXmVLIpvBiCiOFYLo60Lci3zH32dJXdx9Mj/wkh6EZnL RgikVVf80+1BVQgKrEOZiG0qxYHvEW15lLlkBa5VZ9klge8HxOohgDEa/avbrckZ0ZDl Kb/UetF/2rW9CFjmmYF6C3A4Hh1ccJih3cNq+liU/V2KYxdb3QUgA74qIeJ5aLyG/oSw Rjp5gud55qGQNvvF8/EBcbdVjSMrE0hlSIMnUzb0PPHAeKrltsWibn8vcgwCwyz7l8dS jdtQ== X-Gm-Message-State: AElRT7Gi+KjjHpHH0UFIr6vXFqXdMy9dYA0Q4bZWS/ea7qrk5Osajgzi KSw0R+xlavWIGx6GYK7HhnjsDg== X-Received: by 10.223.171.213 with SMTP id s79mr5522123wrc.52.1521878988956; Sat, 24 Mar 2018 01:09:48 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id m129sm9785029wma.44.2018.03.24.01.09.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Mar 2018 01:09:48 -0700 (PDT) Date: Sat, 24 Mar 2018 09:09:46 +0100 From: Ingo Molnar To: Eric Dumazet Cc: x86 , lkml , Eric Dumazet , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Hugh Dickins , Peter Zijlstra Subject: Re: [PATCH v3 1/2] x86, msr: allow rdmsr_safe_on_cpu() to schedule Message-ID: <20180324080946.3db4xdkl5i6jx2rc@gmail.com> References: <20180323215818.127774-1-edumazet@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180323215818.127774-1-edumazet@google.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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? Thanks, Ingo