Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp104176ybt; Tue, 16 Jun 2020 17:59:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9tSa0w5pxu+rJcngq1m4I8HiGk/MquoYT9ngnG99OP7daNhCu0xsHs9peNPRHx/lTZQp3 X-Received: by 2002:a17:906:1f0d:: with SMTP id w13mr5495768ejj.0.1592355584520; Tue, 16 Jun 2020 17:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592355584; cv=none; d=google.com; s=arc-20160816; b=Yk4VqVb6DXqNkmdVCYb0ZHJ+1/i3CAvQtpecNIhrJhrbm+CpiBMrFJPAM7HqSMJXr8 6Sw8VXPRSFLUL1c7/2t2mxt6pgkg2n1X4beIW/gdNn9UCVdsq7Xdb8yg3t/hYTa9JoKX iR7bNYynpUlPzRBrgoBsguB65W0PLy0T3EJIREeIqip5WudQIiYhyLhfAIHzAlWaM6y7 phnNlVZbuKNrKD/qnHgoqaojY/clBB7p+JIa1JiKBDFlIVzESdYBoz4KTCQaITc8XDs/ xgQZdzpZ1rg17qpI0PwCr+e1Npe8Dp1Rz7zRoOf2oaheD0YK68gbfGpUWkXouZBmBQ7u GS0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pEQnZOnPBJbDchwbmEUUZLW0wYE5G6XsMaI0bdt7ET4=; b=Ui/v3pFuVFzrAsjau6+C2XRhksOFaEfvxQu383nBl4kZuuPKLsAHl48pSU5By06Ok4 wGBMaVKC5qbcqoeQyDu7/9/+79iqS0cixEFBkR254QllwPhG+DiXBTZtlRaPz/QUcMji 6XnCm4oY/uE0UfiytLrvkvsyTsUgZbojT5KVbA8zoPno9KeBeEmYjHe/dTZI/ABdfiic NrIOswPUvfRtXhCPoYXjAl+icReqpBBR8KbV88n19lzdux+O+TmE2PJUrnwd//HDwNGq nGCl4lwcE9u7VTlbtsxGuBBGRVTO0spqbTAxyaKo7kZU5Vn5795FAPheSWucKBQ+zy48 wLCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Tgh6zIu9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si12669017ejx.291.2020.06.16.17.59.20; Tue, 16 Jun 2020 17:59:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Tgh6zIu9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726603AbgFQA52 (ORCPT + 99 others); Tue, 16 Jun 2020 20:57:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725894AbgFQA52 (ORCPT ); Tue, 16 Jun 2020 20:57:28 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1CC9C061573; Tue, 16 Jun 2020 17:57:26 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id r2so791000ioo.4; Tue, 16 Jun 2020 17:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pEQnZOnPBJbDchwbmEUUZLW0wYE5G6XsMaI0bdt7ET4=; b=Tgh6zIu9SlKqTUKI4lExwCDwAAHFKxlTCElshDvOm1mn12iYD4/DlZalieO/RImp9r LOfdrsTqINnmMIAwC9mdceqa/wMyw0Auk9KnlvF4RPcnGvBFJBKHV1DcaOHVsC8ZJlyj EWU6xc0nQ7onqRbgGSdDKr9j6yTVOkffRg7YhoJMYTrD0VbKc2wSWqiWF1vx5t2+TlDQ 0H1Q/EcYDHCiJ7V1yZRhtkqBnN46jbkGbvZxmeW2dZ9q6NUSkrxTmZ4rnGe1GGysIgBd ew/2hyGURcasW9W+HnGwp+PirW2QERWh+ZXINj7JdG6J0FXvqGEWoCoh1SMLGG1V6Vsg vn8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pEQnZOnPBJbDchwbmEUUZLW0wYE5G6XsMaI0bdt7ET4=; b=dr63b/chJ9Ht1/HDhgRhT+zPsC93xJ+ayWjqDxq6CgF4YvrZKO2sg/xuGgrlcLTKM9 0Zq/d/gRBAzwaDOq6zDZh7MWt7KPkZTacg/xVIp9S26ovBCEPp3BlCTFiHOzRcrKy8nM tS+SCyX14ZVkXSVxjxUmaZD2/Ryi7nfJMF3MzWs6S0iP3nTCqfCfenP2FPDm98hBDM+t uk8YG1Yj1N4GcPYBUdhz+pPQwkr7hg8R9okESFp6Ft0W5gK5kdd/oiZFD/pKI5jMWVRS VR0KYiFuHGrqDMKroGyaFW8UKqvCVutTIOGxikTTU0PE5bZ8l4y9tUUgV7wBY9ZjGEXd Fv7A== X-Gm-Message-State: AOAM531UNKSGIm7ypEQJTx/lD8pWGtFpoMm6DaO59QldEdrNwkqv7G6+ 6mmnuFhHVniT621Fk8bBoVI+/uwOrmO/z46AoGU= X-Received: by 2002:a5d:9413:: with SMTP id v19mr5708100ion.105.1592355445894; Tue, 16 Jun 2020 17:57:25 -0700 (PDT) MIME-Version: 1.0 References: <20200414150233.24495-1-willy@infradead.org> <20200414150233.24495-17-willy@infradead.org> <20200617003216.GC8681@bombadil.infradead.org> In-Reply-To: <20200617003216.GC8681@bombadil.infradead.org> From: =?UTF-8?Q?Andreas_Gr=C3=BCnbacher?= Date: Wed, 17 Jun 2020 02:57:14 +0200 Message-ID: Subject: Re: [Cluster-devel] [PATCH v11 16/25] fs: Convert mpage_readpages to mpage_readahead To: Matthew Wilcox Cc: Andreas Gruenbacher , Andrew Morton , linux-xfs , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mi., 17. Juni 2020 um 02:33 Uhr schrieb Matthew Wilcox : > > 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). Right, the approach from the following thread might fix this: https://lore.kernel.org/linux-fsdevel/20191122235324.17245-1-agruenba@redhat.com/T/#t Andreas