Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp155119ybh; Fri, 17 Jul 2020 22:56:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxktF3w8TayLmUfmYuBgbUcr0KJ6VpEYwKqwUjqUUy6Mn4lrScncQ3R4DyaoQz3DzMYWxWJ X-Received: by 2002:a17:906:434c:: with SMTP id z12mr11334298ejm.33.1595051780513; Fri, 17 Jul 2020 22:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595051780; cv=none; d=google.com; s=arc-20160816; b=RWvgmrxrYibwi0t20ozBTuyiCLuAf92ZScZTZrUKp+Exr/lYHnmNUtgxZO+3ESyobO pWyXxT+O3IyepOuZM5w0t6nu4c7R+pJbumyb/4lhJkGYmGUlCNsW/58DQd0c/j/zklQ2 EuHbmKdtceSV2y7RREmVeYy2yljIDZKYxsfdZsKGna0ZQ8KXyMWw7i6xxRkY3tyn9Uur ldJDLMmAXUL3GEA38iLr50pZY52ABCfzZexa/NUVm+CNVnkq1NLwpPFve48N0SZDGcL6 ThSBJyDS/AdXhgY7HEsIGvwcziIbA9i4OsMmVK1nEZWZFxNmPuQJ+0PuEtPtNcHfVeQE YfBQ== 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; bh=2k6UGv1LDKKpRhcTlEeKxXx4KzYCC+1w+JKMjKrFRu0=; b=EXwxEBejDEhMNgN6xogTcRrG/vqeiIi0iAH3rlb9sWsaLo5SrbbZPoPuL8M0pY6CLL 4MXtL7hgp4wNavKYlXLDvMB2gie4NY6yKBXv7VBKwWbg7uwJpY968kgDZqhZkkS7XdMF vsIqamDO8h5euAY0B+6NCPzZmIo5z68d916O8+KrdRYiVyESOrqaX2jG0g7rm6prO9oQ hKowGTc4bJqaDa5Uq5OYbJiyCAkXKor1BdxWFcfBXLGmreI9MRffll2MEANNnze8B9ei RildqMu1O2PVlag54i2NzzWeM8cqI/pPuYVi6sHUuEdNrnp/bB+TKwVbY/+IvsASfkGX ovcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SXDFIQGt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si5745352edv.457.2020.07.17.22.55.58; Fri, 17 Jul 2020 22:56:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SXDFIQGt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbgGRFyD (ORCPT + 99 others); Sat, 18 Jul 2020 01:54:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726611AbgGRFyD (ORCPT ); Sat, 18 Jul 2020 01:54:03 -0400 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 180DEC0619D3 for ; Fri, 17 Jul 2020 22:54:03 -0700 (PDT) Received: by mail-qv1-xf43.google.com with SMTP id o2so2693561qvk.6 for ; Fri, 17 Jul 2020 22:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2k6UGv1LDKKpRhcTlEeKxXx4KzYCC+1w+JKMjKrFRu0=; b=SXDFIQGtPOO1FREUNIOxP6MWzaMjlwxoRi/POKmRyva84olDCacJCnT6XzOl2CHd0e lhy7pO0N82TpMOaZeLnvII1AvtSwGFJaoUa+nM9xa5PtLR9S7S0tkkUdtr8LaNLKMUZS E2ShrxF09uRjcuw01zNvHLn2t3Y1eA6X/ACLJ0K6QwKhNmbmb7ZIDCpvwWHXTQHkMv5T YkiBGvie7c9VBGwQxISEcIstBcy1tQhcn0KV+3gHMhFuBr4UviapSSRWR0v5aX2X3tYd 3/NgYnHSAE2sD11wM7qOhkwof34OZm1jg43Gn3378JgC9YD7WtJGFiP+99yY4ANvOk17 7P6w== 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=2k6UGv1LDKKpRhcTlEeKxXx4KzYCC+1w+JKMjKrFRu0=; b=fu2jY+tL0o9caUq1xISDhkm9dKla8CAtdS4uCZA8eRxlibLyH0KVez4ZRoI0k6kXx1 +0uLOOTskTShq0OuafRqFDBs7h/9s7BpizxAiKwoktZC5g1p8NtRl/FGBT20owrsDFNy GXnQ+FdBQqYUswR0qPY1t74WNI3T2IAPiIiT9BdrBJTLI6AYbpPoKDLkfqj5qF72zZu2 XP9smtoAzYkdUKHgjcYbteAShbEY9nNieJSGnMoKTXGgIOS2UPaP/RZY+uMIx0jLxzIs 6tiRF3F2eiRJkoIvG9JhkydNp/WlY2iIV7QjNRMsUdfCHck7604pMDAjNTFxSNLmjXzf lxFA== X-Gm-Message-State: AOAM530/kQtvguTUE+NZLSaMWVTSHceQxJ36vURSTo0QleWVbHUq6YDW XwGqjfKQ7PpfICfnedsr3PrINFRo4tnQGACY+UDxag== X-Received: by 2002:a05:6214:14f4:: with SMTP id k20mr12441481qvw.231.1595051641884; Fri, 17 Jul 2020 22:54:01 -0700 (PDT) MIME-Version: 1.0 References: <20200718021331.940659-1-joshdon@google.com> In-Reply-To: From: Josh Don Date: Fri, 17 Jul 2020 22:53:50 -0700 Message-ID: Subject: Re: [RFC][PATCH] x86: optimization to avoid CAL+RES IPIs To: Andy Lutomirski Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , X86 ML , "H . Peter Anvin" , Linux PM , LKML , "Rafael J . Wysocki" , Daniel Lezcano , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Paul Turner 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 Hey Andy, thanks for taking a look. On Fri, Jul 17, 2020 at 8:14 PM Andy Lutomirski wrote: > > PeterZ and I fixed a whole series of bugs a few years ago, and remote > wakeups *should* already do this. Did we miss something? Did it > regress? Even the call_function_single path ought to go through this: > > void send_call_function_single_ipi(int cpu) > { > struct rq *rq = cpu_rq(cpu); > > if (!set_nr_if_polling(rq->idle)) > arch_send_call_function_single_ipi(cpu); > else > trace_sched_wake_idle_without_ipi(cpu); > } > Yep, I was sitting on this for a bit and raced with b2a02fc43a there. 90b5363ac also got rid of the last smp_send_reschedule() that was triggering the ipiless handling. One of the nice parts of the patch was that it could blanket apply to all of the smp_call/reschedule. However, with the above patches that isn't a concern; it makes more sense to keep the existing TIF_POLLING_NRFLAG logic.