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.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 E6B0DC433E1 for ; Tue, 16 Jun 2020 22:36:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BBD7F207E8 for ; Tue, 16 Jun 2020 22:36:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cGmxIWLF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726464AbgFPWg3 (ORCPT ); Tue, 16 Jun 2020 18:36:29 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:39051 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725849AbgFPWg2 (ORCPT ); Tue, 16 Jun 2020 18:36:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592346987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pjA7zgwqv80y4xmAR3IWOMUOAyE53XKax4l1DtqqEck=; b=cGmxIWLFerDvmbXx9wGIMeV5qMwmY3+Vdf3tc8EjWZawWwMkXzWRwUX2wIM+hUs+ubjH9r JbpnGLG9iGe8fL6LRrD9HPxPCIXKXVSMkNvTKSv3KYw+hKuxH565kv4Omy8lEWJn7ZZHyl Rk2uAlwgeRwCQ2AYEdLUaShoAbHpLig= Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-97-_cbEhZjWPUuQP27xhSIg_g-1; Tue, 16 Jun 2020 18:36:25 -0400 X-MC-Unique: _cbEhZjWPUuQP27xhSIg_g-1 Received: by mail-ot1-f71.google.com with SMTP id w8so149929otk.21 for ; Tue, 16 Jun 2020 15:36:25 -0700 (PDT) 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=pjA7zgwqv80y4xmAR3IWOMUOAyE53XKax4l1DtqqEck=; b=jmlJkbxuZZDUHsdtDdvlZ7Qh3ocUvhk3z7sQoHZ8kjiB/sTePhDPZIKFtzeIQn4a/O 6n+SwwNysZ/2ZmXBtBpU/DZ2Eu5Py4GTdNVK8FohEB3h2obeWd2Fz255BJGJzPO208Vv UXvGqhJTNPzHASWhaKowEyfRqI9/lLG8aIaWso10e5Q+TLp+NoJJPMV5QI03mOlk6zDQ /NxXVI1/TyocvLCZmC28R9ZkUfK9WTa2yL3z0x5PHAN9NmI0RhkFMP7zgrEshH2S1Bgo /IVE25KKcc+KjSRMXzAJvI2UuqGpDmy9xewDvTIwiJYLJvgZ9Lv5HntBVtDoUcqXhu15 hzDQ== X-Gm-Message-State: AOAM532ndtvWSE1B/LXksGsVFgFkPWGH56AB2umpGALnV4BNc8jn8yl/ aqoTHU+0XZgNw6/rtXjcKGwpa2SFxcikrX/SnPw1jkoUonlTo45KHk8+xAps61eQHc1IAHYRV/K SSuulXrwnKq7w/3x9Nqu8cY45Ih35Ajhf7zLs8pGW X-Received: by 2002:a9d:6e96:: with SMTP id a22mr4427237otr.58.1592346984854; Tue, 16 Jun 2020 15:36:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoYNEk859HKJnIJ4XSJZ0fYGYB8IyuHx9XmftKrB9TO1HP0sg3cpUFv1zd47ilgV+zJ3II6JUZaM7vtE9AC3A= X-Received: by 2002:a9d:6e96:: with SMTP id a22mr4427227otr.58.1592346984642; Tue, 16 Jun 2020 15:36:24 -0700 (PDT) MIME-Version: 1.0 References: <20200414150233.24495-1-willy@infradead.org> <20200414150233.24495-17-willy@infradead.org> In-Reply-To: <20200414150233.24495-17-willy@infradead.org> From: Andreas Gruenbacher Date: Wed, 17 Jun 2020 00:36:13 +0200 Message-ID: Subject: Re: [Cluster-devel] [PATCH v11 16/25] fs: Convert mpage_readpages to mpage_readahead To: Matthew Wilcox 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 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., 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. However, the readahead address space operation is called with the pages already locked. When we try to grab the inode glock inside gfs2_readahead, we'll deadlock with processes that are holding that inode glock and trying to lock one of those same pages. One possible solution is to use a trylock on the glock in gfs2_readahead, and to give up the readahead in case of a locking conflict. I have no idea how this is going to affect performance. Any other ideas? Thanks, Andreas