Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3574208ybi; Mon, 27 May 2019 02:18:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQfN/6i83jWlosqgIERIFa/Xmx09Eyyhdm5RN3keXhPqlw0OHiFVOgzeuuj+xJ3k+hUVyP X-Received: by 2002:a17:90a:1959:: with SMTP id 25mr30646561pjh.113.1558948692841; Mon, 27 May 2019 02:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558948692; cv=none; d=google.com; s=arc-20160816; b=TpFSpS+B7ggwNZDun2JrJ1xQbftXgtIMATDLFEfff0R/Rb7q8lwOHA/X2kEelMXXjE 5i26rxnjYYAkW5jRt9xB79JKcOrWcePqMco+BkX1pDlYFvhgbtKiB8IQgEACD4o2cpOw LlHrNUfb6QzZuHREBqRHcIYbbl0MXQ98JDGNa/R+JgR5RWT5ErAV0QZBe0ERW7CM602Q 4C1101hhxiwfPIBT07T28nBCmJLKykuY9HiDV6X9R5Tg1bgrbfOQKuQHu8QE2RcMl0Gg BCXmhwL4joycsmuoarIJDBVafMT1xWiDQmTjONOlJgRn1keSsS/kB8gYsNyk/UUH6FJs /a9w== 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; bh=afce9BX+KBRkdHnIunqFc4NYfkLDXj/i7H6nj375lY8=; b=afHjhOlhA7UlKiu5koq3Go8rfOhFbvJ5vifd8qDEQtJ2A6i+Gv2vuiEiKKD74KhmXs 0JArvOf4OcgCEM7mji4w4QlKY4HJSiSvifTUA9iHY5j+3lqN2paYKge58orzP4UdBvgI 67bBew8uPNHixl4MoU/SnNOttbWWmKUbDZB9DerntHl8pQK73I9jVcTbXShT74mRvz6P 4PA+wjnlDiwchF6MiM09EMRVbBX16bjnBOzNDPGgMDS0qI1BBRD4Aw2rGqILW6QzPlXW p+//DFBApXum/P9V/WTIDg/s5g1X+n+w5JibXh9CGo38kU8zyO+/UxjoOhgyUyFvKAsJ c4jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=c4uyFO9t; 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 u143si18840374pfc.203.2019.05.27.02.17.57; Mon, 27 May 2019 02:18:12 -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=@infradead.org header.s=bombadil.20170209 header.b=c4uyFO9t; 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 S1726540AbfE0JPr (ORCPT + 99 others); Mon, 27 May 2019 05:15:47 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:51902 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfE0JPr (ORCPT ); Mon, 27 May 2019 05:15:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=afce9BX+KBRkdHnIunqFc4NYfkLDXj/i7H6nj375lY8=; b=c4uyFO9tXoK3szqSD8sM1mtTS iFPY9f8UfI79TXxIgo6vEBxhSTGKb/krRiR77Aie7aiv3wmFnlXA4dlKiVe42ZHnShTzZv2jndM+S QD9eJaSWdDN8OkSwMio9dMeODUCcMbGFH6fBirHWp9Wl5XDn/Td3Cmf7IVv3jUxrs/NgsG5B2lSTC vcr2HNrRBnmyERHBPKDnQef0F1n8fOgFn5Y8XLC06nh5IAoKz8HwZBgB9/CjlZQIu2ByHFHDqXG2N X2ICBpcN63319KU3QCg3rxsK9CQgBLr9gLJlupef1pqr+wLY5pOxc1WsMMqGf6Hc5IyQpWqoEk1SD i3q+qDM8g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVBjD-0003kP-Vm; Mon, 27 May 2019 09:15:36 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3D0A42071511B; Mon, 27 May 2019 11:15:34 +0200 (CEST) Date: Mon, 27 May 2019 11:15:34 +0200 From: Peter Zijlstra To: Nadav Amit Cc: Ingo Molnar , Andy Lutomirski , Borislav Petkov , linux-kernel@vger.kernel.org, Rik van Riel , Thomas Gleixner , Josh Poimboeuf Subject: Re: [RFC PATCH 3/6] smp: Run functions concurrently in smp_call_function_many() Message-ID: <20190527091534.GS2623@hirez.programming.kicks-ass.net> References: <20190525082203.6531-1-namit@vmware.com> <20190525082203.6531-4-namit@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190525082203.6531-4-namit@vmware.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + /* > + * Choose the most efficient way to send an IPI. Note that the > + * number of CPUs might be zero due to concurrent changes to the > + * provided mask or cpu_online_mask. > + */ Since we have preemption disabled here, I don't think online mask can shrink, cpu-offline uses stop_machine(). > + if (nr_cpus == 1) > + arch_send_call_function_single_ipi(last_cpu); > + else if (likely(nr_cpus > 1)) > + arch_send_call_function_ipi_mask(cfd->cpumask_ipi); > + }