Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1324110pxk; Thu, 10 Sep 2020 12:30:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF2ahRhXOtoFdvhCBfE8Pdc46xcM5nw7h4E9rg9ihVKufFGBnOqsK7VkRjFZ5Pnhu1XjyA X-Received: by 2002:a50:ab1d:: with SMTP id s29mr11457453edc.246.1599766257166; Thu, 10 Sep 2020 12:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599766257; cv=none; d=google.com; s=arc-20160816; b=SsNUjh0C57A2hk97ucJ+KguRiqCv2IqLHC+aKt0KaN1AYDUB1t+z0QWoLBjilVY6iS 90MdEmVSV/pQKKTHV23VW7gEEXdnmMM3qqDzDrMKUkGs+fk4SWl0kjIkP2QGno9h2vf/ eniL535sFkx3Fjd+mqA2QCLCMPHb3r39ou+ZfciCVIGhOlSmDXrdxJc+95o8agkid9Ze mMis1z9RWng4jeFNaMv/sVrpNilnXyllGZbUbGB4tqv47/yjj/aazDrsKlk9y7MqJCJT SWjnh05Jp8mgiqKLYg+ZiNpF/Wxad8cwk0praibFrBQT2OFQ0QxT5tP4s1IKu7zrjnWF 6XiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=HIqSlBM5m5tgXp5bs0+fPyqW4eg6ui/UC5UO14epl3s=; b=EU14TCoFGEpm0CIXRy5zXk6S4xlU82RNF/Ua+BrsIT9vcVpdXtLl4PqPn0/CHc+//I o4b/C4k6vgw8NQ4CYOQvaAmJHN0fsAbRqNnUPyuK+FiZC/35dva8WOo1o1DFdEdjSRtm hus+dVICtTxIfHDWoDMtRU35ld3f3YqiblNxjVjiS0UMAi5Z2XKkG9lqECs49MaZsW9R L2HIUPIAYGnLAEUav/Y+XBi+dcJSir+CAU3MMXVpJfpKxiwPDXDJ+GB56QgD8bjBWNTT +7G41bSQj6vlsFe6SMMaYn8RD+UZQARiFdilBtwZniHT7dHiEk4S9iUmCeXb/b/VlkEy Vr9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=nbDL8Htn; dkim=neutral (no key) header.i=@vger.kernel.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si4288484edf.578.2020.09.10.12.30.34; Thu, 10 Sep 2020 12:30:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=nbDL8Htn; dkim=neutral (no key) header.i=@vger.kernel.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725951AbgIJT2R (ORCPT + 99 others); Thu, 10 Sep 2020 15:28:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731413AbgIJPsR (ORCPT ); Thu, 10 Sep 2020 11:48:17 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 091C3C06134F; Thu, 10 Sep 2020 08:08:29 -0700 (PDT) Date: Thu, 10 Sep 2020 15:08:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1599750507; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HIqSlBM5m5tgXp5bs0+fPyqW4eg6ui/UC5UO14epl3s=; b=nbDL8HtnCHJ9RwqMV1du7VKQKsuDeWwJf4Y2OR3XGJdSBZ8vaBP/4BxBPSw9XnFV0LI4F7 LDyfG6aCjJEVYqVR180R/p9oCiaNvXegZepP8DyUZyBcmfmaI08NCCw9sAh4j8PnL9STIu AKWt80DqM8wy4yxVIx9XFiWEriVbaQO78akWYjeOvQ8Sn1w5KQKaqm40UhZ5RQUqY/cGvZ DcT6l0cu+fkvHzz8F6pxBspCQDVK74RbnEHiu9YlajDgh+ZIsvA87NC8tx9eeEAVx5oFV2 WNm7kU01+5mowueM9stobrEHwb6ETyLiWQsFE3/Fkg1TzO1oZ76bx3B5cWGfAw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1599750507; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HIqSlBM5m5tgXp5bs0+fPyqW4eg6ui/UC5UO14epl3s=; b=THZq6iK77vEbIteolIsWT3+Q2L/dBN8GPR7HaRLnI2Qgf+HSTgDqWWXDTfl60GdLypDAI9 ZxfBcmPqhTFEa5DA== From: "tip-bot2 for Ahmed S. Darwish" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] rbtree_latch: Use seqcount_latch_t Cc: "Ahmed S. Darwish" , "Peter Zijlstra (Intel)" , x86 , LKML In-Reply-To: <20200827114044.11173-8-a.darwish@linutronix.de> References: <20200827114044.11173-8-a.darwish@linutronix.de> MIME-Version: 1.0 Message-ID: <159975050648.20229.11045619138069270549.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the locking/core branch of tip: Commit-ID: 24bf401cebfd630cc9e2c3746e43945e836626f9 Gitweb: https://git.kernel.org/tip/24bf401cebfd630cc9e2c3746e43945e836626f9 Author: Ahmed S. Darwish AuthorDate: Thu, 27 Aug 2020 13:40:43 +02:00 Committer: Peter Zijlstra CommitterDate: Thu, 10 Sep 2020 11:19:29 +02:00 rbtree_latch: Use seqcount_latch_t Latch sequence counters have unique read and write APIs, and thus seqcount_latch_t was recently introduced at seqlock.h. Use that new data type instead of plain seqcount_t. This adds the necessary type-safety and ensures that only latching-safe seqcount APIs are to be used. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200827114044.11173-8-a.darwish@linutronix.de --- include/linux/rbtree_latch.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/rbtree_latch.h b/include/linux/rbtree_latch.h index 7d012fa..3d1a9e7 100644 --- a/include/linux/rbtree_latch.h +++ b/include/linux/rbtree_latch.h @@ -42,8 +42,8 @@ struct latch_tree_node { }; struct latch_tree_root { - seqcount_t seq; - struct rb_root tree[2]; + seqcount_latch_t seq; + struct rb_root tree[2]; }; /** @@ -206,7 +206,7 @@ latch_tree_find(void *key, struct latch_tree_root *root, do { seq = raw_read_seqcount_latch(&root->seq); node = __lt_find(key, root, seq & 1, ops->comp); - } while (read_seqcount_retry(&root->seq, seq)); + } while (read_seqcount_latch_retry(&root->seq, seq)); return node; }