Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp297157ybz; Fri, 17 Apr 2020 01:07:46 -0700 (PDT) X-Google-Smtp-Source: APiQypIB+15Pgd6BxNmVZ0UQu92t+3I6yqhBhEtos6JwQpNOVMBdagjk8VE0zBA40eBBclCYpj03 X-Received: by 2002:a50:f298:: with SMTP id f24mr1868257edm.199.1587110865867; Fri, 17 Apr 2020 01:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587110865; cv=none; d=google.com; s=arc-20160816; b=FrIvzEufp/jZrkZIHKCejfELpOBxEVUA70CtA/gUAARk8TP7RwLJGDbHo0W2XjpKT+ 9QKQ7xzCe9nzNPKv5r1mivJdWoLgYfJYPXUgnPichbRTi/D6qHR6sI7VdDRX+c+O8NYz HWEZd/8c5HYl3FtE8dr8sb6RwIIzHqta5DJi1la0UuDCchc8fs4pWbgeQazUnXF7yDPQ uGj+NsHpKniaR7WRo9Fvi4UG3NUdGLWMts7t/0HNVfCsn7RpoBKFe4RYNVzec0hpt+Qh 1J28OJ3Fd7GKG1786vP/4ROEYxdPgZuSWIYILvxfxVXj3Z0sYhkIK66pAtu+zwmHFrLr DTTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GdTc/Zzu7raszzr4RX7T2guEFF3lDB9CYabZTEfgBXY=; b=kSuJuPsa7NeY79muvBxBGnHjqkP9t7dPLCaeU2EpuHm5FSlUUrtwJvDJK8hlHBqDCC OpqvM0HPQe8jyJ+SaR8bQ8CI4tErshEiX2sucMEBTxu/gI9XiSiz0PAoQ2Txuo4gpu1O w9RtsFbpHlFX7+CrEN8Wtd9WHbD9dhOHPPGxw5HyhN5ylIysSzJu2pVSGgqnMlqMKeQ5 5aZuJw9ZRZ5siJC8whFfRxNf5KcdReEQjRnkLTeDR9dC7EHJ0fnwITRID94UWbahJk/3 gKrUBS1Z8xf3qFAc2UTnm8noO9+z1XR31yi3PwgdJDiVtTSeXSh0hAD5r0zDpIebjkeO twNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QEuXKVnz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si14979084edx.82.2020.04.17.01.07.20; Fri, 17 Apr 2020 01:07:45 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QEuXKVnz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729618AbgDQIGT (ORCPT + 99 others); Fri, 17 Apr 2020 04:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729495AbgDQIGS (ORCPT ); Fri, 17 Apr 2020 04:06:18 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2728CC061A0C; Fri, 17 Apr 2020 01:06:18 -0700 (PDT) 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=GdTc/Zzu7raszzr4RX7T2guEFF3lDB9CYabZTEfgBXY=; b=QEuXKVnz/XP2KY6qvCoCoaxFZL YwfX8YOjMokAprB4nQ8NvkRK6Y7bq+HQj7ySjWENQUmqgjWp0Dyd40wFTB93WA0h1/EkJTY0PlArV 1RnVEggjkzQnKMr6CiIMwXPzvEyacIoHPOZm0owh/M0tBuS8aYB8th13ZpJhGGaTvDJUXLvDKapSN AVegpSoGABDu6ZPjFVK5MKczDpqh7hhQbKXTWXU3Ne73CJspy8uLw2Et0VKGNC68byShygHd5meEG hVUgUPYhWnYBbTJYPHw/n5U1wSTJ7ctlldij8PpHRRBT6w4Dz1CyX/r9eby2Jagy4Ld0jr+GkAsmD oiPBO0cA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPM0t-00019y-2j; Fri, 17 Apr 2020 08:06:15 +0000 Date: Fri, 17 Apr 2020 01:06:15 -0700 From: Christoph Hellwig To: Michal Hocko Cc: Christoph Hellwig , "Darrick J. Wong" , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, LKML , Dave Chinner Subject: Re: implicit AOP_FLAG_NOFS for grab_cache_page_write_begin Message-ID: <20200417080615.GA26880@infradead.org> References: <20200415070228.GW4629@dhcp22.suse.cz> <20200417072931.GA20822@infradead.org> <20200417080003.GH26707@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200417080003.GH26707@dhcp22.suse.cz> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 17, 2020 at 10:00:03AM +0200, Michal Hocko wrote: > > commit aea1b9532143218f8599ecedbbd6bfbf812385e1 > > Author: Dave Chinner > > Date: Tue Jul 20 17:54:12 2010 +1000 > > > > xfs: use GFP_NOFS for page cache allocation > > > > Avoid a lockdep warning by preventing page cache allocation from > > recursing back into the filesystem during memory reclaim. > > Thanks for digging this up! The changelog is not really clear whether > NOFS is to avoid false possitive lockup warnings or real ones. If the > former then we have grown __GFP_NOLOCKDEP flag to workaround the problem > if the later then can we use memalloc_nofs_{save,restore} in the xfs > specific code please? As far as I can tell we are never in a file system transaction in XFS when allocating page cache pages. We do, however usually have i_rwsem locked (or back in the day the XFS-specific predecessor). I'm not sure what the current issues are, but maybe Dave remembers. In doubt we should try removing the flag and run heavy stress testing with lockdep enabled and see if it screams.