From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-a3-smtp.messagingengine.com (flow-a3-smtp.messagingengine.com [103.168.172.138]) (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 6498B47279F; Mon, 7 Sep 2026 12:59:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.138 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788785997; cv=none; b=R2fMsqYlF6VgTQOm+6xk1WKxLgTcrHUNJOCPqg42/X5RDHlRRAr+62AYNjv/XAMGV3xbOvLYm+3zE5u8G87Xq7iBpAnW5Qf+bP4p/LOj8I45mszdc7EkCAfrxkHARiZfPY+WY+eimvxDsNIvr7PLq4smtC/fVef6Icv9sdlrm9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788785997; c=relaxed/simple; bh=MkvOaW8wkaxVsp7+9WEl+B97dZNt1FDF4HFuRtuNW6U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Z4bz5H84Zlo8KFmJBDnm+kICtd9kqD1Tr8MYtUtl1ccYwHviZpZNny4rDwM4TE1watX6LB7VT2cKDLVjpkY+BwTaT13METNRRHtlGdbEFR9maZOcdL+aeX8djJ1jOL0AxRaV5LhailttLnSxcHuxk3VCcpLDCFvSHq9YCrXSFaA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name; spf=pass smtp.mailfrom=shutemov.name; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b=bG1F3G79; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=IayrZM0F; arc=none smtp.client-ip=103.168.172.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shutemov.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b="bG1F3G79"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="IayrZM0F" Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailflow.phl.internal (Postfix) with ESMTP id 633F41380054; Mon, 7 Sep 2026 08:59:46 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Mon, 07 Sep 2026 08:59:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1788785986; x= 1788793186; bh=lYDGB/RXWunUBHizdGiMziv4O2zhbYW2jWaEbKuOHsI=; b=b G1F3G79iC03Ct6JwvcO+c5TCzquytWTPpldQGzzb3BrMw3yKtHS03Y49D3tCbhhE yhBa95NKaEoz9uAijnkv1y/zgutADJBIg8iBi+EBLjaQqYRzGVhWegX5L8QdxqPE 5NhrT1sxjgSyHujPJdg+mJpJs4GYODMgNaenjrRFL0c+XdM/MBXrWG9+Mvlx9Pmp OoObvnqUD1h38zBA6gjYLeRqwGQHQrbiHvFJjHmpwYHE/DaeMwcAdoFZ/iLPP4IN uRFQc6L2zX3w6DFK2DxjAD8F5/jOs1QEiQ8rdGt3a6vbiHmKhp6hWw/Jh+fRiQZX Id9NzriDuk4ES9VUGSLqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1788785986; x=1788793186; bh=lYDGB/RXWun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PjvoNy1yaVVSezyY3ZwayIZYc4OS4HS0Q X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Sep 2026 08:59:44 -0400 (EDT) Date: Mon, 7 Sep 2026 13:59:43 +0100 From: Kiryl Shutsemau To: "Lorenzo Stoakes (ARM)" Cc: akpm@linux-foundation.org, david@kernel.org, nico.pache@linux.dev, baolin.wang@linux.alibaba.com, baohua@kernel.org, dev.jain@arm.com, hughd@google.com, lance.yang@linux.dev, liam@infradead.org, mhocko@suse.com, rppt@kernel.org, ryan.roberts@arm.com, shuah@kernel.org, surenb@google.com, usama.arif@linux.dev, vbabka@kernel.org, ziy@nvidia.com, usama.anjum@arm.com, agordeev@linux.ibm.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 08/19] selftests/mm: add folio-order check for address ranges Message-ID: References: <20260815015901.1236937-1-kirill@shutemov.name> <20260815015901.1236937-9-kirill@shutemov.name> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Aug 18, 2026 at 11:25:27AM +0100, Lorenzo Stoakes (ARM) wrote: > > +bool is_range_backed_by_folio_orders(char *start, size_t len, int order, > > is_range_mthp_backed() seems a lot clearer? > I would rather keep the order in the name. The helper checks that the range is backed by folios of exactly the order the caller names, and the mTHP cases call it three times per check at three different orders to tell them apart -- reporting an order-7 folio as order-6 is a bug. It is also called with order 0, which is not an mTHP. Going with is_range_backed_by_order() in v5. Everything else here taken as suggested, and the comment made kdoc. -- Kiryl Shutsemau / Kirill A. Shutemov