Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp674482ybz; Wed, 29 Apr 2020 07:27:00 -0700 (PDT) X-Google-Smtp-Source: APiQypLdzQhAyHuQDLX1FbRl5w+/UfNw/QCXls/MCXp7m/CY4EyHVNTz2GIzi1owxQZ7P1IgUUzU X-Received: by 2002:aa7:d3d1:: with SMTP id o17mr2813097edr.200.1588170420609; Wed, 29 Apr 2020 07:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588170420; cv=none; d=google.com; s=arc-20160816; b=FLCwJ2X4BwwE5vaMBd0IiNqrLt11md/ktfAvzodNp1smEOtBnsOMiix37dFmAP8tk5 ac7bQR/NArhJUppRqXXgl8mvEaDAQdO29gn0UbXhZErjWdavJT/Px+r8YLZ19x4SGgEi mzPImhHNG4PA+SbuqyZa3UvIXZ8cUqbgZdqIN9jDY1+uBEJyQN+nLXDrp/49Lspy9EFU q+jUDcN5kqBW+WjRkPEsdmpR3moJfVGmtfPuSZQlK815/5vXZ1BKm1Px3k+x40A2dCor vBv9OeFUP1t8AgH9tm48cJrejucWOerT0tIrw7ftbE8MQRC4YFJuZ4TP/2HAFXEtZrXU zAtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=omYO6xoVUBqJSlB3DlsFxwqiaIbrxIKjZ56KmIA/PNY=; b=BiR3KughcGEAg3S/n2DQtfPVKyBehxlPW8/c+HOX3dOOApm5Il6A1BTc+dprWRdK5b b2N6rR0vWHJb3oVLxRwdXU7fQcpmcYqXk6pnXCbvG7y9eZnaIelC1CopVW/O19X/twFy iKtXTYEdIZIFWl2rvs/sv2jWyJdywPbvk3tTERDF5CecCyS3WNp/hbJ4bf/U+25SyGQC 6HcsXb7TbZdDe9rgUko7MOUkpvWIuHbAOwtL9rQyJ3VxCcSxtPJz7scGYlE10FV8oOHV p7dD0M0h9EbUXuvduFDlXx9QTgIH82VqeurHOXOtnXir5sIO48T4A+fgnh1SXu9Opkfu NedA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c22si4265304eja.230.2020.04.29.07.26.36; Wed, 29 Apr 2020 07:27:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727788AbgD2OWu (ORCPT + 99 others); Wed, 29 Apr 2020 10:22:50 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:56236 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726811AbgD2OWu (ORCPT ); Wed, 29 Apr 2020 10:22:50 -0400 Received: by mail-wm1-f65.google.com with SMTP id e26so2235001wmk.5 for ; Wed, 29 Apr 2020 07:22:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=omYO6xoVUBqJSlB3DlsFxwqiaIbrxIKjZ56KmIA/PNY=; b=BsBi2l4tC/QkIXU9v2cpNGcpMtEZNF5An1C+N5YvsVeqE0tO1dL1FdIHc5815czBly Tr6Co/pZtmRjv/Tz3RG74Po42rlKg1okX/GuV0OuTGqXFT7Nub2E3+hS/xxIGnfgu8tS 7y0oJI6oZxOa4z7rlRizz/96lveOHGN+6vjISiaQN+Z+0n9Tn+FGUZpWgvpDI561wUQC tNBIIzPJP7ZjtsT8jW3/JQnVDum3JV944OeA+FUG7nbk6545M07XzH7iZkgK8BY4x/FA IbBHHag9N7AIN6rYCafxQzHROdTddVwcwTMzJT3bmvdU9Hui8OQH5CoVihc1TwN6xrQs HWoA== X-Gm-Message-State: AGi0PubqmxNkrOPop0DmZBFNxdrO+JHXGOYhYQfPyEL1emillvY/DpU3 pT2hSF7eju4J9fiNJDMv/x8= X-Received: by 2002:a05:600c:258:: with SMTP id 24mr3495136wmj.73.1588170167932; Wed, 29 Apr 2020 07:22:47 -0700 (PDT) Received: from localhost (ip-37-188-130-62.eurotel.cz. [37.188.130.62]) by smtp.gmail.com with ESMTPSA id q10sm28827612wrv.95.2020.04.29.07.22.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 07:22:47 -0700 (PDT) Date: Wed, 29 Apr 2020 16:22:45 +0200 From: Michal Hocko To: Maninder Singh Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, a.sahrawat@samsung.com, v.narang@samsung.com Subject: Re: [PATCH v3] mm/vmscan.c: change prototype for shrink_page_list Message-ID: <20200429142245.GH28637@dhcp22.suse.cz> References: <1588168259-25604-1-git-send-email-maninder1.s@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1588168259-25604-1-git-send-email-maninder1.s@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 29-04-20 19:20:59, Maninder Singh wrote: > 'commit 3c710c1ad11b ("mm, vmscan: > extract shrink_page_list reclaim counters into a struct")' > > changed data type for the function, > so changing return type for funciton and its caller. > > Signed-off-by: Vaneet Narang > Signed-off-by: Maninder Singh You could have kept my ack from v1 Acked-by: Michal Hocko Thanks! > --- > v1 -> v2: position of variable changed mistakenly, thus reverted. > v2 -> v3: Don't change position of any variable, thus reverted. > if required then need to send by separate patch. > > mm/internal.h | 2 +- > mm/page_alloc.c | 2 +- > mm/vmscan.c | 24 ++++++++++++------------ > 3 files changed, 14 insertions(+), 14 deletions(-) > > diff --git a/mm/internal.h b/mm/internal.h > index b5634e7..c3eeec8 100644 > --- a/mm/internal.h > +++ b/mm/internal.h > @@ -527,7 +527,7 @@ extern unsigned long __must_check vm_mmap_pgoff(struct file *, unsigned long, > unsigned long, unsigned long); > > extern void set_pageblock_order(void); > -unsigned long reclaim_clean_pages_from_list(struct zone *zone, > +unsigned int reclaim_clean_pages_from_list(struct zone *zone, > struct list_head *page_list); > /* The ALLOC_WMARK bits are used as an index to zone->watermark */ > #define ALLOC_WMARK_MIN WMARK_MIN > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 1385d78..f17d88c6 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -8416,7 +8416,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc, > unsigned long start, unsigned long end) > { > /* This function is based on compact_zone() from compaction.c. */ > - unsigned long nr_reclaimed; > + unsigned int nr_reclaimed; > unsigned long pfn = start; > unsigned int tries = 0; > int ret = 0; > diff --git a/mm/vmscan.c b/mm/vmscan.c > index b06868f..7631725 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1066,17 +1066,17 @@ static void page_check_dirty_writeback(struct page *page, > /* > * shrink_page_list() returns the number of reclaimed pages > */ > -static unsigned long shrink_page_list(struct list_head *page_list, > - struct pglist_data *pgdat, > - struct scan_control *sc, > - enum ttu_flags ttu_flags, > - struct reclaim_stat *stat, > - bool ignore_references) > +static unsigned int shrink_page_list(struct list_head *page_list, > + struct pglist_data *pgdat, > + struct scan_control *sc, > + enum ttu_flags ttu_flags, > + struct reclaim_stat *stat, > + bool ignore_references) > { > LIST_HEAD(ret_pages); > LIST_HEAD(free_pages); > - unsigned nr_reclaimed = 0; > - unsigned pgactivate = 0; > + unsigned int nr_reclaimed = 0; > + unsigned int pgactivate = 0; > > memset(stat, 0, sizeof(*stat)); > cond_resched(); > @@ -1483,7 +1483,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, > return nr_reclaimed; > } > > -unsigned long reclaim_clean_pages_from_list(struct zone *zone, > +unsigned int reclaim_clean_pages_from_list(struct zone *zone, > struct list_head *page_list) > { > struct scan_control sc = { > @@ -1492,7 +1492,7 @@ unsigned long reclaim_clean_pages_from_list(struct zone *zone, > .may_unmap = 1, > }; > struct reclaim_stat dummy_stat; > - unsigned long ret; > + unsigned int ret; > struct page *page, *next; > LIST_HEAD(clean_pages); > > @@ -1900,7 +1900,7 @@ static int current_may_throttle(void) > { > LIST_HEAD(page_list); > unsigned long nr_scanned; > - unsigned long nr_reclaimed = 0; > + unsigned int nr_reclaimed = 0; > unsigned long nr_taken; > struct reclaim_stat stat; > int file = is_file_lru(lru); > @@ -2096,7 +2096,7 @@ static void shrink_active_list(unsigned long nr_to_scan, > unsigned long reclaim_pages(struct list_head *page_list) > { > int nid = NUMA_NO_NODE; > - unsigned long nr_reclaimed = 0; > + unsigned int nr_reclaimed = 0; > LIST_HEAD(node_page_list); > struct reclaim_stat dummy_stat; > struct page *page; > -- > 1.9.1 > -- Michal Hocko SUSE Labs