Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp318818lqp; Wed, 12 Jun 2024 02:33:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDbQLQbtqfg24UMlj5Imm6sxCJbk8VMUpbHN80UxFc6xAcDyjO7BYXGmq02I8MjNVDvoDCMRV4KUGjxRsyfmPs+k5L5ETpzHhqfTkcqg== X-Google-Smtp-Source: AGHT+IGHGa4lj5/hUaSPpS1pZOBg+ADgRTBlMS3HoCxEuIWjk7Bic0uCYTI/8gvaD+xOu62FU6oj X-Received: by 2002:a05:6a21:1a3:b0:1b4:cd5f:4e0e with SMTP id adf61e73a8af0-1b8a9b8b574mr2451705637.14.1718184785395; Wed, 12 Jun 2024 02:33:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718184785; cv=pass; d=google.com; s=arc-20160816; b=zvPxqbegqkDqXMyw4oUNtqNQ2M0RUnhcZcKi69/47ZbDcHWUq47rABS3FnbHZOFSw1 g2A0P0JyrFTRjRihkQ717t10ysZiM8VhLN8klBxZehdMhGB4Z4lIjSAfdZqc5mGA2KpO hLuwHUWTGWh94Nh5+AZoaH8kI0Jju/On8F+sCJ8ByYiac7vtvO2M/6IYzSJakzWiiKDi ym5MVk62vFxfk4Bomm8qbKXkY5cPf21Fx63vmVpTGhA+6dKhP0Q/GMFbedJ0tjo1BNcN 2PiF/X9JD3PL86YmxC9xOUr1UqtIVS9HLPX8Sp3aGyAAN9B8Roh7tsUk01Vp4KBR6nmi iDmA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=eM+kT6Uy6cDa4SEZ/JtL5zmg4LD+AaMfU2X8RqDyfqo=; fh=p0KhMC7oyorkAvkQCuxq2LojmtRIybW5sGTlQYoXBNw=; b=FjFzpa3yDD7Arg7KuObpiNLMniZ4QzXNtAkhsFfLj/TOh5Q6tn2kfcAkYFwNFRCTqB vRWgqJko6VMAZaSwbeJmlE3b32gBLjNB2QpAZDyI3wm98vkIiQoCX1qRnBOtzK8yyAIR WR6PKl9r7RkCAirWZpLuN/tCuQeHUcUkEnc2tbczsQZn4pgqu/RUZyHAN38e8aotp5Eb N6XhksE9XXePS6JHDssAmw7cmi8nA2SUIoqxhu3WLqbBDoPh9pPi9IvIARbWwMdaXn5G 7UgTJ0K82wTxni8qr75+hiTdhepRZ6DLZunFp8G3p2c4ZatGOmZnP/CxqNIaaX5QUYu4 ZAPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-211271-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-703fd561686si11251661b3a.305.2024.06.12.02.33.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 02:33:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211271-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-211271-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1D01028498C for ; Wed, 12 Jun 2024 09:32:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00A2916DEC9; Wed, 12 Jun 2024 09:32:00 +0000 (UTC) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E621216DEBC for ; Wed, 12 Jun 2024 09:31:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718184719; cv=none; b=dv34AOcGf0gzET1ALpcVTWPN69WB4Mb2OygXUHhBek5UlDSQx/oJdQVvKFBunxKG3Xwu9+D5mPluvEggphlj2quOJ8qqezHY0fRADsuiHiQY8wu0l4Z/wF8YcIn8g/i7jk4BbYd/SR96AhYnAS15teSdUrppar4C/ZoPmklnnIE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718184719; c=relaxed/simple; bh=8eAtBtYwyhL+lg3rWQrxS5y/3P9gHZ+KMEUN8eVQcWc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=VwN3Krwaqcz+djFV579qQU3Cu6fTkU9FhkM+/rljUD6iSDVZIcHXUD6673VdYrk4OtZtjnaQQxsXngG6ddFtMLLZn3ba21CznhDLUQjLiI8/GmOMCzW6b5d2tTfXmaIU9Vr5U4xVU2ZtT2GaFNrVw7qUvVshbfzY8fPB5uWXU8U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500023.china.huawei.com (7.185.36.114) 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(-) -- 2.34.1