From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752736AbdHVFOs (ORCPT ); Tue, 22 Aug 2017 01:14:48 -0400 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:44337 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751043AbdHVFOr (ORCPT ); Tue, 22 Aug 2017 01:14:47 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Tue, 22 Aug 2017 14:14:38 +0900 From: Byungchul Park To: Peter Zijlstra Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Arnaldo Carvalho de Melo , Dave Chinner , Tejun Heo , johannes@sipsolutions.net Subject: Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all part of PROVE_LOCKING Message-ID: <20170822051438.GD20323@X58A-UD3R> References: <1502960261-16206-1-git-send-email-byungchul.park@lge.com> <20170821154600.asyzqs2zg6w6o4pg@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170821154600.asyzqs2zg6w6o4pg@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 21, 2017 at 05:46:00PM +0200, Peter Zijlstra wrote: > Now given the above observance rule and the fact that the below report > is from the complete, the thing that happened appears to be: > > > lockdep_map_acquire(&work->lockdep_map) > down_write(&A) > > down_write(&A) > wait_for_completion(&C) > > lockdep_map_acquire(&work_lockdep_map); > complete(&C) > > Which lockdep then puked over because both sides saw the same work > class. > > Byungchul; should we not exclude the work class itself, it appears to me > the workqueue code is explicitly parallel, or am I confused again? Do you mean the lockdep_map_acquire(&work->lockdep_map) used manuallly? That was introduced by Johannes: commit 4e6045f134784f4b158b3c0f7a282b04bd816887 "workqueue: debug flushing deadlocks with lockdep" I am not sure but, for that purpose, IMHO, we can use a lockdep_map_acquire_read() instead, in process_one_work(), can't we?