Received: by 2002:aa6:c429:0:b029:98:93ff:f56f with SMTP id g9csp3377867lkq; Mon, 23 Nov 2020 04:18:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJzB0wdUCR4LeQ7aPvYhDOVmwGd9TMrpJr9TWx7zB2IqtGJBYQyK/XKidTswj/VDRIw6fHHT X-Received: by 2002:a17:906:caa:: with SMTP id k10mr6172981ejh.204.1606133925410; Mon, 23 Nov 2020 04:18:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606133925; cv=none; d=google.com; s=arc-20160816; b=GaLewecLiFvHSwTmvpZszKA0NBOo3xwPfbUfGcQ84leF2GTTV1WiknRwuM+HMGWlcf xWomJjJ7iNnHuPKAMqXNqt5twfxgBIbJ/Xds7y6JylTFMFa0h1j4apezJZX1gHkXs4k1 bTb2MpBaiw3QtPsw399qXM0IOI/hQmBUOboVl6LMKqj5/ks31ES+MgtodJ7D5svN8+1R JpOEJbiDxrmnen9YjH9NG7WsY82HaXscDim9tLwKVNsnHcnPsHTo3gtxi31SnZaxYANn p797vdvdQTypTEP76VasOQz1z74zjs0Sk2FGNjHknU3bzInjxDwRSm7f6pIoFgvN0vsO xtjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=0j6fUeckFGdqCwLWV4HFKT9+KoQg2MEvQH9Me/FFbp4=; b=xR2ccM6IJipHArOMbQFODIMsX2C+Ak3FPm2DJO2kgVxPpTa0M5dl1mywtWj9/35JfM ynYXHiv7s9MztSBeLlHU7k80LBLaiszxJiMr9MzYWTu285t5ZSsZ6pnrUEzyi6FxV5pd MayHGgbLQuA6UbBY3rMMAnIkU7jmUki8bVGWobJ7d+0Z6YRTIfWgKlzKrkLglb26h8Ba OsvLNWw955J/RKWeNsU8TzU5M8DVhkHNlthVCNYWj7VuvjfExwjKrrKqq7VACVhSpdjN 7x2U8VAsLxkdVmVXksvO94T9dgV967C9rCtI8HLvpoOD2RFUy+FCy8QLgA1gQN/zVENv txDQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id go10si7054659ejc.656.2020.11.23.04.18.22; Mon, 23 Nov 2020 04:18:45 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729270AbgKWMQP (ORCPT + 99 others); Mon, 23 Nov 2020 07:16:15 -0500 Received: from lgeamrelo13.lge.com ([156.147.23.53]:58108 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727941AbgKWMQP (ORCPT ); Mon, 23 Nov 2020 07:16:15 -0500 Received: from unknown (HELO lgeamrelo01.lge.com) (156.147.1.125) by 156.147.23.53 with ESMTP; 23 Nov 2020 21:16:13 +0900 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: byungchul.park@lge.com Received: from unknown (HELO X58A-UD3R) (10.177.222.33) by 156.147.1.125 with ESMTP; 23 Nov 2020 21:16:13 +0900 X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Mon, 23 Nov 2020 21:14:39 +0900 From: Byungchul Park To: torvalds@linux-foundation.org, peterz@infradead.org, mingo@redhat.com, will@kernel.org Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, rostedt@goodmis.org, joel@joelfernandes.org, alexander.levin@microsoft.com, daniel.vetter@ffwll.ch, chris@chris-wilson.co.uk, duyuyang@gmail.com, johannes.berg@intel.com, tj@kernel.org, tytso@mit.edu, willy@infradead.org, david@fromorbit.com, amir73il@gmail.com, bfields@fieldses.org, gregkh@linuxfoundation.org, kernel-team@lge.com Subject: Re: [RFC] Dept(Dependency Tracker) Report Example Message-ID: <20201123121439.GD9464@X58A-UD3R> References: <20201111050559.GA24438@X58A-UD3R> <20201123111332.GC9464@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201123111332.GC9464@X58A-UD3R> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 23, 2020 at 08:13:32PM +0900, Byungchul Park wrote: > [ 0.995081] =================================================== > [ 0.995619] Dept: Circular dependency has been detected. > [ 0.995816] 5.9.0+ #8 Tainted: G W > [ 0.996493] --------------------------------------------------- > [ 0.996493] summary > [ 0.996493] --------------------------------------------------- > [ 0.996493] *** AA DEADLOCK *** > [ 0.996493] > [ 0.996493] context A > [ 0.996493] [S] __mutex_lock(&dev->mutex:0) > [ 0.996493] [W] __mutex_lock(&dev->mutex:0) > [ 0.996493] [E] __mutex_unlock(&dev->mutex:0) > [ 0.996493] > [ 0.996493] [S]: start of the event context > [ 0.996493] [W]: the wait blocked > [ 0.996493] [E]: the event not reachable Let me explain what [S], [W] and [E] mean using example: 1. In the case of typical locks: if condition a lock(&a); <- [S] start of the event context for the event, unlock(&a) [W] wait as well ... unlock(&a); <- [E] event to someone who has been waiting lock &a to be released else lock(&b); <- [S] start of the event context for the event, unlock(&b) [W] wait as well ... unlock(&b); <- [E] event to someone who has been waiting lock &b to be released 2. In the case of general wait and event: THREAD 1 trigger_the_event_context_to_go(); ... wait_for_something(&c); <- [W] wait store_timestamp(); THREAD 2 notice_someone_triggered_me(); ... (somewhere can see the timestamp of wait_for_something(&c) in THREAD 1) <- [S] start of the event context for the event, do_something(&c) ... do_something(&c); <- [E] event the wait is waiting for in THREAD 1 Thanks, Byungchul