From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) (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 CC2C61A00F0 for ; Sat, 11 Apr 2026 06:57:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.113 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775890626; cv=none; b=Loy64Ll+FzXgOMYpCELsLmw3mGekbGuFNzxqYMXTMdd4QrFqAhvT2xGCLkFXoLs2PpmmXaLgooudUJZJ7i1RQ/yNL149a9smeHAXsfdHlOG/nj7LmTl81xvnunq3DfzSG9CLiL6jtO3xwKn481U31lWNi5nr9KDvJyHK7US/g84= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775890626; c=relaxed/simple; bh=ym71nfDFIrmKmwQxD05pUa8nx+xJgGh67pFTGrL6/yU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=d9FhOuDRKVjC9q7K9p7yMu0nby7ZzgVD985N+HN4iAhjU66i/E2wuBt1BUOQXb3ShN6sxQnU1MqYmZ01m/LD+GQGdHiOK8kRoER1VjIipGBasm5H9PJDX3cmNdWzcBa4mtRckv2V5110oWjLcloI9ZkYqUIGwPKuzcAsOt6EDb8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=hLFbcGp9; arc=none smtp.client-ip=115.124.30.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="hLFbcGp9" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1775890614; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=HlIQer+sPlTVvAxw47yIEUkCSisIa3zev/LHqCpwb7c=; b=hLFbcGp9yUoDfGEqVWMU4NibsrVXKNWnSlCadICp6YRZ7G4uzFk9Fus2kZcNojvetm89iAwbiQjHDLMe5V3TCqU9y6hA/by/PdYK/KBmbsGO2vKnk1wJvx9E8gfFrS8kOabWahKdcGR3MOUyuwJH3KbscMZ51lE902lZhKUe7Qw= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R741e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033032089153;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0X0nCcyI_1775890613; Received: from 30.74.144.103(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0X0nCcyI_1775890613 cluster:ay36) by smtp.aliyun-inc.com; Sat, 11 Apr 2026 14:56:53 +0800 Message-ID: Date: Sat, 11 Apr 2026 14:56:52 +0800 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 v3 06/10] mm: shmem: drop has_transparent_hugepage() usage To: Luiz Capitulino , linux-kernel@vger.kernel.org, linux-mm@kvack.org, david@kernel.org Cc: ryan.roberts@arm.com, akpm@linux-foundation.org, lorenzo.stoakes@oracle.com References: <020a4fe05e8ac52ca47c27b0fbb6a07c163a118f.1775679721.git.luizcap@redhat.com> From: Baolin Wang In-Reply-To: <020a4fe05e8ac52ca47c27b0fbb6a07c163a118f.1775679721.git.luizcap@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/9/26 4:23 AM, Luiz Capitulino wrote: > Shmem uses has_transparent_hugepage() in the following ways: > > - shmem_parse_one() and shmem_parse_huge(): Check if THP is built-in and > if the CPU supports PMD-sized pages > > - shmem_init(): Since the CONFIG_TRANSPARENT_HUGEPAGE guard is outside > the code block calling has_transparent_hugepage(), the > has_transparent_hugepage() call is exclusively checking if the CPU > supports PMD-sized pages > > While it's necessary to check if CONFIG_TRANSPARENT_HUGEPAGE is enabled > in all cases, shmem can determine mTHP size support at folio allocation > time. Therefore, drop has_transparent_hugepage() usage while keeping the > CONFIG_TRANSPARENT_HUGEPAGE checks. > > Signed-off-by: Luiz Capitulino > --- LGTM. Thanks. Reviewed-by: Baolin Wang