From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2C17C433E3 for ; Wed, 17 Jun 2020 00:32:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4C3E520C09 for ; Wed, 17 Jun 2020 00:32:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="CSK/ewZv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C3E520C09 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A47816B0003; Tue, 16 Jun 2020 20:32:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9F8EF6B0006; Tue, 16 Jun 2020 20:32:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 90DC56B0007; Tue, 16 Jun 2020 20:32:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0176.hostedemail.com [216.40.44.176]) by kanga.kvack.org (Postfix) with ESMTP id 798646B0003 for ; Tue, 16 Jun 2020 20:32:38 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 229C93565 for ; Wed, 17 Jun 2020 00:32:38 +0000 (UTC) X-FDA: 76936827996.15.beds50_26077d726e03 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id E6B6E1814B0C8 for ; Wed, 17 Jun 2020 00:32:37 +0000 (UTC) X-HE-Tag: beds50_26077d726e03 X-Filterd-Recvd-Size: 3956 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Wed, 17 Jun 2020 00:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Ul7ITLaJhl7BsoMKtdcDyvgigCHM96XtVRL3WZUxjm4=; b=CSK/ewZv8HSv35avMFwiF1ehwB cD9mARby3Jnsxd2q3NU3WJbfxBPOO30ro5qSxuYd1xuUmacXibygc00a8IbXIFvF7taoDFPnbpYuD DspL7NDCqcdY9m8XhgG2DT+PlJcmnkpmPylMCkguzGzZ65Dyubhcoa3OtmmWBSATkM9jl1AHXL+4t 4LA1dKT87umE7qVTpcf9AA7jo/byH2G5bi260qB7PIgEqpqUHOWSlQ/hjwPtFV4VscOSErmfVg2bp 2WpES85a2aN+/K7Swg7SVGaQfGxlW1Z8c1tR65W+NyTJdrLuyMHceQujiU5Bncj2oO0nUpIXtJDmZ 6tMkn0Mw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jlM00-0001Vc-Jp; Wed, 17 Jun 2020 00:32:16 +0000 Date: Tue, 16 Jun 2020 17:32:16 -0700 From: Matthew Wilcox To: Andreas Gruenbacher Cc: Andrew Morton , linux-xfs@vger.kernel.org, Junxiao Bi , William Kucharski , Joseph Qi , John Hubbard , LKML , linux-f2fs-devel@lists.sourceforge.net, cluster-devel , Linux-MM , ocfs2-devel@oss.oracle.com, linux-fsdevel , linux-ext4 , linux-erofs@lists.ozlabs.org, Christoph Hellwig , linux-btrfs@vger.kernel.org, Steven Whitehouse , Bob Peterson Subject: Re: [Cluster-devel] [PATCH v11 16/25] fs: Convert mpage_readpages to mpage_readahead Message-ID: <20200617003216.GC8681@bombadil.infradead.org> References: <20200414150233.24495-1-willy@infradead.org> <20200414150233.24495-17-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: E6B6E1814B0C8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Jun 17, 2020 at 12:36:13AM +0200, Andreas Gruenbacher wrote: > Am Mi., 15. Apr. 2020 um 23:39 Uhr schrieb Matthew Wilcox : > > From: "Matthew Wilcox (Oracle)" > > > > Implement the new readahead aop and convert all callers (block_dev, > > exfat, ext2, fat, gfs2, hpfs, isofs, jfs, nilfs2, ocfs2, omfs, qnx6, > > reiserfs & udf). The callers are all trivial except for GFS2 & OCFS2. > > This patch leads to an ABBA deadlock in xfstest generic/095 on gfs2. > > Our lock hierarchy is such that the inode cluster lock ("inode glock") > for an inode needs to be taken before any page locks in that inode's > address space. How does that work for ... writepage: yes, unlocks (see below) readpage: yes, unlocks invalidatepage: yes releasepage: yes freepage: yes isolate_page: yes migratepage: yes (both) putback_page: yes launder_page: yes is_partially_uptodate: yes error_remove_page: yes Is there a reason that you don't take the glock in the higher level ops which are called before readhead gets called? I'm looking at XFS, and it takes the xfs_ilock SHARED in xfs_file_buffered_aio_read() (called from xfs_file_read_iter). Not that after -rc1 is a great time to be upending the locking model in a filesystem ... but then, this has been baking in -mm for ten weeks and the GFS2 mailing list has been on the cc for the patches for five months, so I don't have a lot of sympathy for this.