From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751849AbdHXHbG (ORCPT ); Thu, 24 Aug 2017 03:31:06 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:44866 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751324AbdHXHbD (ORCPT ); Thu, 24 Aug 2017 03:31:03 -0400 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Thu, 24 Aug 2017 16:30:58 +0900 From: Byungchul Park To: Peter Zijlstra Cc: Dave Chinner , mingo@kernel.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Arnaldo Carvalho de Melo , Tejun Heo , Boqun Feng Subject: Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all part of PROVE_LOCKING Message-ID: <20170824073058.GG6772@X58A-UD3R> References: <1502960261-16206-1-git-send-email-byungchul.park@lge.com> <20170821154600.asyzqs2zg6w6o4pg@hirez.programming.kicks-ass.net> <20170822054603.GT10621@dastard> <20170822090603.vufl5ncoequ5ag6x@hirez.programming.kicks-ass.net> <20170822092236.GI20323@X58A-UD3R> <20170822093703.vuuxvxaytna5im33@hirez.programming.kicks-ass.net> <20170823021217.GB3108@X58A-UD3R> <20170823102048.5a6s5dbynyuv3bba@hirez.programming.kicks-ass.net> <20170824020236.GB6772@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170824020236.GB6772@X58A-UD3R> 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 Thu, Aug 24, 2017 at 11:02:36AM +0900, Byungchul Park wrote: > On Wed, Aug 23, 2017 at 12:20:48PM +0200, Peter Zijlstra wrote: > > On Wed, Aug 23, 2017 at 11:12:17AM +0900, Byungchul Park wrote: > > > > > > > We have to detect dependecies if it exists, even in the following case: > > > > > > > > > > oooooooiiiiiiiiiiiiiiiiiii......... > > > > > |<- range for commit ->| > > > > > > > > > > where > > > > > o: acquisition outside of each work, > > > > > i: acquisition inside of each work, > > > > > > > > > > With yours, we can never detect dependecies wrt 'o'. > > > > > > > > There really shouldn't be any o's when you call > > > > > > There can be any o's. > > > > Yes, but they _must_ be irrelevant, see below. > > No, they can be relevant, see below. I meant we have to detect problems like, just for example: A worker: acquire(A) process_one_work() acquire(B) crossrelease_hist_start(PROC) work_x->func() acquire(C) release(C) complete(D) crossrelease_hist_end(PROC) release(B) release(A) A task: acquire(A) acquire(B) initiate work_x wait_for_completion(D) In this case, I want to detect a problem by creating true dependencies, which are: A -> B B -> C D -> A // You are currently trying to invalidate this unnecessarily. D -> B // You are currently trying to invalidate this unnecessarily. D -> C in the worker, B -> D in the task. Crossrelease should detect the problem with the following chain: A -> B -> D -> A or B -> D -> B So, please keep my original code unchanged conceptially.