Received: by 10.213.65.68 with SMTP id h4csp723034imn; Fri, 23 Mar 2018 14:32:08 -0700 (PDT) X-Google-Smtp-Source: AG47ELs0L/xrZVGSeEV3mEHDFdsv1V5UlnxkmRi34DxvRu4PsBlZLOAe/Jqhal+p0jMIz2i30Y2S X-Received: by 2002:a17:902:42a3:: with SMTP id h32-v6mr30261082pld.231.1521840728678; Fri, 23 Mar 2018 14:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521840728; cv=none; d=google.com; s=arc-20160816; b=qvYvOcMVl/8vpQyGcxfEwdv6UQAZyo/3bFJ/9IY4d62CQaDpsryo6O6mQgMsfDs5n6 jep31VZD2xWjSbLSjJaEB1jcV8yfnOzzJ/MSfeXeNTshj8P94W5NMzx0ofbXXPHfBxjh 93oOWkraC1WBTMgdzTsTjYxY6iX6FK+Q4t0Sz8dn4tqbfgSwijhh58WVM4dvu3nyCBYn 9k2MONVIVbkxKf+VcCLd0mJLftP/L+PyXnpsFaM2lKZSBbQ3Nb6c9XSHuJ1utXjjQMVp uA2lumxxxuWF+/btBDZ6fVie+1RRZ9EPfNi78n/vqw3a34nNEPrd7GUdhYVm5F3gL/at JF9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=SdfHr/V04lK0DeMwoWxSQWEzOVz/Ofg+e6wuNNejL4E=; b=WUZZiDm3PCQLCBBGirYZQRNk/u3miUK0FnPZZs1owSkkK2Aztx1Bq2Zgd3qVIAdrch 5meKbSk3079AwmmeFyhcEHezKGF1UVY67JHoqVm6DgKfXJdKkRj3lUmgbZjwHxCinaVQ qt9X17lmVrgvC/0kqWfW6g5CaiPsdbwcQBM6YuNpf+IEhhb7f05cJbYQYmm3cEXICLsx 4hEN4d4AY6CUv8Dw1+GbgHeDGYicYc1+xOLroC7Kv6bA8+SAJRwCKMNT7Nb6ObSm/Ykp 2h1egTZCNko4N+RlGBqb23fxY7iwHg/7Ptqxgu9rySXec2xQIY/YcFCTnZJgHod6CGJh 2GpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bqsPiBPR; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r16si6442171pgq.324.2018.03.23.14.31.54; Fri, 23 Mar 2018 14:32:08 -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=pass header.i=@gmail.com header.s=20161025 header.b=bqsPiBPR; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752328AbeCWVbC (ORCPT + 99 others); Fri, 23 Mar 2018 17:31:02 -0400 Received: from mail-pl0-f54.google.com ([209.85.160.54]:33143 "EHLO mail-pl0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbeCWVbA (ORCPT ); Fri, 23 Mar 2018 17:31:00 -0400 Received: by mail-pl0-f54.google.com with SMTP id c11-v6so8205238plo.0 for ; Fri, 23 Mar 2018 14:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=SdfHr/V04lK0DeMwoWxSQWEzOVz/Ofg+e6wuNNejL4E=; b=bqsPiBPRejxX8F4+HPpPvFKqOEDJw0cP4uYxHwD3YPeoybBQa9uYPmqgTqXnRYDWSr r7x5RKWSAYsMslYtnV9ze0XbSs2o2FstyC3THg2voiQO34RIsKCEBGypXKWLTjsTH1MR a5hwBPNCRCqWDj4nwyZ+wuXVb7k/y/Mi/XtGal2Pj81mVc0pFTcMvMIPGmyVppnv6tWS /1l//7sFWHdpJwnA90hJFDtWspIJ2hgIo1Pu0NdImmnuEvfSmacAkptb6SSNbn5Pwwdt 31J+dP0+3fofWH4Xr875M7k5t/23wdOG3rF6l8yoPmoXuGdpkO9En4g4xMJ+XjgwOSwQ AWgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SdfHr/V04lK0DeMwoWxSQWEzOVz/Ofg+e6wuNNejL4E=; b=aNPL2U3HL9/ISt9nClnEWuWEsHhMl/v3pLRugPuXy/342makO4btgyf45n+znU2pkF xEfnrH7tuT4ZIwS8Ez75LnBjlLNHOiJBNkmsCOtNEREqoZmSywc34TUSLFijZEgF6V+X P+AdifaMrMTndkc7MBqx9kWnWgJjemvXYNDByW/NS3JI0/2ZbOJZqH7Jf9Rdo/Jdce+3 p+Zec9N+LpEyru5Oe9SPFNSbW1Leu0XvaCzhTUunln0rSwLSOOeIJadhpxomO11iEe+X xkkUnoS9Ol5IsqZEhgInYswWaS+gf+A70CgeD8PtxnHZZQ3hYtL0a4/v/2LUq9+gch7P uatw== X-Gm-Message-State: AElRT7EalaBNkp/LKCyObPq/OAyDc2QrHols4niFtwvCMukuUVgvw7Xd XdZwikvGuZsJu47yiOCCy1Q= X-Received: by 2002:a17:902:744b:: with SMTP id e11-v6mr4405977plt.351.1521840660229; Fri, 23 Mar 2018 14:31:00 -0700 (PDT) Received: from ?IPv6:2620:15c:2c1:200:55c7:81e6:c7d8:94b? ([2620:15c:2c1:200:55c7:81e6:c7d8:94b]) by smtp.gmail.com with ESMTPSA id x14sm13504219pgo.82.2018.03.23.14.30.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 14:30:59 -0700 (PDT) Subject: Re: [PATCH v2 1/2] x86, msr: add rdmsr_safe_on_cpu_resched() and use it in msr_read() To: Thomas Gleixner , Eric Dumazet Cc: x86 , lkml , "H. Peter Anvin" , Ingo Molnar , Hugh Dickins , Borislav Petkov References: <20180319152503.123372-1-edumazet@google.com> From: Eric Dumazet Message-ID: Date: Fri, 23 Mar 2018 14:30:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/23/2018 02:27 PM, Thomas Gleixner wrote: > > Looking at all call sites. None of them is performance critical and all of > them are in preemptible context. > > So we simply can switch the rdmsr_safe_on_cpu() implementation over to wait > mode completely. SGTM, thanks for looking, I will send a v3 then. > >> +/* Note: This version spins in smp_call_function_single(). >> + * Consider using rdmsr_safe_on_cpu_resched() variant instead. > > Bah. This is not networking code. x86 uses sensible comment style :) Right ;)