Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2781782rdd; Sat, 13 Jan 2024 01:31:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGM+Vd8LCX+AHXhUEC3sblwe2QtdAoXhCNQTyIAk7FbsDrDv1KH78NvBTyRNkaqb7ao7gGe X-Received: by 2002:a05:6214:2aae:b0:681:11dd:29d1 with SMTP id js14-20020a0562142aae00b0068111dd29d1mr1917064qvb.115.1705138281339; Sat, 13 Jan 2024 01:31:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705138281; cv=none; d=google.com; s=arc-20160816; b=CFN78OBAePziJkktSNJTEOjP/eCyrPKnMDlSVMXGSdmz8yN454WjkWGUOejRfncE5k oRgRQElfeND3hS0PYi43YTjzYi9WvXcQqzrsphhnKe5i+HwKv/mrp+ZjmZ/eS3BkXwYv ET2MkbpaYpVYf/TFf4J5AyrU4LvYShNKN/HIH5PElFH52ZUf9IAADrVu+zJ+3IqYieah +HkG9hY+BeEwrPNqitC+lbYN/vQKS9AxeFmMZnq2R1VL1DNvCAPQCC0vtRpgaK3A2vE6 alz0J+50a3b9w/QEG4BEvsxbvfceLFGpNyX/dgR+BqH6ovOjFrJl+KtxhoS1SgqJJgox gAiA== 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=/MfQVj9eQZkESv1Q+8pI37q/xl6WbuISU+fGulwlTaY=; fh=ONaZ8uza6Q326KbPaYGMvUxVeaUBtspBHRgl2IaUgF0=; b=BwE0TiddUmAGKrUalvu+Cy8W9Wf9aOGdaOhBpT1xRb2Gg5XcPsC0IX7dN5f+caLxUT Ry2WbDXkzh1ayAKWaMaywFZlLssZGLFJ2cxMv8sV0K1L6xEWAc1fYVJbj8Jnt/oUIBH5 YwbPDTIM+IjCBBE8XXmcyQbfxJq6hYliah7ncoaRC4PsAz1cr3okZ/jjPcAaigI9Nxq2 Hz5d+A+qA2CPUsjgA+EUG2dtLUUE+uLNbN5QVZWnG9vOb9uBmu8i5W7l9tnQ3Td8wN6b Zzi/1QOQHeU8KDIPydazoAsRqk6S4INE2PzA3LzqLOh8tXmKZYtZ2v97+AvmJQQM/PhB wgBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=W8NCNXA4; spf=pass (google.com: domain of linux-kernel+bounces-25237-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25237-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s8-20020a0c8d48000000b0067f2bff6290si4274249qvb.62.2024.01.13.01.31.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 01:31:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25237-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=W8NCNXA4; spf=pass (google.com: domain of linux-kernel+bounces-25237-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25237-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1BC7E1C2112F for ; Sat, 13 Jan 2024 09:31:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CAA66D313; Sat, 13 Jan 2024 09:31:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="W8NCNXA4" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) (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 A553C63C3 for ; Sat, 13 Jan 2024 09:31:10 +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=1705138270; x=1736674270; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=SjTM9ZlVdC+zj2d9f7k7IlQgeOjiVf2LBGRGd/ifRbk=; b=W8NCNXA4TU5t2pLwkBNUXTYgZO2qkYVhzL2k5LYXoRYzGoMLkodETBjg CvRBv5i9cyte+wMY4HKOxsHIFnO6Jw4A8sXAx+aOhgptoVP6apjP64n5a X4+QJvtESYU93gvY3CX1Zwcc4tmLEa7TjpCYKhSknVOCANiOMjn5M/1qb R91EIaFBYQYei/eTGzJmZUEoRuMPF01K10lPzLsepKTRxEvAyroCFQ9J7 M1hJ9rD8Syy6twBB3K13PnIUkJ7neijIO1K91HPQE2Q4wEEsePDw+TPHz ca+uSOGEddxCc+gnxOFd6w95jt2YDzlOw7y83Dmn05dPtDR9in2wMUCxV A==; X-IronPort-AV: E=McAfee;i="6600,9927,10951"; a="463646410" X-IronPort-AV: E=Sophos;i="6.04,192,1695711600"; d="scan'208";a="463646410" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2024 01:31:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10951"; a="956337463" X-IronPort-AV: E=Sophos;i="6.04,192,1695711600"; d="scan'208";a="956337463" Received: from tassilo.jf.intel.com (HELO tassilo) ([10.54.38.190]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2024 01:31:09 -0800 Date: Sat, 13 Jan 2024 01:31:08 -0800 From: Andi Kleen To: Marco Elver Cc: Andrey Konovalov , Oscar Salvador , andrey.konovalov@linux.dev, Andrew Morton , 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: 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: > This function is only refilling the freelist. Readers don't see it yet > because it's in none of the hash table buckets. The freelist is only > ever accessed under the lock. > > Once an entry is allocated from the freelist, its size is overwritten > with something non-zero (since it then contains a stack trace). Those > updates are released into the right hash table bucket with > list_add_rcu() (which implies a release). > > Am I missing something else? It's probably ok semantically here, but at least I would be consistent with using the macro for a specific field. -Andi