From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751842AbdIEIUF (ORCPT ); Tue, 5 Sep 2017 04:20:05 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:40369 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751369AbdIEIUC (ORCPT ); Tue, 5 Sep 2017 04:20:02 -0400 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Tue, 5 Sep 2017 17:19:50 +0900 From: Byungchul Park To: Peter Zijlstra Cc: "tj@kernel.org" , "johannes.berg@intel.com" , "mingo@kernel.org" , "tglx@linutronix.de" , "oleg@redhat.com" , "david@fromorbit.com" , "linux-kernel@vger.kernel.org" , "kernel-team@lge.com" Subject: Re: [PATCH 3/3] lockdep: Remove unnecessary acquisitions wrt workqueue flush Message-ID: <20170905081950.GT3240@X58A-UD3R> References: <1504578554-4137-1-git-send-email-byungchul.park@lge.com> <1504578554-4137-4-git-send-email-byungchul.park@lge.com> <20170905072551.fvtxrhuo662jiwif@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Tue, Sep 05, 2017 at 04:36:18PM +0900, �ں�ö/���ӿ�����/SW Platform(��)AOT��(byungchul.park@lge.com) wrote: > > -----Original Message----- > > From: Peter Zijlstra [mailto:peterz@infradead.org] > > Sent: Tuesday, September 05, 2017 4:26 PM > > To: Byungchul Park > > Cc: tj@kernel.org; johannes.berg@intel.com; mingo@kernel.org; > > tglx@linutronix.de; oleg@redhat.com; david@fromorbit.com; linux- > > kernel@vger.kernel.org; kernel-team@lge.com > > Subject: Re: [PATCH 3/3] lockdep: Remove unnecessary acquisitions wrt > > workqueue flush > > > > On Tue, Sep 05, 2017 at 11:29:14AM +0900, Byungchul Park wrote: > > > > > Also, lock_map_acquire() in process_one_work() is too strong for that > > > purpose. lock_map_acquire_might() is enough. Replaced it. > > > > NAK!! traditional annotations are superior to cross-release. They are not > > timing dependent. > > You seem to mis-understand this. This also make them timing independent. > I also agree that we need timing independent report in workqueue code. > That's actually why I propose this patch. > > I just tried to do it in a right way. Adding insufficient comments seems to lead to mis-understand what lock_map_acquire_might() does. I will enhance it. (And might need to rename it to a better one as you pointed out in another reply.) I introduced it to give a hint to lockdep that "It's not actual acquisition but pseudo one, informing that the context might be the commit context" so that lockdep can report warnings at the real time as current code does. This hint is useful to report run time deadlocks, timing independently, but not need to be considered on commit. And the hint should be relaxed as far as possible. I just did that.