From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752430AbcEPHKr (ORCPT ); Mon, 16 May 2016 03:10:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:45346 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751921AbcEPHKq (ORCPT ); Mon, 16 May 2016 03:10:46 -0400 Subject: Re: [RFC 08/13] mm, compaction: simplify contended compaction handling To: Michal Hocko References: <1462865763-22084-1-git-send-email-vbabka@suse.cz> <1462865763-22084-9-git-send-email-vbabka@suse.cz> <20160513130950.GN20141@dhcp22.suse.cz> Cc: linux-mm@kvack.org, Andrew Morton , Joonsoo Kim , Rik van Riel , David Rientjes , Mel Gorman , Johannes Weiner , Tetsuo Handa , linux-kernel@vger.kernel.org, Linus Torvalds From: Vlastimil Babka Message-ID: <57397271.50504@suse.cz> Date: Mon, 16 May 2016 09:10:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160513130950.GN20141@dhcp22.suse.cz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/13/2016 03:09 PM, Michal Hocko wrote: >> >@@ -1564,14 +1564,11 @@ static enum compact_result compact_zone(struct zone *zone, struct compact_contro >> > trace_mm_compaction_end(start_pfn, cc->migrate_pfn, >> > cc->free_pfn, end_pfn, sync, ret); >> > >> >- if (ret == COMPACT_CONTENDED) >> >- ret = COMPACT_PARTIAL; >> >- >> > return ret; >> > } > This took me a while to grasp but then I realized this is correct > because we shouldn't pretend progress when there was none in fact, > especially when __alloc_pages_direct_compact basically replaced this > "fake" COMPACT_PARTIAL by COMPACT_CONTENDED anyway. Yes. Actually COMPACT_CONTENDED compact_result used to be just for the tracepoint, and __alloc_pages_direct_compact used another function parameter to signal contention. You changed it with the oom rework so COMPACT_CONTENDED result value was used, so this hunk just makes sure it's still reported correctly.