From mboxrd@z Thu Jan 1 00:00:00 1970 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 42FE9C00145 for ; Thu, 15 Dec 2022 05:32:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B44E18E0006; Thu, 15 Dec 2022 00:32:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AF4AA8E0002; Thu, 15 Dec 2022 00:32:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9BD038E0006; Thu, 15 Dec 2022 00:32:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 8676F8E0002 for ; Thu, 15 Dec 2022 00:32:04 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 59B631A051C for ; Thu, 15 Dec 2022 05:32:04 +0000 (UTC) X-FDA: 80243419368.02.06D4448 Received: from out-235.mta0.migadu.com (out-235.mta0.migadu.com [91.218.175.235]) by imf30.hostedemail.com (Postfix) with ESMTP id 6B94D80005 for ; Thu, 15 Dec 2022 05:32:02 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=WBWxdfAX; spf=pass (imf30.hostedemail.com: domain of muchun.song@linux.dev designates 91.218.175.235 as permitted sender) smtp.mailfrom=muchun.song@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671082322; a=rsa-sha256; cv=none; b=bHShAOhdZH1h63rWVFTHsbV2jwjA6u2TWx0nv5rx6XsmwVaBus1NDPUDNxrBwkRy8S7svH njmo5aV7ODKwgfDfg2+3nOi1EQwA70QXwlQ6w6BuBMNO8kkl9LD+4zzuaW3Ud5XFVmyU/d b0K0BRY4hud0Fm7R8SS5R2vVELrZGEk= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=WBWxdfAX; spf=pass (imf30.hostedemail.com: domain of muchun.song@linux.dev designates 91.218.175.235 as permitted sender) smtp.mailfrom=muchun.song@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671082322; 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:in-reply-to:references:references:dkim-signature; bh=AjbPhz8ewubibdERpfEGMrVXZxEqEE0Jc+V7K14QaLQ=; b=HTzKyhWlSTYVGCQaNQYHvioKjPNCTdpdwHSatKUGl+JN96+GmTh4I/+XZjZ3V/V2G9wT5y 4RyF4WNVWuWYr3k62M73TRG77QXWMOyGT7C51RwmUqbKZSiHCmV1mBnuwhVygE8Ce7fWI+ w3ahS59rfBh106QFDYRVYlPmynyGS54= Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1671082320; h=from:from: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:in-reply-to:references:references; bh=AjbPhz8ewubibdERpfEGMrVXZxEqEE0Jc+V7K14QaLQ=; b=WBWxdfAX4rclU2dt3iRBCB04Buz5Q3psnYuCHy9Wr0GRiqnGG+Nj+sykniihuaqJkyFGnA D7RuAFud+IEha1codAQd42KZwav+bcPpmpIGJYCJg7BoplcEmc0ytrNX18Bfoy4AyKCGeg 9Nzqvwsr38ZIog/H1nC+jf6OLotzq+I= Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: Re: [PATCH mm-unstable] mm: move folio_set_compound_order() to mm/internal.h X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: Date: Thu, 15 Dec 2022 13:31:24 +0800 Cc: linux-kernel@vger.kernel.org, Linux Memory Management List , Andrew Morton , Muchun Song , Mike Kravetz , Matthew Wilcox , John Hubbard Content-Transfer-Encoding: quoted-printable Message-Id: References: <20221213212053.106058-1-sidhartha.kumar@oracle.com> <0B650D64-1F64-4695-9365-CF695029C50C@linux.dev> To: Sidhartha Kumar X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Queue-Id: 6B94D80005 X-Rspamd-Server: rspam01 X-Stat-Signature: 88zupwsirbeewtdmx9n18u4hrru8ce55 X-HE-Tag: 1671082322-284296 X-HE-Meta: U2FsdGVkX18f2Y11uIgQESzytQNBvhLtig8P2DNZ6MqB2ZcW4i7Rye81p2+XXKFfoKqefJQPNHaZvmCKjIwYiIfCYXzOIDcgELciO7TXhWJnWxaouEvQgGj36kEdJwCGOY0Ne8pri3nExm6qlP8WLryp/BpMQArztM8zQABW4EzF1qZiSa2Opw0hE85cUi6Nvbf7+VVDvX/hq1TlMv3b6Avxnm0E87cv9vhcaS2WSNtZ1yNHoLUU/pW/FW/sadlEOx7kJyZrO0mH7vobxFA/eKSSeFiCnBy+OxiYZgayyMqK5zcFBQ7WAuJ/yh9RyfXxzbSyrcw6yoGwtr/w5pIXr+fr8zFpbg5vOzMcTGtaiTZWd11g0CZq5MiMZhlZ1MNr5CRwQE3eNGggvGflmkA+WoszFQdAOguuPiTDw9WTvY/GGl7H67BllZr+tNiF2oDEzuduigzVOEIrKO2xY+hk73TKdD991S3HAVU+RD/J7dn+0RugH21/S++SSRBL5vxtaXJDVoYvKuE7leUfqCu0yyV9x/LT8WCMC4RJ11lfRLkTbIkLKnnwuVRm7YkXz8XjTrU9jpNad2K2ELTd++F7VDiOSsEdNb8noTpxQvOk1iNuyA+EQpld4rRpt2qJIprYT7iEEl5IypYpOeWHCkV/7vZg2XVGjYYXEkWBsFICKFct5mFVi551viyGq+1+d+IAudKODzqy+7u+L4AHkDdMfKvkeFEVNUtXLoTfLxQTKvVb6qmZdZw+TwNO8xgFBYOs74vgmyhTVl3sommyrbAujkdzIxcZLKAuhPMtf5Myc6X6XTPw2D2h00NqYXzMWjLxy+w31bMecMzCYd3XKjsrgSTVtsV3r4hwnI2EpVNtZJ0xD7Ywy+70EphhRGW0P8pTqFKuXyw7qEg= 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: > On Dec 15, 2022, at 13:09, Sidhartha Kumar = wrote: >=20 > On 12/14/22 7:44 PM, Muchun Song wrote: >>> On Dec 14, 2022, at 05:20, Sidhartha Kumar = wrote: >>>=20 >>> folio_set_compound_order() is moved to an mm-internal location so = external >>> folio users cannot misuse this function. Change the name of the = function >>> to folio_set_order() and use WARN_ON_ONCE() rather than BUG_ON. = Also, >>> handle the case if a non-large folio is passed and add clarifying = comments >>> to the function. >>>=20 >>> Link: = https://lore.kernel.org/lkml/20221207223731.32784-1-sidhartha.kumar@oracle= .com/T/ >>> Fixes: 9fd330582b2f ("mm: add folio dtor and order setter = functions") >>>=20 >>> Signed-off-by: Sidhartha Kumar >>> Suggested-by: Mike Kravetz >>> Suggested-by: Muchun Song >>> Suggested-by: Matthew Wilcox >>> Suggested-by: John Hubbard >> Reviewed-by: Muchun Song > Hi Muchun, >=20 > Does this review include the change from Yes. Thanks. >=20 > + if (!folio_test_large(folio)) { > + WARN_ON_ONCE(order); > + return; > + } >=20 > to >=20 > if (WARN_ON_ONCE(!folio_test_large(folio))) > return; >=20 > discussed in in this thread? >=20 > Thanks, > Sidhartha Kumar >> Thanks.