Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754626AbcDKPHW (ORCPT ); Mon, 11 Apr 2016 11:07:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:45433 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753507AbcDKPHU (ORCPT ); Mon, 11 Apr 2016 11:07:20 -0400 Subject: Re: [PATCH 11/11] mm: consider compaction feedback also for costly allocation To: Michal Hocko , Andrew Morton References: <1459855533-4600-1-git-send-email-mhocko@kernel.org> <1459855533-4600-12-git-send-email-mhocko@kernel.org> Cc: Linus Torvalds , Johannes Weiner , Mel Gorman , David Rientjes , Tetsuo Handa , Joonsoo Kim , Hillf Danton , linux-mm@kvack.org, LKML , Michal Hocko From: Vlastimil Babka Message-ID: <570BBDA3.8030708@suse.cz> Date: Mon, 11 Apr 2016 17:07:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <1459855533-4600-12-git-send-email-mhocko@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1593 Lines: 32 On 04/05/2016 01:25 PM, Michal Hocko wrote: > From: Michal Hocko > > PAGE_ALLOC_COSTLY_ORDER retry logic is mostly handled inside > should_reclaim_retry currently where we decide to not retry after at > least order worth of pages were reclaimed or the watermark check for at > least one zone would succeed after reclaiming all pages if the reclaim > hasn't made any progress. Compaction feedback is mostly ignored and we > just try to make sure that the compaction did at least something before > giving up. > > The first condition was added by a41f24ea9fd6 ("page allocator: smarter > retry of costly-order allocations) and it assumed that lumpy reclaim > could have created a page of the sufficient order. Lumpy reclaim, > has been removed quite some time ago so the assumption doesn't hold > anymore. Remove the check for the number of reclaimed pages and rely > on the compaction feedback solely. should_reclaim_retry now only > makes sure that we keep retrying reclaim for high order pages only > if they are hidden by watermaks so order-0 reclaim makes really sense. > > should_compact_retry now keeps retrying even for the costly allocations. > The number of retries is reduced wrt. !costly requests because they are > less important and harder to grant and so their pressure shouldn't cause > contention for other requests or cause an over reclaim. We also do not > reset no_progress_loops for costly request to make sure we do not keep > reclaiming too agressively. [...] > Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka