Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2513684imm; Sat, 28 Jul 2018 19:58:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeQ7SAFkSaGoivoueUup7sVdYGZZ0ClapXyx5gWtSwfInMzvC9S32ZNsC7RXBWlUDTOiExF X-Received: by 2002:a62:89d8:: with SMTP id n85-v6mr12490930pfk.83.1532833126916; Sat, 28 Jul 2018 19:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532833126; cv=none; d=google.com; s=arc-20160816; b=PSLj/WGoSwpukNeywpYJEYDFPncnTgjywPBJYdFqGmCHGdnILphJy6YXw7F2kCaxkW cI/DtnLfHFWVJV9Sf1XjihvNOAEg/Rc5+iy8mT+tiGS0+iUFPzd6H3qmrgWojqjZHo5E N0VMWmTTyFexZfmQdQgzGYZGS1LILAYccQ/AisvHZEawlFs45MyU3V58z48L/341dTOM WEvaFOPPGGGRN2p9lc4pmKphWcUt4FFEiwIqDgnBSs2E8rIMXmyHMd7gyaSEI6K9RFdU qMqeyKJO//MYDS6FDF+w5wAM1QLSai+K3yrMwkctZx2nYfEUZGxWbcRYvCCR0pLgFUwq L9Cw== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=hxdUkI1URYI/S7yXij9yYceuMWOlcixd7KJsQSOpABM=; b=iBlgD/mNRtT3agWkw2eGSTGDhBdIXGoOooB7mBo3dssEEqxFD7Ioq6BaC/sUHNO6Ml EAm3ArrkCbjMyamrNC/yISammoDrkrAjK9MrNT8txPYb38PGjeSGtN0CthoeGstjGgx2 YkCeH0eeExaMGhbceU3g9rLEGsx9PfH19XNglTlWcn5/YF5/fauLs9ZPpEIlElegx/W1 909/3XDcOzONMg9jeMZkrA1UFRNA2LdPsBDgyxP2aGHLH0OrhVz8kiUWPmTqTFLGkTI5 ZrSFJUorDpgXB1Kw1LROktZwKtPRRGDk2hgWMjlRZNlKU9plXD1ryaFJDbjN4keIBmww s6ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="l/SrXhiC"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 139-v6si7576132pgg.408.2018.07.28.19.58.32; Sat, 28 Jul 2018 19:58:46 -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=@kernel.org header.s=default header.b="l/SrXhiC"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726205AbeG2E0c (ORCPT + 99 others); Sun, 29 Jul 2018 00:26:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:33836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725968AbeG2E0c (ORCPT ); Sun, 29 Jul 2018 00:26:32 -0400 Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C2DCF2089A for ; Sun, 29 Jul 2018 02:57:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532833067; bh=KuY/RUOAmyKUARhAzh/dGfss/Dszo4StMbKmpqDHvus=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=l/SrXhiC9yxGpUC8v2EpTKfAAQEDWTpdVGJ4T5SIl/QadPyAmZo6d20GB5J7zKXFk ptmzzma4ZqSjjERrqjXz55OUEk3S6+dEQatRNmk5Q5U1cNBuxT1C5IRRg3SUAuYTNm 0nFnDUxv9rrb+hxdksMPIgxd6eCKEu4ahlGlrzYw= Received: by mail-wm0-f50.google.com with SMTP id h20-v6so9733142wmb.4 for ; Sat, 28 Jul 2018 19:57:46 -0700 (PDT) X-Gm-Message-State: AOUpUlE0gLia7uWTw4qSLV0bZpg9Zh+lK6FauaZTwRlCDt3hoSqJ+buq 9cjGOHVBL6ugeHo61iSuD+prpNKRFGcVOdXSsdw+1A== X-Received: by 2002:a1c:8313:: with SMTP id f19-v6mr9498136wmd.144.1532833065281; Sat, 28 Jul 2018 19:57:45 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:548:0:0:0:0:0 with HTTP; Sat, 28 Jul 2018 19:57:24 -0700 (PDT) In-Reply-To: <20180728215357.3249-4-riel@surriel.com> References: <20180728215357.3249-1-riel@surriel.com> <20180728215357.3249-4-riel@surriel.com> From: Andy Lutomirski Date: Sat, 28 Jul 2018 19:57:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 03/10] smp,cpumask: introduce on_each_cpu_cond_mask To: Rik van Riel Cc: LKML , kernel-team , Peter Zijlstra , Andrew Lutomirski , X86 ML , 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 Sat, Jul 28, 2018 at 2:53 PM, Rik van Riel wrote: > Introduce a variant of on_each_cpu_cond that iterates only over the > CPUs in a cpumask, in order to avoid making callbacks for every single > CPU in the system when we only need to test a subset. Nice. Although, if you want to be really fancy, you could optimize this (or add a variant) that does the callback on the local CPU in parallel with the remote ones. That would give a small boost to TLB flushes.