From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753919AbbH0JSZ (ORCPT ); Thu, 27 Aug 2015 05:18:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:47530 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbbH0JSV (ORCPT ); Thu, 27 Aug 2015 05:18:21 -0400 Subject: Re: [PATCH 07/12] mm, page_alloc: Distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd To: Mel Gorman References: <1440418191-10894-1-git-send-email-mgorman@techsingularity.net> <1440418191-10894-8-git-send-email-mgorman@techsingularity.net> <55DC8BD7.602@suse.cz> <20150826144533.GO12432@techsingularity.net> <55DDE842.8000103@suse.cz> <20150826181041.GR12432@techsingularity.net> Cc: Andrew Morton , Johannes Weiner , Rik van Riel , David Rientjes , Joonsoo Kim , Michal Hocko , Linux-MM , LKML From: Vlastimil Babka Message-ID: <55DED5D9.8@suse.cz> Date: Thu, 27 Aug 2015 11:18:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150826181041.GR12432@techsingularity.net> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/26/2015 08:10 PM, Mel Gorman wrote: >> >> I think the most robust check would be to rely on what was already prepared >> by gfp_to_alloc_flags(), instead of repeating it here. So add alloc_flags >> parameter to warn_alloc_failed(), and drop the filter when >> - ALLOC_CPUSET is not set, as that disables the cpuset checks >> - ALLOC_NO_WATERMARKS is set, as that allows calling >> __alloc_pages_high_priority() attempt which ignores cpusets >> > > warn_alloc_failed is used outside of page_alloc.c in a context that does > not have alloc_flags. It could be extended to take an extra parameter > that is ALLOC_CPUSET for the other callers or else split it into > __warn_alloc_failed (takes alloc_flags parameter) and warn_alloc_failed > (calls __warn_alloc_failed with ALLOC_CPUSET) but is it really worth it? Probably not. Testing lack of __GFP_DIRECT_RECLAIM is good enough until somebody cares more.