Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3068969ybd; Fri, 28 Jun 2019 02:16:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJcsWW+2kHanoox24rqbQ1No8BJrDOl4biW1/IVlVprRAY0QB+4sF4GYoXa8cnPDDjSCYv X-Received: by 2002:a63:f64a:: with SMTP id u10mr8378798pgj.329.1561713416889; Fri, 28 Jun 2019 02:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561713416; cv=none; d=google.com; s=arc-20160816; b=0+MNJgtnC3sX1r4lmFcqfriUwUOk9e534EEJeodEPYRcO2tMXJYRAm+9W4SHtQfKtF 1ZcnNuMhrCmpfX3IMhkNmoNpewBGWu1dOMTBODmMnojvGQg3zj0LQfWlK8LIV1id7O2O FG6vuR1eoaoMWQCxII0gGpiikZYT1Vp+5/uy91Gnflkq1jtR4mkJ0Jya4ZMEQp9lxc25 +YuY9M9jxm7yx/hZg3iDYXD++lyuGH1Pi/JiNIofbPFizJ5neMnisnG/9DTmqfWvWvD8 a3J40yjYGg3kiAjlhxWLlJQblwiq6zXniye3EEKKcC0G4DKZFKZk4k/Blh+i3c+IkAM/ 3iPQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U2NFwEWgovxdDn8KDS0qdM/VAyPpaQz3ev0Lm2DlrSI=; b=gkNzA1OuruqlN2uQ/SzNKM61fHr8w3GsyWdYtOzd2UgdtXaMPHVQV7VPecEg84a6ey psNNt7Bnvk4Diwffb10nl5pJSvWWsiMxCeIsKyCn8XCjjhM3ewf359drVmR7kF78z4Cf SV8RKgFCn1nyXuhZ/AEoF8jFz/GO0v1oyoFPQWzBt5Sxh/TnQkzwlW1HfC95M8QLdpha c154IyipkPN117OduqIY3DA2VoXplZtGCTt6EEbp6t970C/AQJI0nnapSFxc6oc1Wr+r aMdp8Cc6XQUpnN5dpWjtg3VodwG9JbZhAmCztHKnowS8SocDJaQUaig4t8XIwAElwwxy AQYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VH6XhvgX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o23si2053832pfp.131.2019.06.28.02.16.41; Fri, 28 Jun 2019 02:16:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VH6XhvgX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726842AbfF1JQL (ORCPT + 99 others); Fri, 28 Jun 2019 05:16:11 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:44077 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726823AbfF1JQL (ORCPT ); Fri, 28 Jun 2019 05:16:11 -0400 Received: by mail-pg1-f193.google.com with SMTP id n2so2308080pgp.11 for ; Fri, 28 Jun 2019 02:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U2NFwEWgovxdDn8KDS0qdM/VAyPpaQz3ev0Lm2DlrSI=; b=VH6XhvgXbAd1/glp+Hat69Dz0KRejir33Y4ThaqGpXvoaj+uZHuzth8AuqG2X2Oves u6cjUlZEVYzosIBg0HPUF2/T8ZHIsxm9oV1Tiz4sQ4bml0fQutl2cswKWDBvQFHiUu2b wDYoQDHK8NUfbEN/h6XSntg7SnNKl29PQUxbclw2HQacpW42OjQ/ULssVnNUDZldnmqN xVqeJPHMM51o8Ez9KGCXRVXn+VxjTQgCJWgcMzPXMLINHAxNE8yw/uc7eYFE+jF6EV1i 8FswlILgd6LFoyAxJieuFcgPvC2uCKALOxYt0M2oG60A57hh0ZBJRSFwzK4UB5wuPPut pcjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U2NFwEWgovxdDn8KDS0qdM/VAyPpaQz3ev0Lm2DlrSI=; b=mDHLj3w7vIse3xTwErK19TdVUpdIpaYGfI0fzh3SMpNUq7CQKN+NspPAj2hduWYZ6y EfCE0LXn+Vs5UUEL+XslKH9A6KGmBTDNk3XTDf4L59KqMVSUBYdzyuIxT1kxDdzPDkM0 NYvWQrUEnpDTsRrP/8GkF2zBgjRfdPHmZJc7FxTqNsEzYuEDKkrJluDncKXlqHwNaGBz WryLQJxpOP96xz42eN7Me3byUieT3HqeCKA9mdHvlHALNPzRMGdI7odmePcum9lL/0Gc Tn0t1J1lart7wP0K/bA5ItNjDvTJdhIRsJDHBscVh2o7vikB08/Ti14Ut+5seo0ent7N k5Nw== X-Gm-Message-State: APjAAAV28tMj8/yJG0t/x13bHDs0Lm1M9ZbEBp4ASaksbtCwk4aoUK2T OlsBYqT+//VJNUbEsvwLeec= X-Received: by 2002:a65:50c3:: with SMTP id s3mr8182011pgp.177.1561713370679; Fri, 28 Jun 2019 02:16:10 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id x65sm1754521pfd.139.2019.06.28.02.16.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jun 2019 02:16:10 -0700 (PDT) From: Yuyang Du To: peterz@infradead.org, will.deacon@arm.com, mingo@kernel.org Cc: bvanassche@acm.org, ming.lei@redhat.com, frederic@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, longman@redhat.com, paulmck@linux.vnet.ibm.com, boqun.feng@gmail.com, Yuyang Du Subject: [PATCH v3 06/30] locking/lockdep: Update comments in struct lock_list and held_lock Date: Fri, 28 Jun 2019 17:15:04 +0800 Message-Id: <20190628091528.17059-7-duyuyang@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190628091528.17059-1-duyuyang@gmail.com> References: <20190628091528.17059-1-duyuyang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The comments regarding initial chain key and BFS are outdated so update them. Signed-off-by: Yuyang Du --- include/linux/lockdep.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 3c6fb63..5e0a1a9 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -198,8 +198,7 @@ struct lock_list { int distance; /* - * The parent field is used to implement breadth-first search, and the - * bit 0 is reused to indicate if the lock has been accessed in BFS. + * The parent field is used to implement breadth-first search. */ struct lock_list *parent; }; @@ -242,7 +241,7 @@ struct held_lock { * as likely as possible - hence the 64-bit width. * * The task struct holds the current hash value (initialized - * with zero), here we store the previous hash value: + * with INITIAL_CHAIN_KEY), here we store the previous hash value: */ u64 prev_chain_key; unsigned long acquire_ip; @@ -261,12 +260,12 @@ struct held_lock { /* * The lock-stack is unified in that the lock chains of interrupt * contexts nest ontop of process context chains, but we 'separate' - * the hashes by starting with 0 if we cross into an interrupt - * context, and we also keep do not add cross-context lock - * dependencies - the lock usage graph walking covers that area - * anyway, and we'd just unnecessarily increase the number of - * dependencies otherwise. [Note: hardirq and softirq contexts - * are separated from each other too.] + * the hashes by starting with a new chain if we cross into an + * interrupt context, and we also keep not adding cross-context + * lock dependencies - the lock usage graph walking covers that + * area anyway, and we'd just unnecessarily increase the number + * of dependencies otherwise. [Note: hardirq and softirq + * contexts are separated from each other too.] * * The following field is used to detect when we cross into an * interrupt context: -- 1.8.3.1