From patchwork Mon Mar 18 09:27:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10857031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D5A096C2 for ; Mon, 18 Mar 2019 09:28:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4648292F6 for ; Mon, 18 Mar 2019 09:28:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A83A2292F7; Mon, 18 Mar 2019 09:28:08 +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=-2.9 required=2.0 tests=BAYES_00,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 8EF09292F9 for ; Mon, 18 Mar 2019 09:28:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 751A86B0003; Mon, 18 Mar 2019 05:28:06 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 700976B0006; Mon, 18 Mar 2019 05:28:06 -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 616756B0007; Mon, 18 Mar 2019 05:28:06 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by kanga.kvack.org (Postfix) with ESMTP id 106056B0003 for ; Mon, 18 Mar 2019 05:28:06 -0400 (EDT) Received: by mail-lj1-f199.google.com with SMTP id p18so298916ljc.17 for ; Mon, 18 Mar 2019 02:28:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state :content-transfer-encoding:subject:from:to:date:message-id :user-agent:mime-version; bh=DuZE/6E4RQuviBZlBT+hgki0y+7dVOZssCNASRxLWO0=; b=Yr8Yewk1xtl6VgNd5xbMSeu/97m6aGkb2xtU+IFM1DD5U2XUy1wLuuGi0GCwxL1qPC opk6XYzpdrBqtCkx4t0vt2aIhqVHNoJjEOD0iXhOeQo0nz3JFCB4ZOAyE2feCguM+Tzr YmKs7Hycj9TVgpq5mzIWVWthMZsHKofBLMFYI1A4fRhrtzuKCYbasfAV4H7pYy1ckBXo oDmVkYxE2/GPstsaeOLWAEwMvwbheLy0aAllidRGu+vRZQ2pLNbU5cztcs381hFJQBC0 iJ0VycV+YvL2GpmZDz7taMuHVEtZPGPoKp1wjfBvyLbOB7SakjCJaiC9B1WfeThXio9q 9CmQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 185.231.240.75 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com X-Gm-Message-State: APjAAAV5bezbgCTqvg5IRgX/4emW6oRYK0HBr2oirLXdTOFhUIZ3HFbt wdGyyjlP8uAUwErVW5qoegltgGnhO5AGG8r7VckzlL8zrVnkLPVnpZ+EoRMRrGlsrPav40fBLbL /f5Y20oNcnXiWziq3WSkX8cRd02Ar75gfMZxbj1jxm1M2jRcyd8r1UBxMqiuYoci6cA== X-Received: by 2002:a19:81c9:: with SMTP id c192mr9714475lfd.108.1552901285188; Mon, 18 Mar 2019 02:28:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxvXZmy+NmIt3TViVcRw1Mzs801sfHMDn77J4autaRtUzWWM53mzErgnFTbJKcI/iW9cOab X-Received: by 2002:a19:81c9:: with SMTP id c192mr9714432lfd.108.1552901284230; Mon, 18 Mar 2019 02:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552901284; cv=none; d=google.com; s=arc-20160816; b=i8GWMtIZ5N8XeRmUgNmCW8ufnQ+UVps++5X3rypFsfZHwfQfZUxcAnFbdEeGOGXTa/ g7O0uunV8vVL9VrniSi3kOMYF6oDeiY+7OGL/7GcdDJ55xfPeqoaGKhwxwyahST7uapd HHRhi/sDwNcHJVpcUoMNeOyfliz8K52TqzWDmvlp6YlTH096vH+ImCnGb6vKFlNy/pJE Afs1Jv8uS6LWo6yoq6bNQk5/JSHYBlZpk8huP1mXZ7v+tAns3QvtFdKCplzdWSAP3nGm fPFbKKq0yXbpeOLNjjS21OBii3Hj9HoAciyitAXih9e3kO76RgbKrLqenGweD+OzC5Aw dQJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:date:to:from:subject :content-transfer-encoding; bh=DuZE/6E4RQuviBZlBT+hgki0y+7dVOZssCNASRxLWO0=; b=rSKqvtqhGYJFDd+bBFIzHTCaouzFCDikSayPtixtcH5NaQRFgPpfhK2fsIG1aSSe1+ +dVcW9JQChMTn1rAiTYOmctt6OIXuF9r6yBgvGs0+GaZ8AScsSLrbgbVyOxRZIpmFs/G 4i30pTpVOuu2WKk1ZSl/tbEA7YAcIozukwH3NsHKvj/FWhUOPgJM4TJfmIY/w261tJyl /S26UA25V2jNX9s49tHKeYw0K69Pw1llakqC6IarBLkgxTIPo2e/1qwnJPXOae7TnESv mnb05QZ9OWoCLCAzPsP4kC8ofKo2X/hX/i+i5EIlbxQLdZA9Bnn7Y4OU9qI6VrAAvoDU iX0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 185.231.240.75 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from relay.sw.ru (relay.sw.ru. [185.231.240.75]) by mx.google.com with ESMTPS id s14si6912842lji.137.2019.03.18.02.28.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 02:28:04 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 185.231.240.75 as permitted sender) client-ip=185.231.240.75; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 185.231.240.75 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from [172.16.25.169] (helo=localhost.localdomain) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1h5oYk-00054y-Ad; Mon, 18 Mar 2019 12:27:54 +0300 Subject: [PATCH REBASED 0/4] mm: Generalize putback functions From: Kirill Tkhai To: akpm@linux-foundation.org, daniel.m.jordan@oracle.com, mhocko@suse.com, ktkhai@virtuozzo.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Mon, 18 Mar 2019 12:27:53 +0300 Message-ID: <155290113594.31489.16711525148390601318.stgit@localhost.localdomain> User-Agent: StGit/0.18 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: X-Virus-Scanned: ClamAV using ClamSMTP (This is resending of the patchset, rebased on next-20190318). Functions putback_inactive_pages() and move_active_pages_to_lru() are almost similar, so this patchset merges them in only function. v3: Replace list_del_init() with list_del() v2.5: Update comment v2: Fix tracing. Return VM_BUG_ON() check on the old place. Improve spelling. --- Kirill Tkhai (4): mm: Move recent_rotated pages calculation to shrink_inactive_list() mm: Move nr_deactivate accounting to shrink_active_list() mm: Remove pages_to_free argument of move_active_pages_to_lru() mm: Generalize putback scan functions .../trace/postprocess/trace-vmscan-postprocess.pl | 7 + include/linux/vmstat.h | 2 include/trace/events/vmscan.h | 13 +- mm/vmscan.c | 148 +++++++------------- 4 files changed, 68 insertions(+), 102 deletions(-) -- Signed-off-by: Kirill Tkhai Reviewed-by: Daniel Jordan