From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520AbdFGDBK (ORCPT ); Tue, 6 Jun 2017 23:01:10 -0400 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:55106 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474AbdFGDBI (ORCPT ); Tue, 6 Jun 2017 23:01:08 -0400 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.249.23 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.220.163 X-Original-MAILFROM: minchan@kernel.org Date: Wed, 7 Jun 2017 11:53:24 +0900 From: Minchan Kim To: zhong jiang CC: vinayak menon , Vinayak Menon , Andrew Morton , Johannes Weiner , , , , Rik van Riel , , , Shiraz Hashim , "linux-mm@kvack.org" , Subject: Re: [PATCH] mm: vmscan: do not pass reclaimed slab to vmpressure Message-ID: <20170607025324.GB18007@bbox> References: <1485344318-6418-1-git-send-email-vinmenon@codeaurora.org> <20170125232713.GB20811@bbox> <20170126141836.GA3584@bbox> <20170130234028.GA7942@bbox> <5936A787.4050002@huawei.com> MIME-Version: 1.0 In-Reply-To: <5936A787.4050002@huawei.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/06/07 11:53:31, Serialize by Router on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/06/07 11:53:31, Serialize complete at 2017/06/07 11:53:31 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 Hi, On Tue, Jun 06, 2017 at 09:00:55PM +0800, zhong jiang wrote: > On 2017/1/31 7:40, Minchan Kim wrote: > > Hi Vinayak, > > Sorry for late response. It was Lunar New Year holidays. > > > > On Fri, Jan 27, 2017 at 01:43:23PM +0530, vinayak menon wrote: > >>> Thanks for the explain. However, such case can happen with THP page > >>> as well as slab. In case of THP page, nr_scanned is 1 but nr_reclaimed > >>> could be 512 so I think vmpressure should have a logic to prevent undeflow > >>> regardless of slab shrinking. > >>> > >> I see. Going to send a vmpressure fix. But, wouldn't the THP case > >> result in incorrect > >> vmpressure reporting even if we fix the vmpressure underflow problem ? > > If a THP page is reclaimed, it reports lower pressure due to bigger > > reclaim ratio(ie, reclaimed/scanned) compared to normal pages but > > it's not a problem, is it? Because VM reclaimed more memory than > > expected so memory pressure isn't severe now. > Hi, Minchan > > THP lru page is reclaimed, reclaim ratio bigger make sense. but I read the code, I found > THP is split to normal pages and loop again. reclaimed pages should not be bigger > than nr_scan. because of each loop will increase nr_scan counter. > > It is likely I miss something. you can point out the point please. You are absolutely right. I got confused by nr_scanned from isolate_lru_pages and sc->nr_scanned from shrink_page_list. Thanks.