From patchwork Fri Sep 18 03:00:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Zhao X-Patchwork-Id: 11783915 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 DE709618 for ; Fri, 18 Sep 2020 03:01:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 92312206B7 for ; Fri, 18 Sep 2020 03:01:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="CDRIysij" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92312206B7 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 945086B006E; Thu, 17 Sep 2020 23:01:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8CD016B0070; Thu, 17 Sep 2020 23:01:00 -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 795406B0071; Thu, 17 Sep 2020 23:01:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0007.hostedemail.com [216.40.44.7]) by kanga.kvack.org (Postfix) with ESMTP id 5EC406B006E for ; Thu, 17 Sep 2020 23:01:00 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 27F633629 for ; Fri, 18 Sep 2020 03:01:00 +0000 (UTC) X-FDA: 77274680280.18.join97_4909f5927127 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 0521510033C56 for ; Fri, 18 Sep 2020 03:01:00 +0000 (UTC) X-Spam-Summary: 1,0,0,f824779e55a5d549,d41d8cd98f00b204,36ijkxwykcme516ohvnvvnsl.jvtspu14-ttr2hjr.vyn@flex--yuzhao.bounces.google.com,,RULES_HIT:41:69:152:355:379:541:973:988:989:1260:1277:1313:1314:1345:1437:1516:1518:1535:1541:1593:1594:1711:1730:1747:1777:1792:1801:2393:2559:2562:3138:3139:3140:3141:3142:3152:3353:3622:3865:3866:3867:3868:3870:3872:3873:4362:4605:5007:6261:6653:6742:8555:8957:9010:9969:10004:10400:11026:11473:11658:11914:12043:12296:12297:12438:12679:12683:12895:13069:13071:13311:13357:14096:14097:14180:14394:14581:14659:14721:21060:21080:21324:21444:21451:21627:21740:21796:30036:30054:30062:30070,0,RBL:209.85.160.202:@flex--yuzhao.bounces.google.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04ygttaqfzfzeus199rc59eue7j8oycgf9rejusnceaonoscr6gbweiw73h9pnd.y9rh1nss4e8wohcwc8xzmujuyfdjswwpyqn9yefjy9p4aazpeaq478wn1wh5wz4.q-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neut ral,Cust X-HE-Tag: join97_4909f5927127 X-Filterd-Recvd-Size: 5190 Received: from mail-qt1-f202.google.com (mail-qt1-f202.google.com [209.85.160.202]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Sep 2020 03:00:59 +0000 (UTC) Received: by mail-qt1-f202.google.com with SMTP id l5so3785465qtu.20 for ; Thu, 17 Sep 2020 20:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=MShH3I1oLcjvEJbj3NYW9C342mvg+PbbBJCOoSH1HSQ=; b=CDRIysijqlvkYU+kfz4ExesE+3SJEmw3l9qWCAyu0Yl6J6QfFZHDzRMn2cts4G/GOz due2AZm8uZnE02XEz5UeXJrQLnFVWnnCS9C/pPkMQNrCt04NXlx25xEYkfo0PmopvTxC 6Mc1ISZvlBE8hm/TYls84q50iEmrO8OTSwUfAOYHWxvmq5G4q3tHrvddW6BfGlAJaXXa 7jtZbfY4KCbYKA922DT7v4HaAYQlRavyHrrpgTJ650wUBUgxocGjlFGX5ZdwB2iFOxvt Sb0vnDNEX8KpkSdUPfi9dXotay6ssMYaQk9GrMx5bqH0g6TjEErAVqtu1pf7rtwPgd1d LRRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=MShH3I1oLcjvEJbj3NYW9C342mvg+PbbBJCOoSH1HSQ=; b=UEzyychB2Wp/JCa9RZSib+AFNyfHYbq/rqtu1bNVwOck25kiI3zVsXzygzpPY/KDNU +9zoHNah+w8Sm+Gzb5j9rYQgSSNHiprtqXykiFKyMfmZuJd2vZ8LN7HPHCvHeOAwr1bD 7J8AkNkf93tuHx9QOSf3wLF+NTTPQ2x3s5t9DcQXRElYd64m+NwSF8odQj8RVkbpCpx4 cWqIopj+9i2vpFLNw4lbDJk0JqZ/Sn7JyMBOcUKpDS8zdfYynmid9Sr/z1MwkGQ5Lng0 HqXdsd8kP6YADJ1oE+W6khhuChSO/FTB7edbyXX4CC0Ak/ZVxL3PBxPJXI+UjBVn24Fs nkzw== X-Gm-Message-State: AOAM5335WNHp0zhFentMA45apTt3EwvZDbCnzosrgnvGBkvleF5YDqHF ZZl4WHb95leZi+McgXmlF/RofVWe88k= X-Google-Smtp-Source: ABdhPJx5px4YCOzuxVaL63VwwQLE+zcsL6qsTZcmWHgsANcGMolFMRqq/fwgx6MIzZ049mi7yH0PVbKuSkw= X-Received: from yuzhao.bld.corp.google.com ([2620:15c:183:200:7220:84ff:fe09:2d90]) (user=yuzhao job=sendgmr) by 2002:a0c:b21b:: with SMTP id x27mr31580996qvd.12.1600398058666; Thu, 17 Sep 2020 20:00:58 -0700 (PDT) Date: Thu, 17 Sep 2020 21:00:38 -0600 Message-Id: <20200918030051.650890-1-yuzhao@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.28.0.681.g6f77f65b4e-goog Subject: [PATCH 00/13] mm: clean up some lru related pieces From: Yu Zhao To: Andrew Morton , Michal Hocko Cc: Alex Shi , Steven Rostedt , Ingo Molnar , Johannes Weiner , Vladimir Davydov , Roman Gushchin , Shakeel Butt , Chris Down , Yafang Shao , Vlastimil Babka , Huang Ying , Pankaj Gupta , Matthew Wilcox , Konstantin Khlebnikov , Minchan Kim , Jaewon Kim , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yu Zhao 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: Hi Andrew, I see you have taken this: mm: use add_page_to_lru_list()/page_lru()/page_off_lru() Do you mind dropping it? Michal asked to do a bit of additional work. So I thought I probably should create a series to do more cleanups I've been meaning to. This series contains the change in the patch above and goes a few more steps farther. It's intended to improve readability and should not have any performance impacts. There are minor behavior changes in terms of debugging and error reporting, which I have all highlighted in the individual patches. All patches were properly tested on 5.8 running Chrome OS, with various debug options turned on. Michal, Do you mind taking a looking at the entire series? Thank you. Yu Zhao (13): mm: use add_page_to_lru_list() mm: use page_off_lru() mm: move __ClearPageLRU() into page_off_lru() mm: shuffle lru list addition and deletion functions mm: don't pass enum lru_list to lru list addition functions mm: don't pass enum lru_list to trace_mm_lru_insertion() mm: don't pass enum lru_list to del_page_from_lru_list() mm: rename page_off_lru() to __clear_page_lru_flags() mm: inline page_lru_base_type() mm: VM_BUG_ON lru page flags mm: inline __update_lru_size() mm: make lruvec_lru_size() static mm: enlarge the int parameter of update_lru_size() include/linux/memcontrol.h | 14 ++-- include/linux/mm_inline.h | 115 ++++++++++++++------------------- include/linux/mmzone.h | 2 - include/linux/vmstat.h | 2 +- include/trace/events/pagemap.h | 11 ++-- mm/compaction.c | 2 +- mm/memcontrol.c | 10 +-- mm/mlock.c | 2 +- mm/swap.c | 53 ++++++--------- mm/vmscan.c | 28 +++----- 10 files changed, 95 insertions(+), 144 deletions(-)