Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754440AbcDKMRA (ORCPT ); Mon, 11 Apr 2016 08:17:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:59838 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751216AbcDKMQ7 (ORCPT ); Mon, 11 Apr 2016 08:16:59 -0400 Subject: Re: [PATCH 07/11] mm, compaction: Update compaction_result ordering To: Michal Hocko , Andrew Morton References: <1459855533-4600-1-git-send-email-mhocko@kernel.org> <1459855533-4600-8-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: <570B95B6.6030509@suse.cz> Date: Mon, 11 Apr 2016 14:16:54 +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-8-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: 933 Lines: 18 On 04/05/2016 01:25 PM, Michal Hocko wrote: > From: Michal Hocko > > compaction_result will be used as the primary feedback channel for > compaction users. At the same time try_to_compact_pages (and potentially > others) assume a certain ordering where a more specific feedback takes > precendence. This gets a bit awkward when we have conflicting feedback > from different zones. E.g one returing COMPACT_COMPLETE meaning the full > zone has been scanned without any outcome while other returns with > COMPACT_PARTIAL aka made some progress. The caller should get > COMPACT_PARTIAL because that means that the compaction still can make > some progress. The same applies for COMPACT_PARTIAL vs. > COMPACT_PARTIAL_SKIPPED. Reorder PARTIAL to be the largest one so the > larger the value is the more progress we have done. > > Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka