From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751832AbbCTWvo (ORCPT ); Fri, 20 Mar 2015 18:51:44 -0400 Received: from ipmail04.adl6.internode.on.net ([150.101.137.141]:22263 "EHLO ipmail04.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751339AbbCTWvn (ORCPT ); Fri, 20 Mar 2015 18:51:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2D2BwA/owxVPAYQLHlcgwOBLIJAg3utBgMBAQEGmQkCAgEBAoEoTQEBAQEBAQYBAQEBODuEFAEBAQQ6HCMQCAMOAwMBAgEJJQ8FJQMHDA4TiC7MNAEBAQEBBQEBAQEeGIV1hRSEdQeELQWaO4s2iHSEJCoxgkMBAQE Date: Sat, 21 Mar 2015 09:51:39 +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: <20150320225139.GL28621@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> <20150320131453.GA4821@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150320131453.GA4821@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 Fri, Mar 20, 2015 at 02:14:53PM +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: > > > > allocations where the caller cannot pass a gfp_mask need to obey > > > > the mapping_gfp_mask that is set by the mapping owner.... > > > > > > Hmm, I thought this is true only when the function might be called from > > > the fs path. > > > > How do you know in, say, mpage_readpages, you aren't being called > > from a fs path that holds locks? e.g. we can get there from ext4 > > doing readdir, so it is holding an i_mutex lock at that point. > > > > Many other paths into mpages_readpages don't hold locks, but there > > are some that do, and those that do need functionals like this to > > obey the mapping_gfp_mask because it is set appropriately for the > > allocation context of the inode that owns the mapping.... > > What about the following? > --- > From 5d905cb291138d61bbab056845d6e53bc4451ec8 Mon Sep 17 00:00:00 2001 > From: Michal Hocko > Date: Thu, 19 Mar 2015 14:56:56 +0100 > Subject: [PATCH 1/2] mm: do not ignore mapping_gfp_mask in page cache > allocation paths Looks reasonable, though I though there were more places that that in the mapping paths that need to be careful... Cheers, Dave. -- Dave Chinner david@fromorbit.com