From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753265AbbCZVoL (ORCPT ); Thu, 26 Mar 2015 17:44:11 -0400 Received: from ipmail07.adl2.internode.on.net ([150.101.137.131]:27493 "EHLO ipmail07.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752292AbbCZVoJ (ORCPT ); Thu, 26 Mar 2015 17:44:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CIBgC8fBRV/wYQLHlcgwZSWoJEr0oGkyGFawQCAoFLTQEBAQEBAX2EFQEFOhwjEAgDDgoJJQ8FJQMhE4guDswaAQEBAQEFAgEbBBiFd4UZgmWCEweELQWUP4V/gRyKG4Uwg0ciggIcgWQqMQEEgj4BAQE Date: Fri, 27 Mar 2015 08:43:54 +1100 From: Dave Chinner To: Michal Hocko Cc: Rik van Riel , Andrew Morton , Al Viro , Johannes Weiner , Mel Gorman , Neil Brown , Tetsuo Handa , Sage Weil , Mark Fasheh , linux-mm@kvack.org, LKML Subject: Re: [PATCH] mm: Use GFP_KERNEL allocation for the page cache in page_cache_read Message-ID: <20150326214354.GG28129@dastard> References: <1426687766-518-1-git-send-email-mhocko@suse.cz> <55098F3B.7070000@redhat.com> <20150318145528.GK17241@dhcp22.suse.cz> <20150319071439.GE28621@dastard> <20150319124441.GC12466@dhcp22.suse.cz> <20150320034820.GH28621@dastard> <20150326095302.GA15257@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150326095302.GA15257@dhcp22.suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2015 at 10:53:02AM +0100, Michal Hocko wrote: > On Fri 20-03-15 14:48:20, Dave Chinner wrote: > > On Thu, Mar 19, 2015 at 01:44:41PM +0100, Michal Hocko wrote: > [...] > > > Or did I miss your point? Are you concerned about some fs overloading > > > filemap_fault and do some locking before delegating to filemap_fault? > > > > The latter: > > > > https://git.kernel.org/cgit/linux/kernel/git/dgc/linux-xfs.git/commit/?h=xfs-mmap-lock&id=de0e8c20ba3a65b0f15040aabbefdc1999876e6b > > Hmm. I am completely unfamiliar with the xfs code but my reading of > 964aa8d9e4d3..723cac484733 is that the newly introduced lock should be > OK from the reclaim recursion POV. It protects against truncate and > punch hole, right? Or are there any internal paths which I am missing > and would cause problems if we do GFP_FS with XFS_MMAPLOCK_SHARED held? It might be OK, but you're only looking at the example I gave you, not the fundamental issue it demonstrates. That is: filesystems may have *internal dependencies that are unknown to the page cache or mm subsystem*. Hence the page cache or mm allocations cannot arbitrarily ignore allocation constraints the filesystem assigns to mapping operations.... Cheers, Dave. -- Dave Chinner david@fromorbit.com