From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754924AbaIDJVh (ORCPT ); Thu, 4 Sep 2014 05:21:37 -0400 Received: from ipmail05.adl6.internode.on.net ([150.101.137.143]:50437 "EHLO ipmail05.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434AbaIDJVe (ORCPT ); Thu, 4 Sep 2014 05:21:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AukrAMguCFR5LKYhPGdsb2JhbABZgw2DVoUHqAcGmkGFaQEDAQEBgQgXBQEBAQE4NoQDAQEEAScTHCMFCwgDDgoJJQ8FJQMHGhOIOge+XAEXGIVkiVEHhEwFnGuMIYx1Ky+CTwEBAQ Date: Thu, 4 Sep 2014 19:21:31 +1000 From: Dave Chinner To: Andrew Morton Cc: Junxiao Bi , xuejiufei@huawei.com, ming.lei@canonical.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] mm: clear __GFP_FS when PF_MEMALLOC_NOIO is set Message-ID: <20140904092131.GM20473@dastard> References: <1409723694-16047-1-git-send-email-junxiao.bi@oracle.com> <20140903161000.f383fa4c1a4086de054cb6a0@linux-foundation.org> <5407C989.50605@oracle.com> <20140903193058.2bc891a7.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140903193058.2bc891a7.akpm@linux-foundation.org> 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 Wed, Sep 03, 2014 at 07:30:58PM -0700, Andrew Morton wrote: > > PF_MEMALLOC_NOIO is only set for some special processes. I think it > > won't affect much. > > Maybe not now. But once we add hacks like this, people say "goody" and > go and use them rather than exerting the effort to sort out their > deadlocks properly :( There will be more PF_MEMALLOC_NOIO users in > 2019. We got PF_MEMALLOC_NOIO because we failed to get vmalloc deadlocks fixed. The reason vmalloc didn't get fixed? "there will be more vmalloc users". > Dunno, I'd like to hear David's thoughts but perhaps it would be better > to find some way to continue to permit PF_MEMALLOC_NOIO to shrink VFS > caches for most filesystems and find some fs-specific fix for ocfs2. > That would mean testing PF_MEMALLOC_NOIO directly I guess. No special flags in the superblock shrinker, please. We have tens of other filesystem shrinkers that might be impacted, too. If we do not want filesystem shrinkers (note the plural) to run, the shrink_control->gfp_mask needs to have __GFP_FS cleared from it when it is first configured and so that context is constant across all shrinker reclaim cases. If you're really worried by changing PF_MEMALLOC_NOIO, then we can introduce PF_MEMALLOC_NOFS and have the mm subsystem mask both flags appropriately when setting the gfp_mask in the shrink_control settings. But fundamentally, our reclaim heirarchy defines that NOIO implies NOFS, and so we need to fix PF_MEMALLOC_NOIO anyway. Cheers, Dave. -- Dave Chinner david@fromorbit.com