From patchwork Thu Mar 12 12:23:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 11434097 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 799A9139A for ; Thu, 12 Mar 2020 12:23:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5F9F3206FA for ; Thu, 12 Mar 2020 12:23:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F9F3206FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 973F96B0003; Thu, 12 Mar 2020 08:23:16 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 924276B0006; Thu, 12 Mar 2020 08:23:16 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 812426B0007; Thu, 12 Mar 2020 08:23:16 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0092.hostedemail.com [216.40.44.92]) by kanga.kvack.org (Postfix) with ESMTP id 66F056B0003 for ; Thu, 12 Mar 2020 08:23:16 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 40B30824805A for ; Thu, 12 Mar 2020 12:23:16 +0000 (UTC) X-FDA: 76586625192.10.fowl58_73d1dc2e1693c X-Spam-Summary: 2,0,0,31b843891028469d,d41d8cd98f00b204,ktkhai@virtuozzo.com,,RULES_HIT:41:152:355:379:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1381:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2895:3138:3139:3140:3141:3142:3352:3653:3867:4321:5007:6119:6261:6642:8603:10004:10400:10450:10455:11026:11658:11914:12296:12297:12438:12555:12760:12986:13069:13311:13357:14096:14097:14181:14394:14721:19904:19999:21080:21433:21451:21627:21939:30054:30090,0,RBL:185.231.240.75:@virtuozzo.com:.lbl8.mailshell.net-62.2.3.100 64.100.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: fowl58_73d1dc2e1693c X-Filterd-Recvd-Size: 2036 Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Mar 2020 12:23:15 +0000 (UTC) Received: from dhcp-172-16-24-104.sw.ru ([172.16.24.104] helo=localhost.localdomain) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1jCMrl-0006JJ-6J; Thu, 12 Mar 2020 15:23:09 +0300 Subject: [PATCH] mm: Make may_enter_fs bool in shrink_page_list() From: Kirill Tkhai To: akpm@linux-foundation.org, linux-mm@kvack.org, ktkhai@virtuozzo.com Date: Thu, 12 Mar 2020 15:23:08 +0300 Message-ID: <158401577296.539162.3126661126742731645.stgit@localhost.localdomain> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This gives some size improvement: $size mm/vmscan.o (before) text data bss dec hex filename 53670 24123 12 77805 12fed mm/vmscan.o $size mm/vmscan.o (after) text data bss dec hex filename 53648 24123 12 77783 12fd7 mm/vmscan.o Signed-off-by: Kirill Tkhai --- mm/vmscan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index d9fb680884b8..dca623db51c8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1084,9 +1084,8 @@ static unsigned long shrink_page_list(struct list_head *page_list, while (!list_empty(page_list)) { struct address_space *mapping; struct page *page; - int may_enter_fs; enum page_references references = PAGEREF_RECLAIM; - bool dirty, writeback; + bool dirty, writeback, may_enter_fs; unsigned int nr_pages; cond_resched(); @@ -1267,7 +1266,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, goto activate_locked_split; } - may_enter_fs = 1; + may_enter_fs = true; /* Adding to swap updated mapping */ mapping = page_mapping(page);