From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757244AbcIURN4 (ORCPT ); Wed, 21 Sep 2016 13:13:56 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36277 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752132AbcIURNx (ORCPT ); Wed, 21 Sep 2016 13:13:53 -0400 Date: Wed, 21 Sep 2016 19:13:50 +0200 From: Michal Hocko To: Vlastimil Babka Cc: Andrew Morton , Arkadiusz Miskiewicz , Ralf-Peter Rohbeck , Olaf Hering , linux-kernel@vger.kernel.org, Linus Torvalds , linux-mm@kvack.org, Mel Gorman , Joonsoo Kim , David Rientjes , Rik van Riel Subject: Re: [PATCH 2/4] mm, compaction: more reliably increase direct compaction priority Message-ID: <20160921171348.GF24210@dhcp22.suse.cz> References: <20160906135258.18335-1-vbabka@suse.cz> <20160906135258.18335-3-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160906135258.18335-3-vbabka@suse.cz> 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 Tue 06-09-16 15:52:56, Vlastimil Babka wrote: [...] > @@ -3204,6 +3199,15 @@ should_compact_retry(struct alloc_context *ac, int order, int alloc_flags, > if (compaction_retries <= max_retries) > return true; > > + /* > + * Make sure there is at least one attempt at the highest priority > + * if we exhausted all retries at the lower priorities > + */ > +check_priority: > + if (*compact_priority > MIN_COMPACT_PRIORITY) { > + (*compact_priority)--; > + return true; Don't we want to reset compaction_retries here? Otherwise we can consume all retries on the lower priorities. Other than that it looks good to me. With that you can add Acked-by: Michal Hocko > + } > return false; > } > #else -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f69.google.com (mail-wm0-f69.google.com [74.125.82.69]) by kanga.kvack.org (Postfix) with ESMTP id 1CCA0280256 for ; Wed, 21 Sep 2016 13:13:53 -0400 (EDT) Received: by mail-wm0-f69.google.com with SMTP id l132so30349542wmf.0 for ; Wed, 21 Sep 2016 10:13:53 -0700 (PDT) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com. [74.125.82.65]) by mx.google.com with ESMTPS id 20si11669477wmk.33.2016.09.21.10.13.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2016 10:13:51 -0700 (PDT) Received: by mail-wm0-f65.google.com with SMTP id w84so9732409wmg.0 for ; Wed, 21 Sep 2016 10:13:51 -0700 (PDT) Date: Wed, 21 Sep 2016 19:13:50 +0200 From: Michal Hocko Subject: Re: [PATCH 2/4] mm, compaction: more reliably increase direct compaction priority Message-ID: <20160921171348.GF24210@dhcp22.suse.cz> References: <20160906135258.18335-1-vbabka@suse.cz> <20160906135258.18335-3-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160906135258.18335-3-vbabka@suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Vlastimil Babka Cc: Andrew Morton , Arkadiusz Miskiewicz , Ralf-Peter Rohbeck , Olaf Hering , linux-kernel@vger.kernel.org, Linus Torvalds , linux-mm@kvack.org, Mel Gorman , Joonsoo Kim , David Rientjes , Rik van Riel On Tue 06-09-16 15:52:56, Vlastimil Babka wrote: [...] > @@ -3204,6 +3199,15 @@ should_compact_retry(struct alloc_context *ac, int order, int alloc_flags, > if (compaction_retries <= max_retries) > return true; > > + /* > + * Make sure there is at least one attempt at the highest priority > + * if we exhausted all retries at the lower priorities > + */ > +check_priority: > + if (*compact_priority > MIN_COMPACT_PRIORITY) { > + (*compact_priority)--; > + return true; Don't we want to reset compaction_retries here? Otherwise we can consume all retries on the lower priorities. Other than that it looks good to me. With that you can add Acked-by: Michal Hocko > + } > return false; > } > #else -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org