Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp544456rwb; Wed, 14 Dec 2022 22:11:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf5GKVwtdv+TzY30Q7O4pCYx0AfNBRWRbAKPIfKkYxPVY+KuWGP669uYmiXstCkvedvMhOi1 X-Received: by 2002:a05:6402:1458:b0:46b:7706:652a with SMTP id d24-20020a056402145800b0046b7706652amr11331378edx.27.1671084664428; Wed, 14 Dec 2022 22:11:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671084664; cv=none; d=google.com; s=arc-20160816; b=LqtXbqlGA4wAlj5vVNwvnNM3/oq2JW1QXYcG8ex6SYZVvvQVLwYttxaN35qprUCfqQ LVNV+pLjozAb8EDuIFleE2nmf9Ar/t8866HBOVgAc5On4lJKv0e6RickOEEsZh8+qsVE s1Mo0V5uSKHMMscQVFymIvbDLC9A5LdTFKA3qofEebvgiNvwk06ZaH67SAyMr9TGJysw Lxjkc7l4hh1/NstjKupUdM9oIpqEykcMj/iGjqyMGVPSeuffJhEQKpci7akrkrGe8Fis XFAFXtesCXzRdmnQY8bVs3ilroVqLlW3qJNei3ZjsjQcVu8YzM62NSTvOvkYi6/j7baG 6Sag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=AjbPhz8ewubibdERpfEGMrVXZxEqEE0Jc+V7K14QaLQ=; b=lTM1uEJCY1fK1dO25JIQTrF7dfxn7+4TIo9EtcumcQ+h+7UBivueY+Sh1qcAmHeSCb p+nLhY/KGSACOsZPOCwA232vBPhkVLZEGYMRnfJhhcmQY9+A4HgH5cFFOEXMmjdq4M+H +ciJnIvSa6hl17acO9ULeUDukYHxkFx2zjoGLG/Jy9I92IDICZd985AcmapKV+EW79U4 IavuH5psDzPaeqyqFPkcf3cNUvb/A8f7fduXb26Q9k2yJlvUpmwS4txl5+WnC7QRMrcC rRzauc0RL3RU7KEYiPUxYM/15JiIfxYSe9ef6wDkPPnZaXAeYoOtZAfFpsW0RkgTg8BZ oGLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=WBWxdfAX; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d5-20020a056402400500b004614acc0706si14370783eda.250.2022.12.14.22.10.47; Wed, 14 Dec 2022 22:11:04 -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=@linux.dev header.s=key1 header.b=WBWxdfAX; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229787AbiLOFck (ORCPT + 70 others); Thu, 15 Dec 2022 00:32:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbiLOFcP (ORCPT ); Thu, 15 Dec 2022 00:32:15 -0500 Received: from out-141.mta0.migadu.com (out-141.mta0.migadu.com [IPv6:2001:41d0:1004:224b::8d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3811B2A958 for ; Wed, 14 Dec 2022 21:32:02 -0800 (PST) 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 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.