Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2278199pxp; Mon, 21 Mar 2022 15:42:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnTnEKbg87+z/gWD29TXZWubWK1CZEZzuNUKyRXGVHqzYkfk+trB93LIJw2m/9zLBZWwSq X-Received: by 2002:a63:4665:0:b0:374:7305:dab4 with SMTP id v37-20020a634665000000b003747305dab4mr19852163pgk.256.1647902521881; Mon, 21 Mar 2022 15:42:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1647902521; cv=pass; d=google.com; s=arc-20160816; b=Cb29ZgGLzatGCHVWp1qjkpVQljavQKdxHxbPb7GXNaxnzIwdLfYuNYjI7l0Tqd5AD6 V4AZqWIJfTGmVVAdUbuS71/WlrxJkww6Uvo0j6FMFjZhi+kJ1TzclDEoXBG4OnUM/SaG 7ZuhjELDrj+eXebZ0ksL7pKeKzC207zqOSk92Gbs4N9dRVMo62h+SrCpqrGNwFtBFPUJ Ip4h5alxq+Kf8xhxHbreHbZa9D4F4fukCTWqXNZ7yDK6yAH9392oxdx/pgn+qAtvKoU+ Ho8bpBQaOYyKIUx6a23Voxbtc82O4p9//oY2E7cXA0SCY/uNDSYtLQjXvPY+U/ThB4L+ l0/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=sFbAVOgB5L3qOPG9VdCAPxzY821z39LgMQbDCE9M8Vo=; b=tVtfPF0AuvycOTFBL0bRGyBuGu+oy7BgaNHMbpraOUDuTH9Z40GoE8SLBDqBIi5b7B ERXas8GQ3gqmzFWYilTUya42e6FBo9o7MN46MxmbLkBJz7tsSBmFPeWQZ269g8qR4eHn Sx/AvoG3hFVtN1gyUfREtx4rj9U5ic18g3m6z+99XM2IqBbyf5nqM6TXZx9u/1tnJFUa d7SwlesL/duwNsj4qWbgpTlsRr7T83rEZTI1iF81cd3J2MXIU+7ywcQreWLUubeGqk94 SOGCT5vdJBEdfiklEFQFYumvKXej76kLL8Ja3i4syqVOjYViQA8LN7nilh/xXO75yuOz s1ag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=O6BRFysn; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x8-20020a17090a788800b001becc857a91si468764pjk.79.2022.03.21.15.42.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:42:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=O6BRFysn; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5960062C87; Mon, 21 Mar 2022 14:52:58 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353315AbiCUU23 (ORCPT + 99 others); Mon, 21 Mar 2022 16:28:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344532AbiCUU20 (ORCPT ); Mon, 21 Mar 2022 16:28:26 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2086.outbound.protection.outlook.com [40.107.93.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4406F165BB8; Mon, 21 Mar 2022 13:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gZbO0KdhBiORkhiif0BsALcp9sgyuD+KeZa9N38C1tR1Ot7cZcDsR9dC/UcNM5hq3DayL2RTi5W9AIqrZfLkXtDlxenGJQtggQxdKiGS2vFd4VfvzwMmWXk+8jaaSRFi3j5KHqnNEI5Sr/kCGKHa04pktENxuU252WRJPne4GuuCUZfKsCal7Flg+UoGXvHAcx2j3C3tGMQlD0/1wn55yfT6bEQ83IoscRAmpaflVxCvJkuugL5s8n5rYvZno7bDgpdVj0/x7Ptf+5Uq9E60SOTzSXvN1bCecrCPvzNPxMUMQBQhtaYntNb6lKWWJjRSeMci5Ke0PcHL/dvc1IuWlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sFbAVOgB5L3qOPG9VdCAPxzY821z39LgMQbDCE9M8Vo=; b=OUg0iO/X+cTz1etgFk3FkL284IZp2MmSPIrokeTItQXghEWV08gI9zYUMqUuwsvrH4afx/2NXonAzhn/TlgpE1y2xzSJ8S522QJy+f3nt48Idj6d3zsSZ87s79i/79AoCIBkCkqIwzEgPGWa0DLeLsjZzQJBmZCcuq5pUXYRAvG8s749twKmvqnev4MlZGAefOAyGCMAWCmbKcuE+sbUZB3KKdxG0FbnlTQp//7DiZvEGpU8ZeWlagZvTD0qnwu8CG6DjILuhJ11+dvQiD4D6WNtWpCpgoIDR/iHWpoCPQf5Gk5d/AaIu5ThmELIpJPEdW9zU+uDD0jvYSrIfgZgHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sFbAVOgB5L3qOPG9VdCAPxzY821z39LgMQbDCE9M8Vo=; b=O6BRFysnBo22kJOzG33391zJ3P1+7YUzmBUm9pGfnxJ3h+B9z6RFZnCumP+C/LhgfIiHcrVtbV/g6MDeT1+QxLar/5P7r2yeIM/zi03WlTqlaTt+SZ1gLHfeOPVlIVGiCu+APv31PUyN3bmoX2vyXjWOdQkvw7rGcBRGQuS6t05ziwk5mP8ROLChnXjwAv0ivBx7seP6w3DZjEvvJpj6BbZvQrWFZbu+P2XNlzSAGuXGrziMLP+B4fC3YG2TpR7I6pkNKkFwE7Ez3tUug0wprFUlFOvCp7MGsKosZ9MRXVKTt92qXBpJfvr7MlNV1JycStcHoOv0YXMb9rmUarfuNg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB3823.namprd12.prod.outlook.com (2603:10b6:208:168::26) by MWHPR12MB1504.namprd12.prod.outlook.com (2603:10b6:301:c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.14; Mon, 21 Mar 2022 20:26:57 +0000 Received: from MN2PR12MB3823.namprd12.prod.outlook.com ([fe80::40a6:6e1d:b057:a036]) by MN2PR12MB3823.namprd12.prod.outlook.com ([fe80::40a6:6e1d:b057:a036%6]) with mapi id 15.20.5081.023; Mon, 21 Mar 2022 20:26:57 +0000 From: Zi Yan To: Matthew Wilcox Cc: Roman Gushchin , linux-mm@kvack.org, Shuah Khan , Yang Shi , Miaohe Lin , Hugh Dickins , "Kirill A . Shutemov" , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [RFC PATCH 1/5] mm: memcg: make memcg huge page split support any order split. Date: Mon, 21 Mar 2022 16:26:55 -0400 X-Mailer: MailMate (1.14r5870) Message-ID: <2FBD6D12-EDBE-4061-8738-E5E333F2367C@nvidia.com> In-Reply-To: References: <20220321142128.2471199-1-zi.yan@sent.com> <20220321142128.2471199-2-zi.yan@sent.com> <0001CABA-9436-4EFF-9C7F-F67300D09DA1@nvidia.com> Content-Type: multipart/signed; boundary="=_MailMate_2F541385-50E7-4360-9312-72AE9C63E581_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-ClientProxiedBy: BL1PR13CA0314.namprd13.prod.outlook.com (2603:10b6:208:2c1::19) To MN2PR12MB3823.namprd12.prod.outlook.com (2603:10b6:208:168::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f5b324fe-a083-41ef-4a46-08da0b79256d X-MS-TrafficTypeDiagnostic: MWHPR12MB1504:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JdGMmIWHqJ6ypqNeOOMf8yIJYGLTe5M0tHoPXicXWhe/cBYDAHjc5IpTTmnkvWT6Iym9kT8oaWEt8O2jB2vDnHEsdF4OTVDaxqNDTh/LTkIKpYnXcu+Cff4JWzlPnOCQv3kQNKSF8L/4jaaw/JV7+wiT0zxRqncVfacAA7JzDmgcwuVu3gRhY/YenYt1OBUH6spkXm+ZFQHmw6PBJ0MH+xjpZhswD5SXXGsFjbPEtbCGr7o0S2WBzu7WdFdjyI9nZbwBulLkW9j1HupOT330ArswawzlcMzu+Wy0gSDZUK4/sczDlzLyITIyBta0UOa3lcBX3jWz1ipZrQVZDiLcHRH/0GtM4vxthuqSYrFZZwdryyGG+QkNQ5MuIsvteUcPcGmUFXpInookKqy10A3ZnhHzGgVgWKpdxCjAZj2RN9tsH1NvD71MrTcB4salIzQsEwBwQ1vXvqgxxs22njzOFvF2MP0ozokIxnIWIsVMMAi/VLSMC70C0NYRDOSijpt+TI/k80n+v6Em2Lc74/TTB0mOjsqV1rtCv0F2VAoi7G6Ui86nZAwi4fmaRHhjDoasyC6RidIFOlEkLIhsmTIvlwPn9wc/y/Qeg61FAKmbISxznkqtSnTQIBPU4z08xhxsHBi6DGuOcmvfMBchF5x6si2+Wvie81hCHWqaaT1ZQUD7h4IKnKomjU/VqqWbwZQczHM+eRzja/xGitqSGNZgqv18i4yXmcOqiVw/blKUgkLs/36Y5fz16cBEVjmKBw2d X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3823.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(508600001)(6486002)(53546011)(6512007)(8936002)(21480400003)(7416002)(86362001)(235185007)(2616005)(33656002)(316002)(36756003)(26005)(186003)(66556008)(6916009)(4326008)(2906002)(54906003)(66946007)(66476007)(8676002)(38100700002)(5660300002)(6506007)(14583001)(45980500001)(72826004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?+fCjQHpwU1zqSFJVuuguqPGXfn+HT2uT1FiR5ndIECRSFrWBCBRZX6cv1iK3?= =?us-ascii?Q?FxXspqlIY6swy1K0cDYuHfh84DLp0KnT8jKePKMdwNAorOMBsYM/DOFtwy/r?= =?us-ascii?Q?YzzhcMEMwSbvf8nLhjtfe6PiyaTFLysyY4/LUKFLeJpCZBF//L6hCD7oIcqu?= =?us-ascii?Q?g3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NAOIhEloZbfHMOueofZ?= =?us-ascii?Q?/7bkE2ovng0Odgjl2tAqjWTGeygItvvr9amrNwpHRa8bNDrfEBqbJ6nG7b+B?= =?us-ascii?Q?RMQY2Kdd+IwfiuM9KNuxTTI4L3oUoSxY1wn5dMTMkjrSvL8lUpPr3qYVy1vD?= =?us-ascii?Q?NWRnhUp+6gULQjyf7QbnvqUPN0o6ODtAk22zq+zcjxmdEwZ6N/QcyhHLF1rn?= =?us-ascii?Q?YvjVs7jU6a4C3j5K9iBT/FAxoxOtiTH8OmPXcXfxreOsbnd1xpOqFffPF9xY?= =?us-ascii?Q?bpMTF9RR29DAqQjxHsv4FF1vHOxaYNA8ORMskUqPGs8RIT7d3OewduAfCgz+?= =?us-ascii?Q?p/2w6bXmE3x+IF7hTyJ22cpPoJqPVrqIPZj93HKJ1iwEmseDPZ5vE/DULYhY?= =?us-ascii?Q?xHU5ER0PKP4Fsh4F6+PCOin2zTAPjI4F?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5b324fe-a083-41ef-4a46-08da0b79256d X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3823.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2022 20:26:57.4932 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XH8FX1ft2ApTKrL5nOforLoqtvKeWFR0L238w1AQIy4Ptkyf2DWVsB+8fzol5RDT X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1504 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=_MailMate_2F541385-50E7-4360-9312-72AE9C63E581_= Content-Type: text/plain On 21 Mar 2022, at 15:54, Matthew Wilcox wrote: > On Mon, Mar 21, 2022 at 03:07:46PM -0400, Zi Yan wrote: >> Yes. Will change it to new_nr to be consistent. > > uh, you're going to call ilog2? fortunately, no. Inside split_page_memcg(), I probably need to add VM_BUG_ON(nr % new_nr != 0) to make sure new_nr is a divisor of nr, since there are a couple of nr / new_nr operations. Otherwise, new_nr works. > > I think this would look less inconsistent if 'nr' were an unsigned long > (how long until we need 16GB pages? Think PPC already supports those) -- Best Regards, Yan, Zi --=_MailMate_2F541385-50E7-4360-9312-72AE9C63E581_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEE6rR4j8RuQ2XmaZol4n+egRQHKFQFAmI435APHHppeUBudmlk aWEuY29tAAoJEOJ/noEUByhUJIAP/0CzSz8P2XRJkZdEbGhs9vL53wFcpYK/PFGx uT4zo+m6uD/rpMvXfGAvp9rebHsSbru2PFo4BIuPuaiuuuqFv7ESdHHDv9x5Y7jc dV44hJjFEh+sTMJPORbdwk28U974xQYab4Ay1dAn5eemWg7GpQm3GOsa9aa6TT0J Bg/OLxsswJoKkVAPLEzRo9r9JpVh09Jgmic0kAHTLTsbckKxvKu+H0CUzXxcZm5T 46j2jpInUExeLDwrROzxSQ9OFrE3RliH5ojmKHWjxikWVRyEmA8YEu2+PAz8fy8s 3/FlI9lFFbe+j9iSeSe46l/A/guyK6HTORXDmy9pf2DXByYbOgIS5f5jT1K7QVNl PzJrn/VZ9PPcVHHFKL1rinRo4TuAiyr1q0qeUiOGdAyvcmIyX75V01PIxSqNbKuL qEYGaNsr84ekpbACtY0VpRGVlIbQfZnFb/e8FEko9dFYL8oMLyaoWDHj7eFWN4RU xk+zU9szLijVJaJw9jOpawZ0pPlNv68NzMIpcNSRXDZnajxBfslmnrDA5JwM+QqU mS1mUepZUb2Br3Sk2t7wH/K2cvmnHLQDThcHpPv+cDR+kKEV7L9XxOh8LNDZBFmD wP/ri2AdsnDN9SVatmf7hcZU2y13FGKiS73584xn6sgl4QXeK0m6en3RfVjnj4IZ 9bAK/5nO =1XBK -----END PGP SIGNATURE----- --=_MailMate_2F541385-50E7-4360-9312-72AE9C63E581_=--