Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp239707img; Mon, 18 Mar 2019 01:58:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqybRbVTjHYF8WUFPw65qVjBlCeUWkHv8Nwf9P66hi1eAggIbHyAg6v0pjVEz/UbxmOrR+Mp X-Received: by 2002:a63:6e8d:: with SMTP id j135mr16578745pgc.160.1552899521181; Mon, 18 Mar 2019 01:58:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552899521; cv=none; d=google.com; s=arc-20160816; b=p+ExQep9RfRtx3gGPxyrFKKxTY9/asJ4pdl5tFMX7LxcleQdQ13cRFMflvZgv7umgZ Vd0FHMChSnTva3PpI5RcMSLcfkxRxHyXRUvurVeK5CqiyQjlxBbKVKFa/ie4nZyLQYhz pccAY6INyDyS1CCyKg1YColJqwvXK7WKLaved98XPeUH2kBxIBScOkwRPt9jFGtnI+nB Amb0jRpUadzyCM7EpaguZ+I4ansaHJz+c+BzBJQ9aO30/pd7S0+C/DQ2vQzDjaowISmq Pxt5ZMERCtRBU1L73PNgKQ6Z5zVbbOwfGxb3WPlFhJ1AKbdln8HxfGVJnx+AVvJgZgTL UZIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=xdhJJTOmLFcIyR3G22o8Q4zyTp0bAohpDv+K4rQQaFo=; b=il1INKmfMrvPEliVDi0HO9uxX6LYEe3REJ2+6E/cGVLFuDcuO3venI2WDyvMWsWnSc 7PtRSfIb7cOAvX5cZgNLka1LxPYooHtyNZujivis/wei+aomowoUcaUJJPOvZMsCh5sb QH3SVnm/wRqLRUeuUD+FKATkaleE4SKvoGo0syoJgdXjaLHB8sgbdouNDst/H7dqDVoT oV6lHAZE+NENH80x8I3zhSyJk0FS2yJPBZSyrziUghD0FQ1qK97DgKiG0lp8vl1FYyEn Pz6wQuvX/zrvn1mmtmX8PXHoDEg3k6sIDnZe0Lwn2i1rmUnu65rcnRu6p22iBODkqggR 0MgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OtZw4YS4; 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 z9si8072970pgv.265.2019.03.18.01.58.25; Mon, 18 Mar 2019 01:58:41 -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=OtZw4YS4; 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 S1726983AbfCRI5p (ORCPT + 99 others); Mon, 18 Mar 2019 04:57:45 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:35709 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbfCRI5o (ORCPT ); Mon, 18 Mar 2019 04:57:44 -0400 Received: by mail-pf1-f193.google.com with SMTP id j5so10825948pfa.2 for ; Mon, 18 Mar 2019 01:57:44 -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; bh=xdhJJTOmLFcIyR3G22o8Q4zyTp0bAohpDv+K4rQQaFo=; b=OtZw4YS4WDOKxIugvIKPCAdJmHXvn0iS4oHGoqCqiPtQUtEf82jK/35uCCnUc3fWmK 4Tf47nzan+rTOs1r98BuTft9QYSQaLkki1u3bgODMKyyCL2w0R8O7LAvH73+/awB1Cjv lfwetqpaOOwG8xzSku1wwRchWxOS1685yomZf/wNoYOfMfdTDspYxL/pXOQXAvYBUgWk sEF8B/ZB69UbP+tltNoYqnK8rS5DgpnKZOaMQeSTGEtXe1Pmd8R5sTqTCOuK2XUA5Epm 7vjP+CWFjbL6fsIBIKHL+a3ej9Rj7gtWGss6/jg1T/U6RlAEYMCScbmhnsz1HP7AtVw0 TcGg== 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; bh=xdhJJTOmLFcIyR3G22o8Q4zyTp0bAohpDv+K4rQQaFo=; b=YfK4ld9z3bHsjBq3TyU485rFknrBjMiyhz6l8/+1H7za6dnqtud/P/jgQVLzBdDVbu OuRVaUNj3hQ7625v14b5uBjhOGQh/gTyM+u493QhASRex/P2phUNaZGHa7SE/b3OsjhV dCjM+OJIxaW+DA4mrc3Zmy4fHznbLbrzkRzJLBYmdcUzgFgJY3Vm+0y2V5xMelD3X653 p//BdrKJcFtsy6r7n9AZGYLp1abQj/+pcx+rwsm149cN6ktyXojvcANiX9tNUhsW3bej JQOL4A2xju6fFqlO43ium7XHLqykxhONl2QRvph+NTL4JqkPKBdcTbvq3Skjg/1D4/d2 1n4g== X-Gm-Message-State: APjAAAUGm3PCYIKjm1D61B3KsKytwGdqwzVCtMbz0iCZ7J0otYcBJ7wA tckYQPvPOLp7WbrrE8MxymE= X-Received: by 2002:a17:902:b097:: with SMTP id p23mr18611408plr.36.1552899463784; Mon, 18 Mar 2019 01:57:43 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id k8sm11147024pgq.37.2019.03.18.01.57.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 01:57:43 -0700 (PDT) From: Yuyang Du To: peterz@infradead.org, will.deacon@arm.com, mingo@kernel.org Cc: bvanassche@acm.org, ming.lei@redhat.com, linux-kernel@vger.kernel.org, Yuyang Du Subject: [PATCH v2 00/19] locking/lockdep: Add comments and make some code Date: Mon, 18 Mar 2019 16:57:14 +0800 Message-Id: <20190318085733.3143-1-duyuyang@gmail.com> X-Mailer: git-send-email 2.17.2 (Apple Git-113) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, I recently looked at some system hang issues. While at it, I tried to use and understand lockdep. These patches are made as a result. I believe they should have helped me, so hopefully they do for others as well. Change from v1: - Rebased the patch series. - Added more no-functional-change patches. - Removed zapped locks in lock chains printing patch, which was a band-aid. The real problem was recently fixed by Bart. Thanks, Yuyang -- Yuyang Du (19): locking/lockdep: Change all print_*() return type to void locking/lockdep: Add description and explanation in lockdep design doc locking/lockdep: Adjust lock usage bit character checks locking/lockdep: Remove useless conditional macro locking/lockdep: Adjust indents for function definitions locking/lockdep: Print the right depth for chain key colission locking/lockdep: Update obsolete struct field description locking/lockdep: Use lockdep_init_task for task initiation consistently locking/lockdep: Define INITIAL_CHAIN_KEY for chain keys to start with locking/lockdep: Change the range of class_idx in held_lock struct locking/lockdep: Remove unused argument in validate_chain() locking/lockdep: Update comment locking/lockdep: Remove unnecessary function pointer argument locking/lockdep: Change type of the element field in circular_queue locking/lockdep: Remove __cq_empty() locking/lockdep: Use function pointer to avoid constant checks locking/lockdep: Combine check_noncircular and check_redundant locking/lockdep: Update comments on dependency search locking/lockdep: Change if to else-if when checking bfs errors Documentation/locking/lockdep-design.txt | 89 +++-- include/linux/lockdep.h | 26 +- init/init_task.c | 2 + kernel/fork.c | 3 - kernel/locking/lockdep.c | 573 +++++++++++++++++-------------- kernel/locking/lockdep_internals.h | 1 + 6 files changed, 391 insertions(+), 303 deletions(-) -- 1.8.3.1