Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1983761lql; Wed, 13 Mar 2024 13:56:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXrxA+zl0yJ7XqS/YvxoSFpjpiwtH9pdrtM5QvtayhHeaTDuJUIHeyH8z+e0IoQIrAlERe8qNv18sEntEyDZPZVUXBTKJhurJ2bq8pLPQ== X-Google-Smtp-Source: AGHT+IFFwrLb8YLx0J/uUbn/B1596R1A7y8lpjeEf3/aprgQiWJAliML/bSsFcqkPXbfAmSZt5yB X-Received: by 2002:a17:907:a682:b0:a46:6132:3382 with SMTP id vv2-20020a170907a68200b00a4661323382mr1914360ejc.27.1710363398555; Wed, 13 Mar 2024 13:56:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710363398; cv=pass; d=google.com; s=arc-20160816; b=OPta6JSDc12nhf+k3DfKJOd8mkS/VDSM7euIE5L9dqLArou0r21h6QaVjyhUDDBzHH 1kG/F/JgpdAg6NabjrxjuDjA6KD5O/jbSd4jl9PbI1PVBRUX1EiKKUHnpaWbrUI6Liwt XHTL2ARtbindN+MDyTeNX5MGbeMv/fDjFydzTy8SgwFQtsyvhq5O32nHPr63/ZJqYaf1 /kCyGZxgdhO7qaZYacbD2U4TZ7QBYaoahSVBHoFPxk1U498aSM1CkTGht9hWtNkNamgd Z8KNV//DrnOnUHNCSESCLisbC0PoMZWE4q1kqlVd1NOuXWtkwnlJXCDaECvsApJx9bvj aruw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=oGYcUABNZ+3gTcAwLyBJsFD54Sd1EdgQYn93D5CHSwE=; fh=hcjTbRm31cLOmczQtGMg5ZXU1uHM1jXX+IJ5kSPTFvo=; b=y5YHVrZ8/Xuok4/2hbWghH/VwF70mw11KaRZHC3Txn09c0oVKO5loiXKN9zMThLvu/ KFvqLKnP06XA26pTpUCVmz+MNtFE2GUml0aymwwZBB+M3Tk3UosD/Zfo+X2eqH2eW1rR JCYRmt6lNZr8vIRtGvmWvZ90uAgSXr4+KBz+ztmr1lw9CG2cpcQLi2YQOtP58yEgHQ6W G8grCGafCx+Oq9KKecDmWAPaHHjdEQQ4dd3M2h6qjuAU5W4+5RLOfEwIG9K0Sz0mg4h8 FaXy+GVdnZLncYoWBNOaYTtg6RmesewrmngUnSHJFwLik2j6Wxqlr9JWpDQsKy160pVN fRhQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b="L0Be1V/F"; 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-102506-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102506-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j16-20020a170906255000b00a45b8e1352dsi8578ejb.741.2024.03.13.13.56.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 13:56:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102506-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b="L0Be1V/F"; 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-102506-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102506-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4B9901F23DC4 for ; Wed, 13 Mar 2024 20:56:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95CCC524DF; Wed, 13 Mar 2024 20:56:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="L0Be1V/F" 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 BFA4320DDB for ; Wed, 13 Mar 2024 20:56:29 +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=1710363391; cv=none; b=QM3Eaa33tXZpEC+Fw54xzZOf7TbyLL84aFuuQV7FozDFAq4KQ9BrUWNansDnuvAVo/Y0/6iSYPaV9n7TYQGdirgvlYFtV1ffCsIyeDxQgQsFmP+j9Un0MzDLy3v8oUyqEkzRTwPy7mOF+zd6kx9Oreei02D0BREpWn3r3dFcFVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710363391; c=relaxed/simple; bh=ombC87M/jDfVGex2UxCohkXM5I06cdOhxPkknjHKUX4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=b8zX3yIXjJ2x3drFUASXFHHp68x9tihdaIRpoUcHtVo6dDKCBf/HqKDSEINKkQMElrRFfJf45JuxHANivk/cnsQagtgka7LH/IT9FaU6WcprblfmOzSNcdHF+zgacFoJOmOMCvHEwh+pry3cu0vsfaTeZ3rqJntIJYLTaac1BTw= 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=L0Be1V/F; 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=1710363381; bh=ombC87M/jDfVGex2UxCohkXM5I06cdOhxPkknjHKUX4=; h=From:To:Cc:Subject:Date:From; b=L0Be1V/F5E3uHHIK18kHDRKtGttorOPLvQ786BQ1vDLVwQAU05Ya82DAF7CFBXPVS HuQ+J1Y+UdsDAPfs7y4sXeCq3WhqkNVW0Q0d38ac0vdcJV6BMmm/1ZfkTSv7IGq897 BgIh5p3CPtbV+bC8wKW/4nm5GHeDUisQs8dptfHBz93bMQ0iDlSJJTowz3R5niePJ4 cBlmzbNd3BY8vz37TGu+zCsb1/lbkDkCpdAKhnXrA2wrCZHxcwYrZe8cUIDqzwvNcx frB9izs9s0woYijBIYQXGPtqZwswjaBLIufME2OgUboIHYqI9OdG4maLweULnokyTr w+YIp5+9m8ojg== Received: from thinkos.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4Tw2qT3X1Dzjnn; Wed, 13 Mar 2024 16:56:21 -0400 (EDT) From: Mathieu Desnoyers To: Peter Oskolkov Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Peter Zijlstra , "Paul E . McKenney" , Boqun Feng , Andrew Hunter , Maged Michael , gromer@google.com, Avi Kivity , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Subject: [RFC PATCH 0/2] Introduce serialized smp_call_function APIs Date: Wed, 13 Mar 2024 16:56:20 -0400 Message-Id: <20240313205622.2179659-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit commit 944d5fe50f3f ("sched/membarrier: reduce the ability to hammer on sys_membarrier") introduces a mutex over all membarrier operations to reduce its ability to slow down the rest of the system. This RFC series has two objectives: 1) Move this mutex to the smp_call_function APIs so other system calls using smp_call_function IPIs are limited in the same way, 2) Restore scalability of MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ with MEMBARRIER_CMD_FLAG_CPU, which targets specific CPUs with IPIs. This may or may not be useful, and I would welcome benchmarks from users of this feature to figure out if this is worth it. This series applies on top of v6.8. Thanks, Mathieu Cc: Peter Zijlstra Cc: Paul E. McKenney Cc: Boqun Feng Cc: Andrew Hunter Cc: Maged Michael Cc: gromer@google.com Cc: Avi Kivity Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Peter Oskolkov Mathieu Desnoyers (2): smp: Implement serialized smp_call_function APIs sched/membarrier: Use serialized smp_call_function APIs include/linux/smp.h | 40 ++++++++++++++ kernel/sched/membarrier.c | 24 +++------ kernel/smp.c | 106 +++++++++++++++++++++++++++++++++----- 3 files changed, 141 insertions(+), 29 deletions(-) -- 2.39.2