Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2851990imm; Sun, 29 Jul 2018 05:02:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcDex9kPtgBwIJinOQeFE07zEpR7S8VpmB/sIJCdHA44JIqpuWfCuyUVIHAqd1FvrmD7GEt X-Received: by 2002:a63:fc0a:: with SMTP id j10-v6mr12616114pgi.1.1532865730168; Sun, 29 Jul 2018 05:02:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532865730; cv=none; d=google.com; s=arc-20160816; b=jh38qemZ1MSdSazsUPFA/eZTXifj1BsAlseJcwb8RaQilNOYJsCjcTOSgcEEn4jXiJ Cbxj9g0UtvQXxeLSA4J7sidK9wtkBcrO8oqTtAXF3iysRZt3Xfeu3cKBcIhimULO9hrO cyofjq4nGSj7r/zFuUqcRe1QjQ4Ct/g/Je3negpNp9YTTOtevQowaMvrUG2l0hTBEd/S ebFzmxbx8UPqR6H7lLfwdSWSjYywjJngtXV3Yl9cVaksXldmTy026JMwjrHRDKE7qWbW bcHOwfTqjab8aUdCkrpuscc+Ta8Go0+JQNicPDBKsfUpNvOLJtKBa7S2WMtAZyBUcZVs iRtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to:date :cc:to:from:subject:message-id:arc-authentication-results; bh=vPghSi8fCXXyMGZ+eza1Pt9KqQTO2qvjT9prX1zCgfI=; b=PCIudcXmBVpLHc3ULSQ4fqb3pFp0bGLM8oCddegqd9LXuLpUQ6BH3qNiYgRZzfdXnN 2OuqidqZVVDf685R8CFJmTQgOXk5weLLxAw4GZes5d0oOZeRfYrfCY2AWBagGCjGx0kU /ZO/mWJ9ECyESLmh/7aEHFGrc23gOWkkD6+hLjNK4Q3bSaDG+n3QAzv8dG3ku+RtQudH qghAzOmUat5Qro2tgrb9kgtr7azg38OLFdq0uvsN6hnVEOpb/Kv1wP5i0U0NfIi7o7/z sOMqSGPG4N5HhHkPY1ZyEXuF9oHkEacoH/0kSs7JM6r+J/uBWF4sMlDMTU3JDNh5sc/H APFw== ARC-Authentication-Results: i=1; mx.google.com; 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 194-v6si8052411pgc.116.2018.07.29.05.01.52; Sun, 29 Jul 2018 05:02:10 -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; 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 S1726405AbeG2NbI (ORCPT + 99 others); Sun, 29 Jul 2018 09:31:08 -0400 Received: from shelob.surriel.com ([96.67.55.147]:46880 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726242AbeG2NbI (ORCPT ); Sun, 29 Jul 2018 09:31:08 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fjkNG-0004pL-RR; Sun, 29 Jul 2018 08:00:34 -0400 Message-ID: <1532865634.28585.2.camel@surriel.com> Subject: Re: [PATCH 03/10] smp,cpumask: introduce on_each_cpu_cond_mask From: Rik van Riel To: Andy Lutomirski Cc: LKML , kernel-team , Peter Zijlstra , X86 ML , Vitaly Kuznetsov , Ingo Molnar , Mike Galbraith , Dave Hansen , will.daecon@arm.com, Catalin Marinas , Benjamin Herrenschmidt Date: Sun, 29 Jul 2018 08:00:34 -0400 In-Reply-To: References: <20180728215357.3249-1-riel@surriel.com> <20180728215357.3249-4-riel@surriel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-9StAdvISSn5n2ZKdNNic" X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-9StAdvISSn5n2ZKdNNic Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2018-07-28 at 19:57 -0700, Andy Lutomirski wrote: > 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. >=20 > Nice. >=20 > 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. The test_func callbacks are not run remotely, but on the local CPU, before deciding who to send callbacks to. The actual IPIs are sent in parallel, if the cpumask allocation succeeds (it always should in many kernel configurations, and almost always in the rest). --=20 All Rights Reversed. --=-9StAdvISSn5n2ZKdNNic Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAltdrGIACgkQznnekoTE 3oMuCAgAqdoD/Y8njVV+VYOQwQFWJ/lrqT6p7ol3hJr5H0jlrRL5knJz33m8FNTp SSDjRTW0fVhqViNL/AqvHptIaq8TqCwMFgSwBzK0PQ86Uu4FrM74cfQIwsUT5mqt xkitYNI1bkMLk9V3VLk05S/8QtF4wfrEmOmhjWm8VaNKg6VzpvTcpLZKLOV7XV09 sT55PRz6oDo6Z3YO0kSEP0mPPBb9jbxBt/QM9LmQlCjlDPUDBVL+ZRbhA9/VUoIu c7iXB7H7OxAFJjAYKwLu8vZy0ycnyUHew3TMiqYTm4NMDphYRZ9n90suZKuJLtKB ZNpXDlwacznCBBLNiNpWEzGmljpTig== =YbxN -----END PGP SIGNATURE----- --=-9StAdvISSn5n2ZKdNNic--