From patchwork Thu Jul 19 16:04:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10534885 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8AEE6601D2 for ; Thu, 19 Jul 2018 16:05:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7481029B9B for ; Thu, 19 Jul 2018 16:05:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 688A029C56; Thu, 19 Jul 2018 16:05:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 817C929D4F for ; Thu, 19 Jul 2018 16:05:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C590E6B0003; Thu, 19 Jul 2018 12:04:59 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C08486B0005; Thu, 19 Jul 2018 12:04:59 -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 AD1076B0006; Thu, 19 Jul 2018 12:04:59 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f198.google.com (mail-qk0-f198.google.com [209.85.220.198]) by kanga.kvack.org (Postfix) with ESMTP id 80B666B0003 for ; Thu, 19 Jul 2018 12:04:59 -0400 (EDT) Received: by mail-qk0-f198.google.com with SMTP id c27-v6so6961329qkj.3 for ; Thu, 19 Jul 2018 09:04:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:from:to:date:message-id :user-agent:mime-version:content-transfer-encoding :spamdiagnosticoutput:spamdiagnosticmetadata; bh=8+SGadqdRjzyLXYv3c41QzAS+KqabPiKpgOMFXyw/RY=; b=mRAyb7D4RgCzabBziAoArGRtpAuTr0aYV2JsNX5Vxobrj+8UpyMx8XFsR0oe3glhRl Lj1pdOybly4/EppiT0nnlXELeflWZRZttSlYHf1D7c04rH1lSR28TFlJ4RdhfiYKkyX/ fIRBSGg7Kr9RntFX0WfAu7NSA9OCuC2Gh8kF8s/ZtZX+MK6+KsfeD3sByy+qpzLk4W7n E+0SP0wXXHPZXeyfFGDPyslN9sTy9vsvHIAXaUOBa+E/AQbjDvOBEYzH3J8tTdfZNpQ9 pqYFb6SJxs2NzRd3iYhRmSVS13hFkzKxy0X/O3LGJjdB0ALwErz5ubViJKhDDsBnYFQm 7IMw== X-Gm-Message-State: AOUpUlE6h2GTjnhYp6gFgUK2KbGnuwnCaSZW4ajGKjtca9g5c6KbDx+s bNy8fOC7wZXxAq6RnCT/QJ+szeXQS/kNFK4zWgzJZJiGsUp+tGBtbyZmQvNeeiTGYLxK1EpZ+yt YMSeagZ0ZNzTZf+wyaYNwx2+qTdopkLiJ3V9rikb6sDpGMMo6jyNahKS6MBIUoc1gwQ== X-Received: by 2002:a37:9242:: with SMTP id u63-v6mr9351316qkd.189.1532016299146; Thu, 19 Jul 2018 09:04:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdUukKpE2RDSyDYUl6A5E7LGte7nem5mVnKawqUozTonjABeMl5if7edtIpaqQ/k7GDhCMu X-Received: by 2002:a37:9242:: with SMTP id u63-v6mr9351262qkd.189.1532016298395; Thu, 19 Jul 2018 09:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532016298; cv=none; d=google.com; s=arc-20160816; b=J797tsV5fQKy3qGsFxLFl7RXVrmeg+cNwBcg29a7FlipoX3PTv1VFm7o5Wv6prYKE3 7Xhi5aAAkDLYg0nwH4RZ7Ou/+TKyv9eEtcrlwSYTo2Uu/OWXxRWSbXHHR0qES6W71nIo lweCjEBe4Kh7eDeAIrFrbHcyByNUXALoV+lQtTyI0fy4PrGWVrf7bMTxN+tC1TQ2PIXB p9DFnuXhhHsdPpLK8D1+/4getCufK46TwBJKTyixo9xzxodyDVATcx4U1OYHtzsC/oof jG6QAs+/WXSZRewLXBEJ3DZ/BjKcEYrydl2BtGCgyVunQ0CggV+1qWR/sTow3iXrXdq5 D4Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=spamdiagnosticmetadata:spamdiagnosticoutput :content-transfer-encoding:mime-version:user-agent:message-id:date :to:from:subject:dkim-signature:arc-authentication-results; bh=8+SGadqdRjzyLXYv3c41QzAS+KqabPiKpgOMFXyw/RY=; b=Yyg6VskzaPj5LyGA0cv85uncYUzlBsgQ3SSB8xw6Zzec+xhqw0XxP+aOnWvlV2b7X5 3N2vuRYlpZaKySRn7dSx5gkV4o25h+l3ebIZccNCY1lQF3tOwBnqyxJQiWne9wxrUES2 Fn0KhArfTVJOXpzyn1nB+tF5/5STKXfg2Y7tnOpGPWArP9pbWOSzikf0zwmXeOYLlcNM HFECy6pxc8fbaf9I7ZYQtDhWoegFsmmNDkeBno5RxJZOSNNcgujroLqsdwgUky7Am+NK obVUDiEjBZ15YiS7nXHXrc8CyYDrAunw//nc4XzyEqxye+rdXCQHpLXZp++1ka+fIPez UG7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b="e/hI/Wy0"; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.3.102 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30102.outbound.protection.outlook.com. [40.107.3.102]) by mx.google.com with ESMTPS id 22-v6si6363801qtt.370.2018.07.19.09.04.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jul 2018 09:04:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.3.102 as permitted sender) client-ip=40.107.3.102; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b="e/hI/Wy0"; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.3.102 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8+SGadqdRjzyLXYv3c41QzAS+KqabPiKpgOMFXyw/RY=; b=e/hI/Wy0deq722wIS6Q5oqY6Cs8ykghg5mXssVyD1Aiw3BLv3kqlXCdYFZcrDVfllF96Wuc4Gjh5+U5UQt6m4zxgJyJK0PQqZMQBpsvAW2UfGbsu5SStD4hhAWl+WhgsqieKLvhociPfrRttQhmIpsmOBFyb6PeCGbJOUGZLHSo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (185.231.240.5) by VI1PR0801MB2029.eurprd08.prod.outlook.com (2603:10a6:800:8b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.16; Thu, 19 Jul 2018 16:04:54 +0000 Subject: [PATCH] mm: Cleanup in do_shrink_slab() From: Kirill Tkhai To: akpm@linux-foundation.org, ktkhai@virtuozzo.com, vdavydov.dev@gmail.com, mhocko@suse.com, penguin-kernel@I-love.SAKURA.ne.jp, shakeelb@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Thu, 19 Jul 2018 19:04:51 +0300 Message-ID: <153201627722.12295.11034132843390627757.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1P193CA0006.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:bd::16) To VI1PR0801MB2029.eurprd08.prod.outlook.com (2603:10a6:800:8b::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f4d65de5-57b9-4ca7-a8e3-08d5ed915e44 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:VI1PR0801MB2029; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB2029; 3:pYOBe4EP1BEuJmlzOOfxwLCT4ON6xdZVHW6Fm4lVQ+YjqvLNCLyu47FZ4pXDMxk0bVmfPC2AP35CgQx6/saSQeETUoCWnw1V9iJhw6hQ6ImVXdGBLJONAhlNpoAR65N+yKpy0qWunFqpl+BlTsPkE7RRyrLNYxhL6H2aominSjUdc42D4Bg7SCCkRRWnkvvivz7cRhdC0HyHdPkOigm6FtaJUisAvhkbccg/ew6ixAcAs8SXdi5ndL0rIP6CumRD; 25:4s4diQtKlibPfd+lrFeJ5KpC3KQkUZs05lSuscoj28mix62iCIgVivZ/vC3FNJaTyg8Wb/iR5Cq39/FAmTnv9Nwj2c8Y6wfe3K1dK1N3fM2E/J/xNdxXipW8z3RsuiD1nYJlo/17rWJl7/8waYI0MdLBPNxFcflpPIb62RWMQGYk1ZUH9fPDa+XbLQejc1HC1dJqWhUo8OyupgUWem/4ymaEciztC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7uyZ7lMRe4tylMMu1+HUrZX6b8aIWESnJO8ndKu+fZ0Bp7Dr86HVb2T9rQGFegrZopepkuhjFw8GzAaYhezdgpRbtvXmbA9pjL78bUKtJPtBJxLSU2SwrVDOU0CVhQN3q9eIlMgPdsfEDT34s17lxFO6NmaxRg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:VI1PR0801MB2029; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0801MB2029; X-Forefront-PRVS: 0738AF4208 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(396003)(366004)(39850400004)(136003)(376002)(346002)(199004)(189003)(105586002)(106356001)(33896004)(53936002)(25786009)(23676004)(6506007)(386003)(2486003)(52116002)(7696005)(97736004)(39060400002)(3846002)(50466002)(6116002)(230700001)(103116003)(55016002)(58126008)(2906002)(9686003)(66066001)(6666003)(8936002)(316002)(478600001)(956004)(26005)(86362001)(16526019)(1857600001)(476003)(81166006)(81156014)(8676002)(186003)(47776003)(61506002)(486006)(305945005)(7736002)(68736007)(5660300001)(14444005); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB2029; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA4MDFNQjIwMjk7MjM6U3ZaZUFVZW45bzJMNWQ5ZCtBbnpUZnpY?= =?utf-8?B?N0RvWWlOdjJiakJQb2Q3cHNHT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iagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB2029; 20:V4aw879VD16arvujTQYgQtFRihg6NVgqw2RdGctqNJWJAPwBpEy8q6dx1N8rVEcDEq5BUBw3xXQHp33j+w3E2KHiV0ajJWYnBUR9JBjPEZJZoi9U3VmOEEqv1Z8j55zMzyQ2of9IfLWme+knqHTHcH+8VMNGxdWkzAG0CTccJEU= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2018 16:04:54.4547 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f4d65de5-57b9-4ca7-a8e3-08d5ed915e44 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2029 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: X-Virus-Scanned: ClamAV using ClamSMTP Group long variables together to minimize number of occupied lines and place all definitions in back Christmas tree order. Also, simplify expression around batch_size: use all power of C language! Signed-off-by: Kirill Tkhai Reviewed-by: Shakeel Butt --- mm/vmscan.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 9918bfc1d2f9..636657213b9b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -445,16 +445,11 @@ EXPORT_SYMBOL(unregister_shrinker); static unsigned long do_shrink_slab(struct shrink_control *shrinkctl, struct shrinker *shrinker, int priority) { - unsigned long freed = 0; + long total_scan, freeable, nr, new_nr, next_deferred, scanned = 0; + long batch_size = shrinker->batch ? : SHRINK_BATCH; unsigned long long delta; - long total_scan; - long freeable; - long nr; - long new_nr; int nid = shrinkctl->nid; - long batch_size = shrinker->batch ? shrinker->batch - : SHRINK_BATCH; - long scanned = 0, next_deferred; + unsigned long freed = 0; freeable = shrinker->count_objects(shrinker, shrinkctl); if (freeable == 0 || freeable == SHRINK_EMPTY)