From patchwork Fri Sep 16 07:22:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12978206 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71E20ECAAD8 for ; Fri, 16 Sep 2022 07:23:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2C7E38D0005; Fri, 16 Sep 2022 03:23:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 28A658D0003; Fri, 16 Sep 2022 03:23:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01DC48D0006; Fri, 16 Sep 2022 03:23:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id DA7218D0003 for ; Fri, 16 Sep 2022 03:23:43 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id AE620161AD9 for ; Fri, 16 Sep 2022 07:23:43 +0000 (UTC) X-FDA: 79917108726.19.46E49E2 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf29.hostedemail.com (Postfix) with ESMTP id 631711200EE for ; Fri, 16 Sep 2022 07:23:41 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MTQSM2072zmVSP; Fri, 16 Sep 2022 15:19:47 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 16 Sep 2022 15:23:34 +0800 From: Miaohe Lin To: , , , CC: , , , Subject: [PATCH v2 00/16] A few cleanup patches for mm Date: Fri, 16 Sep 2022 15:22:41 +0800 Message-ID: <20220916072257.9639-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663313021; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=iHSSISL7TcgZjDvxCCMswsFpPOKLoEi/6m4dXMndt/E=; b=MWT1UF57mO+kpp1rRrU6yhGMcnrzNUJcwhp1p0cdpXa2uJhu3uCiFq/P8g606OIHbSGH95 hefTfqfQwawk62rDK52WC5f9k9lXd7THGAXpZWM0sEpq42Pkv+ETGVJbDDavtReoBJ7XQQ QcbFttoIEiNMj3btlM+lHJPDIwzD2PQ= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf29.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663313021; a=rsa-sha256; cv=none; b=N2VHdfXjpbp306yZ0W4J0hnyH3OowwINR1iIcHdhg1wWc5NN6pXrlfCy2+Bei8UlcaWZwl bF+SpBThJPLxMlsXf+MqMDgd/joML6wHTZj6/+oIDanjt35A5mj9+uU1EaZtvDQrsGxhWg iJNwMyW4xRjcuxhbtT85NKqgEel38b4= X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 631711200EE X-Rspam-User: X-Stat-Signature: 77ce3wsywztgsko6ur8a5rwu9pmghwuj Authentication-Results: imf29.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf29.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-HE-Tag: 1663313021-328944 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 everyone, This series contains a few cleanup patches to remove the obsolete comments and functions, use helper macro to improve readability and so on. More details can be found in the respective changelogs. Thanks! --- v2: Thanks David, Oscar, Anshuman and Matthew for review and comment! Collect Reviewed-by and Acked-by tag. 3/6: Further remove NR_PCP_ORDER_WIDTH per Matthew. 8/16: Tweak changelog to better explain the issue per Oscar. 12/16: Adjust if block to match comment per David. --- Miaohe Lin (16): mm/page_alloc: ensure kswapd doesn't accidentally go to sleep mm/page_alloc: make zone_pcp_update() static mm: remove obsolete macro NR_PCP_ORDER_MASK and NR_PCP_ORDER_WIDTH mm/page_alloc: remove obsolete comment in zone_statistics() mm/page_alloc: add __init annotations to init_mem_debugging_and_hardening() mm/page_alloc: fix freeing static percpu memory mm: remove obsolete pgdat_is_empty() mm/page_alloc: add missing is_migrate_isolate() check in set_page_guard() mm/page_alloc: use local variable zone_idx directly mm, memory_hotplug: remove obsolete generic_free_nodedata() mm/page_alloc: make boot_nodestats static mm/page_alloc: use helper macro SZ_1{K,M} mm/page_alloc: init local variable buddy_pfn mm/page_alloc: use costly_order in WARN_ON_ONCE_GFP() mm/page_alloc: remove obsolete gfpflags_normal_context() mm/page_alloc: fix obsolete comment in deferred_pfn_valid() include/linux/gfp.h | 23 ------------- include/linux/memory_hotplug.h | 8 ----- include/linux/mm.h | 2 +- include/linux/mmzone.h | 12 ------- mm/internal.h | 3 -- mm/page_alloc.c | 63 ++++++++++++++++------------------ 6 files changed, 31 insertions(+), 80 deletions(-)