From patchwork Wed Jun 12 09:24:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiu Jianfeng X-Patchwork-Id: 13694699 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 7A12EC27C77 for ; Wed, 12 Jun 2024 09:32:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DFB976B009E; Wed, 12 Jun 2024 05:32:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CEC0A6B00A3; Wed, 12 Jun 2024 05:32:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A9DD56B009E; Wed, 12 Jun 2024 05:32:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 7DB3F6B009D for ; Wed, 12 Jun 2024 05:32:02 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E8A211208C3 for ; Wed, 12 Jun 2024 09:32:01 +0000 (UTC) X-FDA: 82221720042.20.28CED4C Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by imf26.hostedemail.com (Postfix) with ESMTP id 575D714000D for ; Wed, 12 Jun 2024 09:31:58 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf26.hostedemail.com: domain of xiujianfeng@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=xiujianfeng@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718184720; 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=eM+kT6Uy6cDa4SEZ/JtL5zmg4LD+AaMfU2X8RqDyfqo=; b=b3foy9j3UtTrDc5aeeaifQrqtErav5v6dImuf8RlKC519jMwbzYVNbCh+W//zM4GI7DTOP KOjUwI6wviTW9TYxw0ooy0g64ay1ikUppFEQRBfW5xXo3FP0PDfTR8oLeW1BK2qeOT4Zdu DKHod22F16cwOx03Mk543PraHnQFeZU= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf26.hostedemail.com: domain of xiujianfeng@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=xiujianfeng@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718184720; a=rsa-sha256; cv=none; b=Dz2GqSQw8wRUbmQ8r6g46a75yQYc1Ri87GrMzMbrUO5hZ9D73ocK+Y04dWXH8oCMZGaAsg N8IoZZm8kv8KF5eH+II+bxT1fvUTQl0bLlRjS9eL/RKFrlnmT64US2cnq1tSFBq3WBnITc 4jm4pA2dF3+zp9k1933vJUQmtndzkwY= Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4VzgJ70ZdFz3NtZ0; Wed, 12 Jun 2024 17:30:31 +0800 (CST) Received: from dggpeml500023.china.huawei.com (unknown [7.185.36.114]) by mail.maildlp.com (Postfix) with ESMTPS id 502AA180045; Wed, 12 Jun 2024 17:31:54 +0800 (CST) Received: from hulk-vt.huawei.com (10.67.174.26) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 12 Jun 2024 17:31:54 +0800 From: Xiu Jianfeng To: , CC: , , Subject: [PATCH v3 -next 0/3] mm/hugetlb_cgroup: rework on cftypes Date: Wed, 12 Jun 2024 09:24:06 +0000 Message-ID: <20240612092409.2027592-1-xiujianfeng@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.67.174.26] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500023.china.huawei.com (7.185.36.114) X-Rspamd-Queue-Id: 575D714000D X-Rspamd-Server: rspam10 X-Rspam-User: X-Stat-Signature: eo8gkds9nuo1euyex1wquu46c5jkysyn X-HE-Tag: 1718184718-695421 X-HE-Meta: U2FsdGVkX18Vs+BMZY/3eM2wlj1/yTYtETagu6wXShpbU7Wncv5I9hIu+1Atzge1XRA0KFiBPkjeL8Kg4vDu4SxQrNNVe9+s/9+N5+7jqrwDqf5m7EwW8gJ4pG94DaCcsNlhs8k2VkQqkrMmQL1Xe24Klq/pfWUvXc0FxY/3ds2Ud/9twT7FTgyyOVa92svq3NotyKBq9Toc7uEOstwz4jCwCD6gUhYYLs8sno4LpD58zM7Uuy0PBXm6qoTOvKU/3OBkCnEtXJBvaljukIOzmAsbWmLC28sE9NsBvvYvY9LJmcSy8tYjwIsUJLnx9glI1bcPgrDkZ39WIbANGkgfXXQHEAarRx+1D79ihn7eyDMmCIcwAt3fXHRnDI7tX5t0G9NzMeQHKqGdLE5uaK1J64MRdzndBFz/L8Q0d99yW5YjHixjR2D8TwzVURiGpbMvxzBsUlHXUaEX5d9Xley5Xw8OSxQYDAxODr4MkkZJroedt6U2t5jpiQteKgfst78/uzDqGG9CBoRBgxAtBkp8UHTwKjhxG+5iQQR2STxqZ4OhXLmjyCpvBFr7fQWZ40oVBd+REIZq35BZxbXTx0T8TA69rQy1hXz8IGdN56CdAtabkcDmUcuwckA8fKxMKR4htZuJ9h5lCx0CJO1VAUPVAMadgYKyZX/9ZRKz7fwn4YzjjULSZ3gSRODlPrljqBXKYi3UtlZ3/75oPCeZCTiOyHfgIez14CNFUleMIfsTVTgHPle6KCX855R95VQBdM1A4CwDCVP/Kd2nSc4pJ+4xadVmCtz9TXmDxGCF1opYuNfDL0obvOgJsJr3hZX05jJrSKAKH2zNv9IkfzECmB86t67kQP13/h7hkRYChlKzHUb1G7WulzgSvxUQuKNRTkQmMkRBgWJgK/dFOAE80DLW1BgeqfMVxIHAZaFNpbfappadiFZbiBB0zNxEdXxbrZLKGL4rcVaTvlbCWyelW4N GKOLsgEe tHvxz8So6Pq7tq+kjxxCI7DRgjWRWUKpYuNPihLhWx46Qt7+BfaQ/Ks2lRsppEeWEAD3J5bAjWwxOws//prppsAnq1ftT9E/aq8RPJ3VJAflaHIn5zE37T+/mYcu0RSHRmpC0YfxCBkLPvLFaW7+kc/08aOb2GgVrDVJ3 X-Bogosity: Ham, tests=bogofilter, spamicity=0.149080, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi, This patchset provides an intuitive view of the control files through static templates of cftypes, improve the readability of the code. Changes from v2: - Add Reviewed-by tag of Oscar (the 1st patch) - Rebuild cft->private unconditionally Changes from v1: - Fix smatch warnings of 'tmpl->name' Xiu Jianfeng (3): mm/hugetlb_cgroup: identify the legacy using cgroup_subsys_on_dfl() mm/hugetlb_cgroup: prepare cftypes based on template mm/hugetlb_cgroup: switch to the new cftypes include/linux/hugetlb.h | 5 - mm/hugetlb_cgroup.c | 302 ++++++++++++++++++++++------------------ 2 files changed, 164 insertions(+), 143 deletions(-)