Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp57667lqk; Wed, 13 Mar 2024 16:25:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU25BZ7UNjPOaOj9JrnK485WDoutKwieO6p1phAwkr1fGI6OXfVYEEPtYO62HupEAWLtfikF7UU2yj5VUMkFH2lTLmpIz4KywI2HcI7EA== X-Google-Smtp-Source: AGHT+IHjp7rZA2vhSMLkvLDVZgKXPlCe01L2jDJdRMM2oWkjHneGjv36panrYzO77aynxp4rghzl X-Received: by 2002:a17:90a:ead5:b0:29b:f981:1363 with SMTP id ev21-20020a17090aead500b0029bf9811363mr155279pjb.5.1710372321242; Wed, 13 Mar 2024 16:25:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710372321; cv=pass; d=google.com; s=arc-20160816; b=IhNOAmx7wkKNLSKbSAcfcaL1TPAIwzaD3Mes4P7aM5TgqnbB18C6Yk893sfB+KHsTT f6dogkK3X0reF5STl73QbUqDc21oSD1qn9bkyg2inNjxYm0ppc3ODHocvx74SJlp3k26 rgu1igjQp4orhcSbO94KBSVBJJGQhS/lPxs0BkSbChnIeD1N49QcQoDi7fjgE58RLoCi n4UWtHaV+TnzGGtR1hoAoU69Tj1Mk7J4ktklvFLT4uJRrUgluouiVH2UwXPEs2vGoKP5 HxlwCCPt4UD75Zq16Jnh/8pahU0iVSwI4G57q2ce5vYuJaTsHZkrObRE1BtSjhCFHXtE MFnw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=s8ocYdRSyCSR7HjFhvG9z7wZeynsu39/mG9/0tensvg=; fh=rMghBhKj+D6UDD0VzTjCci9l+3/CRJmCWr0Mw6KgW/E=; b=LjR3w1m8EwxF24fx5OPdoSRfcAPSKPQZyNn0KsxGj5ITpekv5OI6kbu7iVJ/kLPN1X SrZ/8G29AtRtGs2n3zJlRYsPqaGFz2jyJWg7knhWSz+7dMPJPueJJvKWklQIjjP6cQam YXeSs0CtfOJTCWgFTGZARMd9gEVWWwc/zpjcf7QMhn4ZgCVEmI6RgL92iw5lwrDuQxC1 WZk1B+um4KrOfa8J/Bb9k2tAYrPhx+SJabQ1ge4cX7zDNbBiKRIgXVJzDpaQ4eEz9C5J 9/pgrMrRr742PpFePAKWnJ+l0jWPXhXu/QvuBwJufOp0xIlIdg/AR8snli7KpqXvwXr9 W0RQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=TCBS+aCQ; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-102636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102636-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f25-20020a633819000000b005d8b6a84416si313277pga.534.2024.03.13.16.25.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 16:25:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=TCBS+aCQ; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-102636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102636-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DF6FEB2245B for ; Wed, 13 Mar 2024 23:24:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B718B5D737; Wed, 13 Mar 2024 23:24:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="TCBS+aCQ" Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BF6A5D724 for ; Wed, 13 Mar 2024 23:24:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710372282; cv=none; b=QUlND8/mlclXjXTCJobDh3ao3g7rQcNaftyzWfqCgXASqon/oYsaw0FUOYwQb5h5s/N91c0rIv1dyYwXpyTWJoC8SOJKxIhaGe9X4IvTHRUX+YKb9oPBZrKNarXG/7U0d1SuVHjLCjqPqo2WxhDdGuHBJ0KSVwLnoRJsgctphFU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710372282; c=relaxed/simple; bh=HKyUwew810z+LaXSBYXDklPZLMcXYEepc/mtYjT8i2E=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=i9PAzBSwGRdh30wQdoYfm7Qaf1o3ipeUgv77eS5SAlXY8vpRXfHpDCTiWAkkiKEN5Il98TJCU1o5KjpYsWMfLvOwzCLUOXXhhDXmYrIue8AQrNqRCrxptvlIqYToSDsOYb0YdPFW7/rgJGdSZ4nCd+b3rK7vv6P3MauGIpwmdCY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=TCBS+aCQ; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1710372275; bh=HKyUwew810z+LaXSBYXDklPZLMcXYEepc/mtYjT8i2E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=TCBS+aCQYGgS3gC+Ki41nQJO4zxg6uQPSswbzaNoPTgpUCUlRv5c/TeC9zS38FDDQ 2n/IphpS4HGVoDbxePU3oyPpwKIGkNzZZAjqxBicnCcjrAI3AuC368t2xB3hNvKLQr emhIB87ZUfGHemL7vbSGH4YGlmF2k/ICd8Pq4JgD7ioMnxiu2UfUUOJTeeerdv3s3U c2+u8L0i4JAeo+6hGe3PiyF5HuQxLYL4ZV9MtEDu/ESGduNRghYRyewy906+zuqaYe TRfjYEF1htGgn9d7TA8eKTpcEw4LqY0tyeUnpB68FI/V2z9IVs22iMpq7p0vXcqBhP DdW3eK+BPAP/g== Received: from [IPV6:2606:6d00:100:4000:cacb:9855:de1f:ded2] (unknown [IPv6:2606:6d00:100:4000:cacb:9855:de1f:ded2]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4Tw66W60PkzjcJ; Wed, 13 Mar 2024 19:24:35 -0400 (EDT) Message-ID: <65d88186-7975-46ff-aef9-3b3a34f8e97a@efficios.com> Date: Wed, 13 Mar 2024 19:24:49 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 1/2] smp: Implement serialized smp_call_function APIs Content-Language: en-US To: Linus Torvalds Cc: Peter Oskolkov , linux-kernel@vger.kernel.org, Peter Zijlstra , "Paul E . McKenney" , Boqun Feng , Andrew Hunter , Maged Michael , gromer@google.com, Avi Kivity , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman References: <20240313205622.2179659-1-mathieu.desnoyers@efficios.com> <20240313205622.2179659-2-mathieu.desnoyers@efficios.com> From: Mathieu Desnoyers In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-03-13 17:19, Linus Torvalds wrote: > On Wed, 13 Mar 2024 at 13:56, Mathieu Desnoyers > wrote: >> >> Introduce serialized smp_call_function APIs to limit the number of >> concurrent smp_call_function IPIs which can be sent to a given CPU to a >> maximum of two: one broadcast and one specifically targeting the CPU. > > So honestly, with only one user, I think the serialization code > should be solidly in that one user, not in kernel/smp.c. Good point, unless other users of this show up, I could move it into membarrier.c. But only if anyone cares enough to come up with benchmarks justifying the added complexity. > > Also, this kind of extra complexity does require numbers to argue for it. Of course, Thanks, Mathieu > > Linus -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com