From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 AE9263644DD for ; Thu, 2 Apr 2026 11:56:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775131004; cv=none; b=WcR8kObd2FF79ZxlAOfez67gEVCEjxABrDj91QTID8KI5qU7PxauhlxhZS8eg9kI1GKZ6MVZPx+AvKDrRnA2mTCgwJgCMn70Hhq4IRs0VxE8N82emSzSjx6pg0OdstEN3Fa/dgSjJx6TQDYL3/rPqpChTAU3WQBUtYQhPDCtO34= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775131004; c=relaxed/simple; bh=ILWA/TGaddIJRatDrkcnD5nsU6cRgISKvK5hpIUJojI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=f2FXWnoYOfMaqnyxtJkZEZaJ0PX8Dt1pcgcECy+0liqbjqdS/mBlUKnut8lsMq1VyyIaXxzmxBngPrIRFCU/rghApsPOlu7dupxsAlWuceeXLodg5W1vuu4s8eRaHBYF0xEPWjv+Wg+xoKcJI6QlYF8r8RsaOYeodu+2sXcd03Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=hNpcNsuK; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hNpcNsuK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775131000; 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=nVmBc5NJuSrGcaoMZIqkBxxnYiTDtiLU9yQkm/TQaCQ=; b=hNpcNsuK9iYkrt3xCpkYo9uAr0MEtxWooNKXizziLha/33G0e67axh+fq2huYYsykwIPlG 7rtekQVbMuo6rcJm7g9mIn8a4S8HRNaceNJistTr3p7+s7zNz952e3gffEL3nrCf7lmjol OYwx2mCtWdzMZpD1JoxS9kfbTTbqaEk= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-103-Cct7J6iFNTeKNe5kqwsuBA-1; Thu, 02 Apr 2026 07:56:39 -0400 X-MC-Unique: Cct7J6iFNTeKNe5kqwsuBA-1 X-Mimecast-MFC-AGG-ID: Cct7J6iFNTeKNe5kqwsuBA_1775130999 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-89cd03be011so20525626d6.0 for ; Thu, 02 Apr 2026 04:56:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775130999; x=1775735799; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nVmBc5NJuSrGcaoMZIqkBxxnYiTDtiLU9yQkm/TQaCQ=; b=QDGFsHptIGcdfgpUrMOl/O8mpgsdbAveHG/+gqMHxuzAGj3zELpKkgzyWZUtdB82Rs eH416bMY+qxNGpMUmmHyw59uBJVcGDUNmBeEjBYD3CAyX7j02mIFXSmGuMwGc3ww7dwE P8R4NgYNT9coJxMQmEAo/OCOCnnFqJ4zyYzblqZsjGkZeMw+HSnMw/CG8mK9PCuTBhM7 l7+jIgWLvZB8A+TS1tNp351565IRz1sKGmQICOflrg/ZhUHWMqE/WgHoKgXuBoe11PFm mqqdMy3Djtoy47+0IVKg8PSIsysXTUptGeDwyqVGpqf9r4JcDD53DLV/ejpijuNyhaj/ 0QdQ== X-Forwarded-Encrypted: i=1; AJvYcCUSzAiLVjCqeV33tVE6dQSFZYkciIcB9EfyG6q4JcV6/TDhqvmDO0CtOASUS0ax7xEEvvFyaAm27ps4cxI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy623fZygHOyrbaTx/Z6tvS2fxrdNYAiM9SxkfLFswcm5reohhT aGWdgRUToCeTWmwTkXcvtGc9u4a2N1GNJalJX5Hk5mDD66N9jw45aMQGiaKmJ7T0noFvfz7G8VY EIGXezW/cgwQmomyP4GFJr+KAmMMsR5qbxDA6vb5Eq/aUlJcMnRD4Q9dFtJdLfOCzwQ== X-Gm-Gg: AeBDievrkSB0pJMmywPikxKTZo8aGaw7IoAqjcI82Ge+KzW1FXM8niikrexs1ID5gPC Rs3X43oboxreWyuxtCLMTFf+3I6OYotkxiwh3XJhxoJBxoLl4NXOEyVL1eagJPhtZUn/JPOP+TZ O2BlgWtP7ZCtCiOJMUmjYKgQATLPD2ndmDwQyS/WCg+vVrFvHziY8HaiGGwahOUZCLNtoCMxbuU gcgGNpHcbVJPGAoe/H06pvbyBvFvSFgaWVu65vcR+J1SjYCywLsJuG47izePDlcK7oPzCg512KX R1JLoksNQiGSKWUiMo7HWVjY0d4lGLCfjIrXUV8XKfBvm+ArxLGyV476eZCzPAxMWQyLbLadHEe 967KaauVlBOI7lY131nb8UbPJKmGruX9Wc67HT13xFa5hwTq6tm7hn/DF+pxqIW+k85uumpHOek AZVc0FE4w/GgjRFMU= X-Received: by 2002:a05:6214:2e49:b0:89c:5ece:2896 with SMTP id 6a1803df08f44-8a4395a9c4cmr115458126d6.37.1775130999046; Thu, 02 Apr 2026 04:56:39 -0700 (PDT) X-Received: by 2002:a05:6214:2e49:b0:89c:5ece:2896 with SMTP id 6a1803df08f44-8a4395a9c4cmr115457746d6.37.1775130998546; Thu, 02 Apr 2026 04:56:38 -0700 (PDT) Received: from [192.168.2.110] (bras-base-aylmpq0104w-grc-53-69-159-169-238.dsl.bell.ca. [69.159.169.238]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8a59691580bsm21345376d6.26.2026.04.02.04.56.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Apr 2026 04:56:38 -0700 (PDT) Message-ID: <8d03a508-5836-4001-8eb8-b216251dc29d@redhat.com> Date: Thu, 2 Apr 2026 07:56:37 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 00/11] mm: thp: always enable mTHP support To: "David Hildenbrand (Arm)" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, baolin.wang@linux.alibaba.com Cc: ryan.roberts@arm.com, akpm@linux-foundation.org, lorenzo.stoakes@oracle.com References: <835725cc-1670-45ae-bf58-593aadec6b88@kernel.org> Content-Language: en-US, en-CA From: Luiz Capitulino In-Reply-To: <835725cc-1670-45ae-bf58-593aadec6b88@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026-04-02 04:25, David Hildenbrand (Arm) wrote: > On 2/9/26 23:14, Luiz Capitulino wrote: >> Today, if an architecture implements has_transparent_hugepage() and the CPU >> lacks support for PMD-sized pages, the THP code disables all THP, including >> mTHP. In addition, the kernel lacks a well defined API to check for >> PMD-sized page support. It currently relies on has_transparent_hugepage() >> and thp_disabled_by_hw(), but they are not well defined and are tied to >> THP support. >> >> This series addresses both issues by introducing a new well defined API >> to query PMD-sized page support: pgtable_has_pmd_leaves(). Using this >> new helper, we ensure that mTHP remains enabled even when the >> architecture or CPU doesn't support PMD-sized pages. >> >> Thanks to David Hildenbrand for suggesting this improvement and for >> providing guidance (all bugs and misconceptions are mine). >> >> This applies to v6.19, but I tested it on v6.19-rc8+. > > Apologies for the delay Luiz (as told you off-list :) ), I'll try going > through this soon so we can start queuing this after -rc1. Oh, wow, thanks for the support! I intended to get back to this series this week to address Baolin's comments, but I got busy with other things (which is something I may bring up on upstream but it's not related to this series at all).