Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753677AbcCBOlA (ORCPT ); Wed, 2 Mar 2016 09:41:00 -0500 Received: from mx2.suse.de ([195.135.220.15]:56628 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbcCBOk6 (ORCPT ); Wed, 2 Mar 2016 09:40:58 -0500 Subject: Re: [PATCH v2 4/5] mm, kswapd: replace kswapd compaction with waking up kcompactd To: Joonsoo Kim References: <1454938691-2197-1-git-send-email-vbabka@suse.cz> <1454938691-2197-5-git-send-email-vbabka@suse.cz> <20160302063322.GB32695@js1304-P5Q-DELUXE> <56D6BACB.7060005@suse.cz> <56D6F41D.9080107@suse.cz> Cc: Joonsoo Kim , Linux Memory Management List , Andrew Morton , LKML , Andrea Arcangeli , "Kirill A. Shutemov" , Rik van Riel , Mel Gorman , David Rientjes , Michal Hocko , Johannes Weiner From: Vlastimil Babka Message-ID: <56D6FB77.2090801@suse.cz> Date: Wed, 2 Mar 2016 15:40:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1517 Lines: 42 On 03/02/2016 03:22 PM, Joonsoo Kim wrote: > 2016-03-02 23:09 GMT+09:00 Vlastimil Babka : >> On 03/02/2016 02:57 PM, Joonsoo Kim wrote: >>> >>> >>> Yes, I know. >>> What I'd like to say here is that you need to care current_is_kswapd() in >>> this patch. This patch unintentionally change the back ground compaction >>> thread >>> behaviour to restart compaction by every 64 trials because calling >>> curret_is_kswapd() >> >>> by kcompactd would return false and is treated as direct reclaim. >> >> Oh, you mean this path to reset the skip bits. I see. But if skip bits are >> already reset by kswapd when waking kcompactd, then effect of another (rare) >> reset in kcompactd itself will be minimal? > > If you care current_is_kswapd() in this patch properly (properly means change > like "current_is_kcompactd()), reset in kswapd would not > happen because, compact_blockskip_flush would not be set by kcompactd. > > In this case, patch 5 would have it's own meaning so cannot be folded. So I understand that patch 5 would be just about this? - if (compaction_restarting(zone, cc->order) && !current_is_kcompactd()) + if (compaction_restarting(zone, cc->order)) __reset_isolation_suitable(zone); I'm more inclined to fold it in that case. > Thanks. > >>> Result of patch 4 >>> and patch 5 would be same. >> >> >> It's certainly possible to fold patch 5 into 4. I posted them separately >> mainly to make review more feasible. But the differences in results are >> already quite small. >>