From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751823AbdAYJqr (ORCPT ); Wed, 25 Jan 2017 04:46:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:46740 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564AbdAYJqp (ORCPT ); Wed, 25 Jan 2017 04:46:45 -0500 Date: Wed, 25 Jan 2017 10:46:37 +0100 From: Michal Hocko To: Mel Gorman Cc: Trevor Cordes , linux-kernel@vger.kernel.org, Joonsoo Kim , Minchan Kim , Rik van Riel , Srikar Dronamraju Subject: Re: mm, vmscan: commit makes PAE kernel crash nightly (bisected) Message-ID: <20170125094637.GE32377@dhcp22.suse.cz> References: <20170117142114.r7abr3x2bbik47sd@techsingularity.net> <20170117145450.GQ19699@dhcp22.suse.cz> <20170119034850.0b7d504c@pog.tecnopolis.ca> <20170119113757.GP30786@dhcp22.suse.cz> <20170120003544.7e6e34d1@pog.tecnopolis.ca> <20170120110232.y7xd4b7wtwqslgnw@techsingularity.net> <20170120155553.gjv2x5eycvdudnil@techsingularity.net> <20170122184559.0b5c0fd8@pog.tecnopolis.ca> <20170123104858.gpjy25y2ogju3gkg@techsingularity.net> <20170123110412.z5e372pabnnezdnu@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170123110412.z5e372pabnnezdnu@techsingularity.net> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 23-01-17 11:04:12, Mel Gorman wrote: [...] > 1. In should_reclaim_retry, account for SLAB_RECLAIMABLE as available > pages when deciding to retry reclaim I am pretty sure I have considered this but then decided to not go that way. I do not remember details so I will think about this some more. It might have been just "let's wait for the real issue here". Anyway we can give it a try and it would be as simple as diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 94ebd30d0f09..87221491be84 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3566,7 +3566,7 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order, unsigned long min_wmark = min_wmark_pages(zone); bool wmark; - available = reclaimable = zone_reclaimable_pages(zone); + available = reclaimable = zone_reclaimable_pages(zone) + zone_page_state_snapshot(zone, NR_SLAB_RECLAIMABLE); available -= DIV_ROUND_UP((*no_progress_loops) * available, MAX_RECLAIM_RETRIES); available += zone_page_state_snapshot(zone, NR_FREE_PAGES); I am not sure it would really help much on its own without further changes to how we scale LRU->slab scanning. Could you give this a try on top of the mmotm or linux-next tree? > 2. Stall in should_reclaim_retry for __GFP_NOFAIL|__GFP_NOFS with a > comment stating that the intent is to allow kswapd make progress > with the shrinker The current mmotm tree doesnt need this because we no longer trigger the oom killer for this combinations of flags. > 3. Stall __GFP_NOFS in direct reclaimer on a workqueue when it's > failing to make progress to allow kswapd to do some work. This > may be impaired if kswapd is locked up waiting for a lock held > by the direct reclaimer > 4. Schedule the system workqueue to drain slab for > __GFP_NOFS|__GFP_NOFAIL. > > 3 and 4 are extremely heavy handed so we should try them one at a time. I am not even sure they are really necessary. -- Michal Hocko SUSE Labs