From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751526AbdCBXvU (ORCPT ); Thu, 2 Mar 2017 18:51:20 -0500 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:54746 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbdCBXu7 (ORCPT ); Thu, 2 Mar 2017 18:50:59 -0500 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 165.244.249.23 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Fri, 3 Mar 2017 08:50:03 +0900 From: Byungchul Park To: Matthew Wilcox CC: "'Peter Zijlstra'" , , , , , , , , , , , Subject: Re: [PATCH v5 06/13] lockdep: Implement crossrelease feature Message-ID: <20170302235003.GE28562@X58A-UD3R> References: <1484745459-2055-1-git-send-email-byungchul.park@lge.com> <1484745459-2055-7-git-send-email-byungchul.park@lge.com> <20170228181547.GM5680@worktop> <20170302042021.GN16328@bombadil.infradead.org> <004101d2930f$d51a9f90$7f4fdeb0$@lge.com> <20170302143949.GP16328@bombadil.infradead.org> MIME-Version: 1.0 In-Reply-To: <20170302143949.GP16328@bombadil.infradead.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB02/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/03 08:50:18, Serialize by Router on LGEKRMHUB02/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/03 08:50:18, Serialize complete at 2017/03/03 08:50:18 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 02, 2017 at 06:39:49AM -0800, Matthew Wilcox wrote: > On Thu, Mar 02, 2017 at 01:45:35PM +0900, byungchul.park wrote: > > From: Matthew Wilcox [mailto:willy@infradead.org] > > > On Tue, Feb 28, 2017 at 07:15:47PM +0100, Peter Zijlstra wrote: > > > > (And we should not be returning to userspace with locks held anyway -- > > > > lockdep already has a check for that). > > > > > > Don't we return to userspace with page locks held, eg during async > > > directio? > > > > Hello, > > > > I think that the check when returning to user with crosslocks held > > should be an exception. Don't you think so? > > Oh yes. We have to keep the pages locked during reads, and we have to > return to userspace before I/O is complete, therefore we have to return > to userspace with pages locked. They'll be unlocked by the interrupt > handler in page_endio(). Agree. > Speaking of which ... this feature is far too heavy for use in production > on pages. You're almost trebling the size of struct page. Can we > do something like make all struct pages share the same lockdep_map? > We'd have to not complain about holding one crossdep lock and acquiring > another one of the same type, but with millions of pages in the system, > it must surely be creating a gargantuan graph right now? Um.. I will try it for page locks to work with one lockmap. That is also what Peterz pointed out and what I worried about when implementing.. Thanks for your opinion.