Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1749619rwb; Thu, 8 Dec 2022 15:00:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf5puUAZvqIIDmyF5893hMZ4Gg0jYuD6TQdALlBSmv8HXoKyAnwspmJ/riLLsULuLhUrbaRS X-Received: by 2002:a17:90a:420f:b0:219:4793:2979 with SMTP id o15-20020a17090a420f00b0021947932979mr3468702pjg.22.1670540405398; Thu, 08 Dec 2022 15:00:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670540405; cv=pass; d=google.com; s=arc-20160816; b=vAzvP+Vr2mXGcXBTCHouofK2OPLSl520JBYZc1oFMgdTCiz0eGF+pGsMoeOLvmfNVe /2SGECmq5otO7sfz/vTP6lhTyJzw/Uaxx8Az6bWeKkBGCYLeH5ucknmcGjb6UcbYx5vx TtgJTRnD5OrzFfVP+pviwK06Dv9Q9y8o/M1WXgrYEivcDwcAzX19s/DcwTBjcagL+vRS zwsRPbbk201lAnyYUwflh6d9RCGMe1CWfVYU0/tffRESBSGV/8faQ8/C52V61VcaQDFd ktf5ms9daW8JCss0gkjP4zG4pBR38kfLagJPF6sU1LKMCBWUSVjdJOWYSFwDJ4le9YZY hXsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=0uwceYZ720KAnCI8WxiLbTIaedLVaB08oAF3+3LrNW0=; b=P1Hr0mjbqsY8kmOP/VN4+fWLbqpPrPA/GdrvJ8fpYqN4J9FOdch24SqsWQArhJotIb sjNB8jKBAiNuAhUS+u0i/WrtTZZqLZRlcg2TKI6v3KVKD/WQ4jGBKIi+0nQx7sl/Yrj0 PPS3Ic1/ZSvLayx5sl5vEYIl1xqNuK7WZ0CGtyTgGEGVsmzgGxuXqEukA3mzGzGowcWo 0z88coSgaWgbKvUCpb6ShI9SPTgXS8E7Z2ldXlZHx2GSJhQR0i5dIfy0beNhATzEiL78 izL0phCOtE8XHFwekZuvIRghMRRtlQvWyTmLBfIR4adClaLMldo373i6iQALD7evssNm C3JQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b="F6TZ0/G2"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ZsEGgnOI; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a63db44000000b00476e764bb0esi25321035pgi.392.2022.12.08.14.59.55; Thu, 08 Dec 2022 15:00:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b="F6TZ0/G2"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ZsEGgnOI; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230127AbiLHV7P (ORCPT + 73 others); Thu, 8 Dec 2022 16:59:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230120AbiLHV6t (ORCPT ); Thu, 8 Dec 2022 16:58:49 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 131788B38E for ; Thu, 8 Dec 2022 13:58:44 -0800 (PST) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B8Lhvl9001624; Thu, 8 Dec 2022 21:58:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=0uwceYZ720KAnCI8WxiLbTIaedLVaB08oAF3+3LrNW0=; b=F6TZ0/G2qdtGZ3VFooQUwOYcpEUDAtZxncB+Bq3r0sXYZMV1kkSNylWIfZAdJVBg6g/U xgzg1WTLr4kPU4a9+N04wJQjjZkulOmBR6RintRTyVkjlguntyOj5rdh5FfK0IYx1TUp Hd/k/WNbJex07W2mFDG/qRlnCzCs3/G7JUjkPScAWzGU9UPqlxQu+mqLJaw0Vuai9Vcb P8XPcErbu0Fd5YdyLbfVDJj4AiMgCLQDmdK8fvSk2ZcU6PjxKJT/5iIAZoBZu2aVlBSN 620yxxyCkg9lj4LmTsib42bNUAbbDOVDYEQm5rQbh9Fo1XfJLLmHsoQUWeU/9zXL+oKG Kg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3mawj6u2bq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Dec 2022 21:58:30 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2B8LbEiM008390; Thu, 8 Dec 2022 21:58:29 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2042.outbound.protection.outlook.com [104.47.66.42]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3maa61h3rg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Dec 2022 21:58:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TeZxx4UnXeVA/H7DdZHDdeQhfcQAPIYcsQkvaVY5v/9qtNbud6mr5UFEY74V8dMdOjELivuCcbLTZevVhGY+NdP89XOE0kClTJo9EnMf7TAOdJcwFCNpFIQtmVXhsSpmmZHCNHvHP0I66Ju6rJ0qnjYMFjKLIHJv1uBroGklCtrA3VjYx55Vgru35uOF8zqfkXtMq7QiqlWVxpSfOfiXd4XUewYxDV9DYLA3Efj6y006gf1RO21KnFjJ6+qtAs0TuXSccQI+OfCpFx4eWqwL0tUgpLsdJy4/xYyilVoWKvDjVSacNcT6/I8FR6LUhr9Cne5L3i+LiQQIpdPYYHx8yA== 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=0uwceYZ720KAnCI8WxiLbTIaedLVaB08oAF3+3LrNW0=; b=fH0vvij+hNKkdybK5Ld68+46iWCbjkIp1F4fJ4QBAUcvhwrXX86NhlRPtnEEFfoHBB7+KFTqGMOq4E/Rrd2W/72MLQQ/msQSDOdpSWqT2MAyXopl5UXH+r8VY+O+IOHUyeeb6Z3mjnbUNBNGw8fipHzaYwj4GElDQKGbt8txbMm7yn++UUy5/ugIedv9s0dxIL4F8SeavSzZlvrQU1QPz/av4uH/qmpHjqxo/WBQhvPqiw9N72pisWodwZmwaCjbCM0EemkvDxNj6h5oBR/3k2yzMqpiZI8xiQ2RUutUEU9vx0QUDFSTh1XDLMt2R26QBDiApMwzniB21Hov/hixZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0uwceYZ720KAnCI8WxiLbTIaedLVaB08oAF3+3LrNW0=; b=ZsEGgnOIQBjrn4kVMj28rwgOVFPQzsKWawaSMoHp4VeOx1aQZ3ZoBBbbwYu15lekNTy70qFI2tkYv59CjFkOYA/47x5JGO7T3vOM0+UZoKI97k3SmG643QicvV7baQpgVjrQkdTo7sBZwh1ng5U/HjVXYK5AC9OA4WrhgE+supw= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by SA1PR10MB6613.namprd10.prod.outlook.com (2603:10b6:806:2be::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Thu, 8 Dec 2022 21:58:27 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::51be:1301:5ec3:996f]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::51be:1301:5ec3:996f%4]) with mapi id 15.20.5880.016; Thu, 8 Dec 2022 21:58:26 +0000 Message-ID: <2723541a-79aa-c6b5-d82c-53db76b78145@oracle.com> Date: Thu, 8 Dec 2022 13:58:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH mm-unstable] mm: clarify folio_set_compound_order() zero support Content-Language: en-US To: Mike Kravetz , Matthew Wilcox Cc: John Hubbard , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, songmuchun@bytedance.com, tsahu@linux.ibm.com, david@redhat.com References: <20221207223731.32784-1-sidhartha.kumar@oracle.com> <92965844-c430-8b8e-d9f1-705d7578bceb@nvidia.com> <0187f9c2-e80a-9cde-68bc-c9bdbd96b6fe@oracle.com> From: Sidhartha Kumar In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BY5PR17CA0064.namprd17.prod.outlook.com (2603:10b6:a03:167::41) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|SA1PR10MB6613:EE_ X-MS-Office365-Filtering-Correlation-Id: 1828a05d-c3bd-4a1e-f2d1-08dad96754ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r8bNI5cB6DLELbs9khZkHnKSnGtLbxyXvdXtLyxFsHEVxbJuS8Gz05/ZDM7bVvpgLwiZPxWo/XoV9KgtmochENllQ4PFWZuJ+g8XwuKl7ZQO5nGeA6Dt4XlhQ2jYp9avjpJc2Mt1UUOXyBhuY0B1pyiNarwftwhb3IIeTB4Y3q/UEzwKKR/YK6x6F3gbmAiSkbuwN8s2S60/GsRV9d79t7mwLSa0vuRBEI9aRREwA9RLoMCJ0mDqfZ/NZXBoqiqiJvKAX0KCwpO0NRf1x57nP8eGPIljDOez6Sfb3MXYlCaIGHPKmf+t8CcKt8o/gGo/Lu1XpWe5fqkcIT4NtI9otyThRNqZsY5tn2Nm55fjUpNib5c+Vp4rmepcnuTQF20oOb9Bgu5D0V8FoJCv8Jxb5I6dhEPi1/psm9hRBWi+zLZfgQKhlrxEjz9AMeLJI97/l8kasxabnnRT/0ClsTVXIDQ6wGdxRAy6+Zb64D0LtCorEufYoofobZ4LubLbzhltjI2n4BWBoBH7uINe1u4hvfXpBevoSyZGThfj0p/0YSfziJvcv5DdkptsbDwI2Y3owklPfy7MA4bUyN3yJaNQVi42yy1yLkrr9j4V/vMEk4iqxoDcBDgP2xuzTC6cfkLOUC9TWCl3N8ro6S5JhRgmbNHj/Igii7vPI+RuDSPYKhFwDjON31LIhqXGeIikYOTq3RY5j0QAE90zEYaF62kb6DCp/p0bO7H4x0b4to1yttg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR10MB5113.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(346002)(39860400002)(376002)(366004)(396003)(136003)(451199015)(110136005)(316002)(6506007)(53546011)(6666004)(31686004)(6512007)(186003)(44832011)(66556008)(8676002)(2906002)(38100700002)(66946007)(41300700001)(66476007)(5660300002)(2616005)(6486002)(4326008)(36756003)(86362001)(8936002)(83380400001)(478600001)(31696002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VEl3UnVDWjBGZHc5WXIxcnI5NkV6MHVxc2ZiREl6dHh6c0ZaR0RDeFJxM2NC?= =?utf-8?B?c0dMYUI5ZzJVQnAxUVA4QUNyZEx0UGNPRVhSVE5pZzFCak5EamViWUlqR0Fx?= =?utf-8?B?OVhsU0loYXQyUXVWYzYycTZnK3NEQmxSWGZjUkpkQlVkWjE3WXNmM0l3MWNS?= =?utf-8?B?OUhiSFQrdUZ1VXpXblJvZVRyS0RKMFJ5NEZseFMyN2t6dk1HWCtiR2Q5YVls?= =?utf-8?B?VDgwbHdQVS9WSW9CaVJFdElOK1JlNE13Q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WY5cDJtMGcrVFd0UHFVcmdKbmN4eEU2MWc3cTdGUUg4THJIUWpKblNnL3Vs?= =?utf-8?B?aExqS2dpMzBxa3JXalYveVJpNUFaek1uOFV5QW1qQjFFYi84THpWbE9UQ2NC?= =?utf-8?B?U1dGQzF4TEtDV2l5b25keDZnN0p0RklETzJsdjg2OGRIS1VHZ2tOVW03ajVZ?= =?utf-8?B?bExVMDlxd2c5Q1ViSlBzVkdJRUNRPT0=?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1828a05d-c3bd-4a1e-f2d1-08dad96754ba X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2022 21:58:26.6953 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SpiEhc764vr0h4vlowQMq1c3vNcMGokfOXTHsYsvuIiiPW+PdJt8fF6fLKU+sxqDCoG5RIl+85sAQEvjDN4I0AnHDjMP3Tgvu7+pY2bRW1Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB6613 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-08_12,2022-12-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 phishscore=0 spamscore=0 bulkscore=0 mlxscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212080183 X-Proofpoint-GUID: IQ748DyfB6qUmXHYER_7hFP18InaPKgv X-Proofpoint-ORIG-GUID: IQ748DyfB6qUmXHYER_7hFP18InaPKgv X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 On 12/8/22 12:01 PM, Mike Kravetz wrote: > On 12/08/22 19:33, Matthew Wilcox wrote: >> On Thu, Dec 08, 2022 at 10:06:07AM -0800, Sidhartha Kumar wrote: >>> On 12/7/22 6:27 PM, John Hubbard wrote: >>>> On 12/7/22 17:42, Sidhartha Kumar wrote: >>> This works for me, I will take this approach along with Muchun's feedback >>> about a wrapper function so as not to touch _folio_order directly and send >>> out a new version. >>> >>> One question I have is if I should then get rid of >>> folio_set_compound_order() as hugetlb is the only compound page user I've >>> converted to folios so far and its use can be replaced by the suggested >>> folio_set_nr_pages() and folio_set_order(). >>> >>> Hugetlb also has one has one call to folio_set_compound_order() with a >>> non-zero order, should I replace this with a call to folio_set_order() and >>> folio_set_nr_pages() as well, or keep folio_set_compound_order() and remove >>> zero order support and the comment. Please let me know which approach you >>> would prefer. >> >> None of the above! >> >> Whatever we're calling this function *it does not belong* in mm.h. >> Anything outside the MM calling it is going to be a disaster -- can you >> imagine what will happen if a filesystem or device driver is handed a >> folio and decides "Oh, I'll just change the size of this folio"? It is >> an attractive nuisance and should be confined to mm/internal.h *at best*. > > I suspect it was placed in mm.h as it is the 'folio version' of > set_compound_order which resides in mm.h. But, no need to repeat that > unfortunate placement. > >> >> Equally, we *must not have* separate folio_set_order() and >> folio_set_nr_pages(). These are the same thing! They must be kept >> in sync! If we are to have a folio_set_order() instead of open-coding >> it, then it should also update nr_pages. > > Ok. Agree. > >> So, given that this is now an internal-to-mm, if not internal-to-hugetlb >> function, I see no reason that it should not handle the case of 0. >> I haven't studied what hugetlb_dissolve does, or why it can't use the >> standard split_folio(), but I'm sure there's a good reason. > > The hugetlb code is changing the compound page/folio it created from a set of > individual pages back to individual pages so they can be returned to the > low level allocator. Somewhat like what page_alloc/page_free do. split_folio > is overkill. split_page would be a closer match. > > It makes perfect sense to put the function in mm internal.h. > Thanks John, Mike, Matthew, and Muchun for the feedback. To summarize this discussion and outline the next version of this patch, the changes I'll make include: 1) change the name of folio_set_compound_order() to folio_set_order() 2) change the placement of this function from mm.h to mm/internal.h 3) folio_set_order() will set both _folio_order and _folio_nr_pages and handle the zero order case correctly. 4) remove the comment about hugetlb's specific use for zero orders 5) improve the style of folio_set_order() by removing ifdefs from inside the function to doing #ifdef CONFIG_64BIT static inline void folio_set_order(struct folio *folio, unsigned int order) { VM_BUG_ON_FOLIO(!folio_test_large(folio), folio); folio->_folio_order = order; folio->_folio_nr_pages = order ? 1U << order : 0; } #else static inline void folio_set_order(struct folio *folio, unsigned int order) { VM_BUG_ON_FOLIO(!folio_test_large(folio), folio); folio->_folio_order = order; } #endif Please let me know if I missing something. Thanks, Sidhartha Kumar > Thanks,