From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7E7D240963A for ; Fri, 21 Aug 2026 19:26:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787340414; cv=none; b=qFc3fJGcYOgIyMy3YuSn0Oi81CPd5tkF02DWYZhQwCjEpTVQ51y2VSz6SVLGGHLfKOA4SOxkMG3Pb3vbABVPAVaRVqhg1IVoHSX1OZHmRxNCqnFdqQgm2UW1nnwb3LIgKKtLdNfL5j4pFrMM7EA11Wvws/U1zMVsazyIUsw7o1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787340414; c=relaxed/simple; bh=HP0oabb2PuRtnBtAJlq0lKSudTEcFbZexjPIPDalle8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=prhIgYepgWPquv3ycAB9t4txDaFlfxlFfLNcOdsOkDqwJsj6UeMvddLWRveiHizpDYdx19NtKZEH17y7UHEI6ARBzVNhBdMJc9iBLMUFn8pEZi3hFu0+4ISK8aYT1Ax1CbS95fhP+DwPRGX+YjiZhdbdRYVSHZT6Nt6AHjyTVYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Nlo7RAsv; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Nlo7RAsv" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=HuCMNZFX29nK0huvkCpXKIwQOO+TOzQ1a8HPZnuSBHE=; b=Nlo7RAsvW5ogeTKJalkhOFmKuB ax+0nGH4da5jAqa2xbz7XC2xHJ37nXGZINH9wOLcfo1VyP6PugLCkoD4Sij3tKpgHd9dArPZDNs3O QKqzR12bwjSGrzc/uT0cpz0ia5p9CRp1nWZ3b6anlMMnZXkSJuBt9az4aFB8o/z9jHgfHUlYtqjeA UBnbYE/mV2CG1yWAigrkIcc9fB6gNubXSyAzATrz5+7JgB8IPNCibXL8DD958MIxGAOe/ikjKwPXr Yn8eaWu3VPvx9ob6OEi/mOzL7hIzTnCyIM3gaBRX4+u0lHH6X8RcTJy9/aVtKGVvfXpbMY2M7IxBt Fyywh4eA==; Received: from [38.23.173.23] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wxUtA-0000000E0kA-3G8m; Fri, 21 Aug 2026 19:26:52 +0000 From: "Liam R. Howlett (Oracle)" To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, "Liam R. Howlett (Oracle)" Subject: [PATCH v3 08/19] maple_tree: Use prefetched value in mas_wr_store_type() Date: Fri, 21 Aug 2026 15:26:16 -0400 Message-ID: <20260821192627.4085470-9-liam@infradead.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260821192627.4085470-1-liam@infradead.org> References: <20260821192627.4085470-1-liam@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The slot contents exist in wr_mas->content, which has less overhead than reading the slot again. Signed-off-by: Liam R. Howlett (Oracle) --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index baaaa128594c2..d5fa85bc7aab0 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3280,7 +3280,7 @@ static inline void mas_wr_slot_store(struct ma_wr_state *wr_mas) void __rcu **slots = wr_mas->slots; bool gap = false; - gap |= !mt_slot_locked(mas->tree, slots, offset); + gap |= !wr_mas->content; gap |= !mt_slot_locked(mas->tree, slots, offset + 1); if (wr_mas->offset_end - offset == 1) { -- 2.47.3