Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1612544rdd; Thu, 11 Jan 2024 04:37:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8GL08/RsHNcmyTVTGaJmvbJbpwFQUDJFGeHZWscZL1k3LlzcklBOlCyu/skEGTwNqN2vb X-Received: by 2002:a05:6e02:160e:b0:360:62c9:4209 with SMTP id t14-20020a056e02160e00b0036062c94209mr1497287ilu.0.1704976631191; Thu, 11 Jan 2024 04:37:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704976631; cv=none; d=google.com; s=arc-20160816; b=nEWAbMV8MexNNa39CsLI9wIvAssKgzUHguHqu419fPzqR6DjkupBCMgLI9WPulwx9p r2NviI6i9WKfTxwgZODbXR02DTDDlZKW9ehs57gNvbSBA9Hzs7XJUHtMnmhrySK9EaE7 y+pMZADZcLh+gibWMZ1oTl1wnpFPzVgNSWEOjuMam+25M4CTaOZfoNZ251sVqoNkHQqG DOxAs7fdJasI+4qpFSaxGQjK1mLk6ZiiK0hQ1JqRcSE6Xh96r7/PX+laT3ZMmPPQrKLu 7WClCyRkjNyQAMTxltEZZg6jFb0+mW4GZm9zjwuQuPsauVpAl1z1I7ouf2w30HlcA4DU 72nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xRA8RaFNu4Cwx4kYpYDAzrlMhkoYHt6+xOaSNQBOWCc=; fh=mN/qU56MJ+i6MDCuuCU8el+kxbzHEA9O/nopluvZ1xI=; b=JEKKMMpC5RM/OBClRP+uFRFWEZvdSziYDSubJSj76DnDYqNDmpn/Id3Glh30XsGo28 C1op24OunXlAoIuYrkQehgQIfpPe2ME6IpTsUwKna3Gbf6IT9dfiQP+3DPYxUwqybLTo 2Hx1wZCsPIzpdV8rjKC7xmGPm9Y/l72feWzhQWbJQ6N0RNX8ZraigkFaLriAPQ4RcrA6 UNVhv6PeCnWAeX59v/EtOkMeNms0fEktfxNTpZ2h/HQF73Lg6RFF1lGOF+pGE1kYfwNT M1eA3ecXb2TZRgeAYxKonnjlEpdq+P0TljP/5jTH2BFGkRDrkMQLIfV47XIFbLn51SnX DTsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=At+n92TL; spf=pass (google.com: domain of linux-kernel+bounces-23592-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23592-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a186-20020a6390c3000000b005ceeeeabb5asi1018982pge.173.2024.01.11.04.37.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 04:37:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23592-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=At+n92TL; spf=pass (google.com: domain of linux-kernel+bounces-23592-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23592-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 DD8A7B25206 for ; Thu, 11 Jan 2024 12:36:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE88D15ADF; Thu, 11 Jan 2024 12:36:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="At+n92TL" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 6CD8615ACE for ; Thu, 11 Jan 2024 12:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704976565; x=1736512565; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=YtXDiIvWUWaP/lYh1Up7SkxhhppURJh5x5MViBxRt1Q=; b=At+n92TLwADh5Ah2lpBAMGsQh9Wvj56/VnTkHbtv5f+vVZwdcKF2LYSe 2X2BV0rfHQh1tzO/r2EWYD5qJK8HsPecnz15weNhPO3nf902xhzwNdo66 AF0iIIeiGpIMT8GyZtf55QgcIApvS6/1abab5UpIY7Am2b0LCuqL7WoAW /4r64nuisAw5pBuRJj/27mmvgz1SiF34ZvZVCnSF2f5mOkLoxYG9Lya4f yt+2k0vdkOTuk0ulmbTPrHHxh19HEibbwOW49lgcY6VdxuRmc6ABIYdEN 4cUUtwgOCEQAIdBefmTJMao8aVZ6RkKPAQSlTxz9QeUzSy3fPkeygFzKv w==; X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="5561813" X-IronPort-AV: E=Sophos;i="6.04,186,1695711600"; d="scan'208";a="5561813" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 04:36:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="926000150" X-IronPort-AV: E=Sophos;i="6.04,186,1695711600"; d="scan'208";a="926000150" Received: from tassilo.jf.intel.com (HELO tassilo) ([10.54.38.190]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 04:36:04 -0800 Date: Thu, 11 Jan 2024 04:36:02 -0800 From: Andi Kleen To: Marco Elver Cc: Oscar Salvador , andrey.konovalov@linux.dev, Andrew Morton , Andrey Konovalov , Alexander Potapenko , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: Re: [PATCH v4 12/22] lib/stackdepot: use read/write lock Message-ID: References: <9f81ffcc4bb422ebb6326a65a770bf1918634cbb.1700502145.git.andreyknvl@google.com> <87sf34lrn3.fsf@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > stackdepot is severely limited in what kernel facilities it may use > due to being used by such low level facilities as the allocator > itself. RCU can be done quite low level too (e.g. there is NMI safe RCU) > > I've been suggesting percpu-rwsem here, but looking at it in more > detail that doesn't work because percpu-rwsem wants to sleep, but > stackdepot must work in non-sleepable contexts. :-/ Yes something per CPU would work too I suppose. We used to have big reader spinlocks for this. -Andi