From patchwork Wed Sep 1 10:27:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zheng X-Patchwork-Id: 12468989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67FE0C4320A for ; Wed, 1 Sep 2021 10:27:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0ABE560F6F for ; Wed, 1 Sep 2021 10:27:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0ABE560F6F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id A3A8C6B006C; Wed, 1 Sep 2021 06:27:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EAAC6B0071; Wed, 1 Sep 2021 06:27:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D98A8D0001; Wed, 1 Sep 2021 06:27:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id 7E9F86B006C for ; Wed, 1 Sep 2021 06:27:34 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4412B181E48F9 for ; Wed, 1 Sep 2021 10:27:34 +0000 (UTC) X-FDA: 78538628028.23.5E2E1E1 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by imf27.hostedemail.com (Postfix) with ESMTP id 7D07B70000A4 for ; Wed, 1 Sep 2021 10:27:33 +0000 (UTC) Received: by mail-pg1-f177.google.com with SMTP id k24so2273529pgh.8 for ; Wed, 01 Sep 2021 03:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rdLWPNlr2o2VGQKs6yMiulbcewjUkJEpjEDyxs856Jo=; b=HQh5dd3NEOPvmgmvw5Hm2HI//JYez9GvSeWCvLHE/l7cDlybq6m5QB/DQw2oFnbUyX 6lqNLpQ7aR/qL9dBjLIPOvIQwlCE2UuJGeK1E6qBpZyGk7N0i4Nnvzg2aAAtEV6Y+0mi RhEQkI2zxhc/clSNpvArSD/j/fqeSH6Zz6uThMdrOdyV8vWmGjT7wioKUr02+NeDOyad dDw4gKSKZFnmmeZ+Sdx8alU22hPKmQJbhBzyreDjkQ3XREdtwb08Xld6QaL49vOyH+JI zMtp3UOu7lCzZreZaPiCdMz6P3BlzfYjs59ljp1Rad46Jrkc/ytjyoTa8O71uRlhAKgP Vevw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rdLWPNlr2o2VGQKs6yMiulbcewjUkJEpjEDyxs856Jo=; b=OCVbb8CfhAoqdYjCUjAaD/CrAmyzt4E/48Jwf9xitnfNPobVC2bs2JDLk2AP5aNobf 4eMIpOojh0XWTDl2pihPzd/BY0H7V9IUhomHQQx18nShexgQmOZgb773oW83v57nQV6T GyRP//50Z4c4fear8YKIM/cNvNfhy1hBnuTOS+bt8qwjMM41JQm8RXvgYk7ZsLcaOpQS 2VUHQe/TUduBZ8z+XpoChGfLRghDWqTz92Djj7MFB0Cg8wMYbUr/rlmV6oF3UdxzRKwL ykAWipEWmGLNnxZ5zUd0a5Xb6A7c9Hu4En3PZzNxcGLMWvxfi5kIqsUvofKt15oI5u4C F6Yg== X-Gm-Message-State: AOAM530W6quphuYpThZ+CsPqxpNhqJpD8J4wFEceTs9I+QOwmZGjWQXg oiJZ+8Kl5N2eLqVRla/il0thxw== X-Google-Smtp-Source: ABdhPJxwN7E+eBlVRqTpWQPGRAkwixB/l2TIHvOUXhSDO+sI8n8sfWMEdbyDMhle95rN6O8ZZqsmHg== X-Received: by 2002:a63:515f:: with SMTP id r31mr31104283pgl.41.1630492052286; Wed, 01 Sep 2021 03:27:32 -0700 (PDT) Received: from C02DW0BEMD6R.bytedance.net ([139.177.225.254]) by smtp.gmail.com with ESMTPSA id i10sm5291497pfk.87.2021.09.01.03.27.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Sep 2021 03:27:31 -0700 (PDT) From: Qi Zheng To: akpm@linux-foundation.org, tglx@linutronix.de, hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, kirill.shutemov@linux.intel.com, mika.penttila@nextfour.com, david@redhat.com, vbabka@suse.cz Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, songmuchun@bytedance.com, Qi Zheng Subject: [PATCH v3 0/2] Do some code cleanups related to mm Date: Wed, 1 Sep 2021 18:27:20 +0800 Message-Id: <20210901102722.47686-1-zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-Rspamd-Queue-Id: 7D07B70000A4 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=HQh5dd3N; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf27.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.215.177 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com X-Rspamd-Server: rspam01 X-Stat-Signature: n7538rkp914nayx84okmhp4kwp87crdz X-HE-Tag: 1630492053-685994 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, This patch series aims to do some code cleanups related to mm. This series is based on next-20210827. Comments and suggestions are welcome. Thanks, Qi. Changelog in v2 -> v3: - Move the declaration of pmd_install() to mm/internal.h Changelog in v1 -> v2: - Fix some typo and code style problems. Qi Zheng (2): mm: introduce pmd_install() helper mm: remove redundant smp_wmb() mm/filemap.c | 11 ++----- mm/internal.h | 1 + mm/memory.c | 86 ++++++++++++++++++++++++----------------------------- mm/sparse-vmemmap.c | 2 +- 4 files changed, 43 insertions(+), 57 deletions(-)