From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) (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 B9BBF25D53B; Mon, 20 Apr 2026 06:07:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776665255; cv=none; b=Pn7ssI0HpgZqosYftJFGS67vdaqEcwz7t0HN89FtSHUCSKTmEsBZyDJ4/EEovUIFtZGSqxLHYG/iYLGrWdz19KbB9g9He7nj4UabwH6LEzWZerH9eDSq5U1JMwtk4zOJWfmQTulyyCCCst4im91GZvcj4G7pvO4dA97WpIAdbic= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776665255; c=relaxed/simple; bh=/V3Lviby6LuoMIdNEQHBuwGR8SAWyAkzpYfJ4x52X/k=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pjkpksN0kXmZiibcNHyliyvTxBFyv9K0aBTO9qTNY1HVKwEzuBifEqJ9lYByZhR2rD9uGsLRGLUxDIQLpH8VEUI7H1eoso/WxuyVngWXr+AEXUVIzn7cY0O+5l/7KI7X5HeUINT/hBhoKNWwjgJFAyTK4195j6QtW4noZhBufKg= 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=wsg0uLPQ; arc=none smtp.client-ip=115.124.30.130 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="wsg0uLPQ" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1776665243; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=jlXoyWfT+08BHayF7RT9Vylznnk/5A39eUeopQdgDu4=; b=wsg0uLPQN03uyaFRH7U2SqCA/6Ih12JBtrp+H+vWMT21pu4EK/wPqPSF3ydyKubskBie7RRZQCIqE5pm76ZL+wLaoO67RLvZIVF0p7xBa8o/JQTeHSjPM72srpxBXVIKijFWqrwlvDMQ66TfY1y2L40yL3/gqr2mI/TaALulWrA= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037026112;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=27;SR=0;TI=SMTPD_---0X1I7RdU_1776665239; Received: from 30.74.144.127(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0X1I7RdU_1776665239 cluster:ay36) by smtp.aliyun-inc.com; Mon, 20 Apr 2026 14:07:20 +0800 Message-ID: <7fa885ca-d074-4e75-842a-6fe7e48cb298@linux.alibaba.com> Date: Mon, 20 Apr 2026 14:07:18 +0800 Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 7.2 v3 01/12] mm/khugepaged: remove READ_ONLY_THP_FOR_FS check To: Zi Yan , "Matthew Wilcox (Oracle)" , Song Liu Cc: Chris Mason , David Sterba , Alexander Viro , Christian Brauner , Jan Kara , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Shuah Khan , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org References: <20260418024429.4055056-1-ziy@nvidia.com> <20260418024429.4055056-2-ziy@nvidia.com> From: Baolin Wang In-Reply-To: <20260418024429.4055056-2-ziy@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/18/26 10:44 AM, Zi Yan wrote: > collapse_file() requires FSes supporting large folio with at least > PMD_ORDER, so replace the READ_ONLY_THP_FOR_FS check with that. > MADV_COLLAPSE ignores shmem huge config, so exclude the check for shmem. > > While at it, replace VM_BUG_ON with VM_WARN_ON_ONCE. > > Add a helper function mapping_pmd_thp_support() for FSes supporting large > folio with at least PMD_ORDER. > > Signed-off-by: Zi Yan > --- LGTM. Reviewed-by: Baolin Wang