From patchwork Mon Mar 8 11:28:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12122029 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.8 required=3.0 tests=BAYES_00, 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 897ADC433E0 for ; Mon, 8 Mar 2021 11:28:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 091916024A for ; Mon, 8 Mar 2021 11:28:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 091916024A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 30C068D0020; Mon, 8 Mar 2021 06:28:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E3F48D001D; Mon, 8 Mar 2021 06:28:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 135618D0020; Mon, 8 Mar 2021 06:28:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0045.hostedemail.com [216.40.44.45]) by kanga.kvack.org (Postfix) with ESMTP id ED0538D001D for ; Mon, 8 Mar 2021 06:28:53 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B20F84405 for ; Mon, 8 Mar 2021 11:28:53 +0000 (UTC) X-FDA: 77896484946.30.96E7157 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf04.hostedemail.com (Postfix) with ESMTP id 403A53C4 for ; Mon, 8 Mar 2021 11:28:52 +0000 (UTC) Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DvGJj2Grcz17HFn; Mon, 8 Mar 2021 19:27:01 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Mon, 8 Mar 2021 19:28:36 +0800 From: Miaohe Lin To: , CC: , , Subject: [PATCH 0/5] Some cleanups for hugetlb Date: Mon, 8 Mar 2021 06:28:04 -0500 Message-ID: <20210308112809.26107-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected X-Stat-Signature: pwet8ifc17b16hz9itfg5grm3ccfdtnz X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 403A53C4 Received-SPF: none (huawei.com>: No applicable sender policy available) receiver=imf04; identity=mailfrom; envelope-from=""; helo=szxga04-in.huawei.com; client-ip=45.249.212.190 X-HE-DKIM-Result: none/none X-HE-Tag: 1615202932-770884 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 all, This series contains cleanups to remove unnecessary VM_BUG_ON_PAGE, use helper function and so on. I also collect some previous patches into this series in case they are forgotten. More details can be found in the respective changelogs. Thanks! Miaohe Lin (5): mm/hugetlb: use some helper functions to cleanup code mm/hugetlb: optimize the surplus state transfer code in move_hugetlb_state() hugetlb_cgroup: remove unnecessary VM_BUG_ON_PAGE in hugetlb_cgroup_migrate() mm/hugetlb: simplify the code when alloc_huge_page() failed in hugetlb_no_page() mm/hugetlb: avoid calculating fault_mutex_hash in truncate_op case fs/hugetlbfs/inode.c | 6 +++--- mm/hugetlb.c | 21 ++++++++++++--------- mm/hugetlb_cgroup.c | 1 - 3 files changed, 15 insertions(+), 13 deletions(-)