Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3210223imm; Sun, 29 Jul 2018 12:58:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfsTuRmTFfDZKr5MUEIHuF7XPS/Q+bf6Zr/9izpT9q5rjpJwJnZ2Gmls7alCSs9DLvWRqQw X-Received: by 2002:a17:902:e85:: with SMTP id 5-v6mr13868006plx.318.1532894309300; Sun, 29 Jul 2018 12:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532894309; cv=none; d=google.com; s=arc-20160816; b=B2mqu0ZSqejs4wgHL4uVGwH82asYY4U3R3a+Uzmp0vdO4bVCGr5v1YBqhcKl65D9PM cPK5ZNR5FIXHnPiu/9ejZ0VaVA663Thim+gMAkA4CCVT8gQ0Ei4CHo2dJtBAtrCtJH2K lzacNTMF9KTll4Qj6D4iO/JqiEiR1WZmQdmDkvag7k5Ftd6bd0j7TdccnY5UvvFXtxZ5 lipiMnBM7FMqYOxLqHsFR19Ei05wVql6NOgHHijkadUPPPtPTg0Ifyi9nfKba9Q7BQkc fLDPes8JSYiAkHJlObKJ+9ipTUGGd6aqtLRQPtFjm2uXxN9gWtDt942PfJarznOTGYWM ylDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=8sfgsSz3YTOMGINWX5xbwvOPbnsWQCfLZ9UYwzEYogs=; b=sTsEyNj8nfSpIDld3aXmVUeOO7PPLuRF0v1yLyRqcZRdt3owCvzXs6Io3smZA3MA82 AP0VhHkneq6QJawdFFXNLmxGf9HrcYhcyNetsiryworBeWKFP1naPbPB2piQkT6VfQU7 83ONsR/K4qaZe94j7dnROyUyXz+DTeTX/sTPpbwlyVAxogAqC+QD0HOYb+lI3BHJU+fa jwNEI3O4O2oYqcP037MOFjHAGtTuKAGqUmv6nxkb745nrJSs1XutPqG6wGp6K7LW5sqz x8Mx/dxWpWYnyKJjAP8r2I8BdI+EkV4v9jk/1hq4xshK0x+NOUBMi1bUGD7W8TMY4Jy2 wE3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=CxCaRLUq; 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 e34-v6si2134822plb.2.2018.07.29.12.58.14; Sun, 29 Jul 2018 12:58:29 -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=@linux-foundation.org header.s=google header.b=CxCaRLUq; 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 S1727739AbeG2V2e (ORCPT + 99 others); Sun, 29 Jul 2018 17:28:34 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:50328 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726644AbeG2V2e (ORCPT ); Sun, 29 Jul 2018 17:28:34 -0400 Received: by mail-it0-f67.google.com with SMTP id g191-v6so3416982ita.0 for ; Sun, 29 Jul 2018 12:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8sfgsSz3YTOMGINWX5xbwvOPbnsWQCfLZ9UYwzEYogs=; b=CxCaRLUqNWtWeV3Q8aLyLRgJIheSpL/4YxUPuEGnqONakDpHSqJp1KL400RqXle4H1 4HjxfRAKPJYCMzqA5qVaFb+W8KFS2pFPygmna1Dk/30mQ62av26/kM+PxtZDD1bzUBhN IyQXQqvz4SEGH+IQeHtgdXZuIHA9PGduJSA9A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8sfgsSz3YTOMGINWX5xbwvOPbnsWQCfLZ9UYwzEYogs=; b=Mxq/WS1rCY3U29Pjic0bZPUR0zEMHwyXJ9eB5HLBi8Kk9QNSkXXSzzyZrHi7TEcgfu 9bm4CVgh/K9RcbLURTT4uO++oR33gGSTG+L7w/LCHSkwCtpTfC0m4OT5IVslP0HIWVz7 4GqkCvgS/YcTv1yawl92xlz//SbtGIB02GtmVZB6BN/O9Qi0AJlEdxCQXhOXkks+wjBh 5bdmrI4Io0OuMb168p36tiPvyJsuWGNOgptfyL6kRsiB7bTl1RYESaiFgIhICwKc3gZL XOjfJKcMoocX6Jz+dp8e5pEt+PMs8jMsnErSn+e8f3UN3HZP3pA/aLCQrcCXGHT6i9b0 5GyQ== X-Gm-Message-State: AOUpUlFBL6aT1tL9+h0PnAeGADkr1t8RG0/XhcWjPuq5QY58UN7OUpML P/QBqRwlNhg/N+O8DmG7idjJVN9XRJyYV3Xjkj0= X-Received: by 2002:a24:5002:: with SMTP id m2-v6mr11977541itb.16.1532894217159; Sun, 29 Jul 2018 12:56:57 -0700 (PDT) MIME-Version: 1.0 References: <20180728215357.3249-1-riel@surriel.com> <20180728215357.3249-4-riel@surriel.com> <1532865634.28585.2.camel@surriel.com> <1532886673.28585.24.camel@surriel.com> <8A3221EE-0D94-487E-B53D-885A555634BD@amacapital.net> In-Reply-To: <8A3221EE-0D94-487E-B53D-885A555634BD@amacapital.net> From: Linus Torvalds Date: Sun, 29 Jul 2018 12:56:46 -0700 Message-ID: Subject: Re: [PATCH 03/10] smp,cpumask: introduce on_each_cpu_cond_mask To: Andy Lutomirski Cc: Rik van Riel , Paolo Bonzini , Andrew Lutomirski , Linux Kernel Mailing List , kernel-team , Peter Zijlstra , "the arch/x86 maintainers" , Vitaly Kuznetsov , Ingo Molnar , Mike Galbraith , Dave Hansen , will.daecon@arm.com, Catalin Marinas , Benjamin Herrenschmidt Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 29, 2018 at 11:55 AM Andy Lutomirski wrote: > > On Jul 29, 2018, at 10:51 AM, Rik van Riel wrote: > > > > This seems to result in systems with ->has_wbinvd_exit > > only calling wbinvd_ipi on OTHER CPUs, and not on the > > CPU where the guest exited with wbinvd? > > > > This seems unintended. > > > > I guess looking into on_each_cpu_mask might be a little > > higher priority than waiting until the next Outreachy > > season :) > > The right approach might be a tree wise rename from smp_call_... to on_other_cpus_mask() it similar. The current naming and semantics are extremely confusing. Ugh. Renaming might be worth it, but at least one issue is that we are simply not very consistent. For example. smp_call_function_many() does indeed explicitly ignore the current CPU. But smp_call_function_any() (one "m" less) does _not_ ignore the current CPU, and in fact prefers it. So it's not that smp_call_... should *generally* be renamed. Only some of the cases might be worth renaming. And just a "rename and forget" isn't really great. As Rik's example shows, existing users should be checked too.. Linus