Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752621AbcL2IGQ (ORCPT ); Thu, 29 Dec 2016 03:06:16 -0500 Received: from out0-158.mail.aliyun.com ([140.205.0.158]:59228 "EHLO out0-158.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394AbcL2IGP (ORCPT ); Thu, 29 Dec 2016 03:06:15 -0500 X-Greylist: delayed 316 seconds by postgrey-1.27 at vger.kernel.org; Thu, 29 Dec 2016 03:06:15 EST X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03289;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---.7MiAg1m_1482998433; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "'Michal Hocko'" , Cc: "'Andrew Morton'" , "'Mel Gorman'" , "'Johannes Weiner'" , "'Vlastimil Babka'" , "'Rik van Riel'" , "'LKML'" , "'Michal Hocko'" References: <20161228153032.10821-1-mhocko@kernel.org> <20161228153032.10821-6-mhocko@kernel.org> In-Reply-To: <20161228153032.10821-6-mhocko@kernel.org> Subject: Re: [PATCH 5/7] mm, vmscan: extract shrink_page_list reclaim counters into a struct Date: Thu, 29 Dec 2016 16:00:33 +0800 Message-ID: <06d901d261a9$a2277d70$e6767850$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKdd06YOfI90de32HGjIBSPbRj/+wJJAG2xn3YcC1A= Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 705 Lines: 18 On Wednesday, December 28, 2016 11:31 PM Michal Hocko wrote: > From: Michal Hocko > > shrink_page_list returns quite some counters back to its caller. Extract > the existing 5 into struct reclaim_stat because this makes the code > easier to follow and also allows further counters to be returned. > > While we are at it, make all of them unsigned rather than unsigned long > as we do not really need full 64b for them (we never scan more than > SWAP_CLUSTER_MAX pages at once). This should reduce some stack space. > > This patch shouldn't introduce any functional change. > > Signed-off-by: Michal Hocko > --- Acked-by: Hillf Danton