From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754744AbdCGHpQ (ORCPT ); Tue, 7 Mar 2017 02:45:16 -0500 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:38767 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754532AbdCGHpI (ORCPT ); Tue, 7 Mar 2017 02:45:08 -0500 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.249.23 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Tue, 7 Mar 2017 16:28:17 +0900 From: Minchan Kim To: Johannes Weiner CC: Michal Hocko , Andrew Morton , Jia He , Mel Gorman , , , Subject: Re: [PATCH 1/9] mm: fix 100% CPU kswapd busyloop on unreclaimable nodes Message-ID: <20170307072817.GA335@bbox> References: <20170228214007.5621-1-hannes@cmpxchg.org> <20170228214007.5621-2-hannes@cmpxchg.org> <20170303012609.GA3394@bbox> <20170303075954.GA31499@dhcp22.suse.cz> <20170306013740.GA8779@bbox> <20170306162410.GB2090@cmpxchg.org> MIME-Version: 1.0 In-Reply-To: <20170306162410.GB2090@cmpxchg.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB03/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/07 16:28:20, Serialize by Router on LGEKRMHUB03/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/07 16:28:20, Serialize complete at 2017/03/07 16:28:20 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 06, 2017 at 11:24:10AM -0500, Johannes Weiner wrote: > On Mon, Mar 06, 2017 at 10:37:40AM +0900, Minchan Kim wrote: > > On Fri, Mar 03, 2017 at 08:59:54AM +0100, Michal Hocko wrote: > > > On Fri 03-03-17 10:26:09, Minchan Kim wrote: > > > > On Tue, Feb 28, 2017 at 04:39:59PM -0500, Johannes Weiner wrote: > > > > > @@ -3316,6 +3325,9 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx) > > > > > sc.priority--; > > > > > } while (sc.priority >= 1); > > > > > > > > > > + if (!sc.nr_reclaimed) > > > > > + pgdat->kswapd_failures++; > > > > > > > > sc.nr_reclaimed is reset to zero in above big loop's beginning so most of time, > > > > it pgdat->kswapd_failures is increased. > > That wasn't intentional; I didn't see the sc.nr_reclaimed reset. > > --- > > From e126db716926ff353b35f3a6205bd5853e01877b Mon Sep 17 00:00:00 2001 > From: Johannes Weiner > Date: Mon, 6 Mar 2017 10:53:59 -0500 > Subject: [PATCH] mm: fix 100% CPU kswapd busyloop on unreclaimable nodes fix > > Check kswapd failure against the cumulative nr_reclaimed count, not > against the count from the lowest priority iteration. > > Suggested-by: Minchan Kim > Signed-off-by: Johannes Weiner Acked-by: Minchan Kim