From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884AbcFVPav (ORCPT ); Wed, 22 Jun 2016 11:30:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:33158 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751939AbcFVPau (ORCPT ); Wed, 22 Jun 2016 11:30:50 -0400 Subject: Re: [PATCH 08/27] mm, vmscan: Simplify the logic deciding whether kswapd sleeps To: Mel Gorman , Andrew Morton , Linux-MM References: <1466518566-30034-1-git-send-email-mgorman@techsingularity.net> <1466518566-30034-9-git-send-email-mgorman@techsingularity.net> Cc: Rik van Riel , Johannes Weiner , LKML From: Vlastimil Babka Message-ID: <66ed4efe-3e23-391f-08fd-c9d6d6a897d8@suse.cz> Date: Wed, 22 Jun 2016 17:30:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1466518566-30034-9-git-send-email-mgorman@techsingularity.net> Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/21/2016 04:15 PM, Mel Gorman wrote: > kswapd goes through some complex steps trying to figure out if it > should stay awake based on the classzone_idx and the requested order. > It is unnecessarily complex and passes in an invalid classzone_idx to > balance_pgdat(). What matters most of all is whether a larger order has > been requsted and whether kswapd successfully reclaimed at the previous > order. This patch irons out the logic to check just that and the end result > is less headache inducing. > > Signed-off-by: Mel Gorman > Acked-by: Johannes Weiner Acked-by: Vlastimil Babka I'm just not entirely convinced that the direct full sleep bypass is worth the added complexity. I can even imagine it being counter productive in some situations. But it's not a big issue.