From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00190b01.pphosted.com ([67.231.149.131]:52194 "EHLO mx0a-00190b01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751031AbdLAWfZ (ORCPT ); Fri, 1 Dec 2017 17:35:25 -0500 Subject: Re: waitqueue lockdep annotation To: Christoph Hellwig Cc: Andrew Morton , Ingo Molnar , Peter Zijlstra , Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171130142037.19339-1-hch@lst.de> <20171130125050.1faba3f06fc572846f792f17@linux-foundation.org> <20171130221126.GA31795@lst.de> <21c34413-d178-fda0-91b2-6ab02c6d5a06@akamai.com> <20171201171102.GA20072@lst.de> <57869c0c-764c-ff99-93cd-8020f8ceea9e@akamai.com> <20171201220239.GA32542@lst.de> From: Jason Baron Message-ID: <2fd9dc6b-9201-67db-b81e-a783daf0ce50@akamai.com> Date: Fri, 1 Dec 2017 17:34:50 -0500 MIME-Version: 1.0 In-Reply-To: <20171201220239.GA32542@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 12/01/2017 05:02 PM, Christoph Hellwig wrote: > On Fri, Dec 01, 2017 at 02:00:33PM -0500, Jason Baron wrote: >> You could leave the annotation and do something like: >> s/ep->lock/ep->wq->lock. And then that would remove the ep->lock saving >> a bit of space. > > Looks like this isn't going to work due to ep_poll_safewake taking > another waitqueue lock. If we had a strict lock order it might work, > but the mess in ep_call_nested makes me fear it doesn't. > hmmm...I'm not sure how this suggestion would change the locking rules from what we currently have. Right now, we use ep->lock, if we remove that and use ep->wq->lock instead, there is just a 1-to-1 mapping there that has not changed, since ep->wq->lock currently is completely not being used. Thanks, -Jason