[PATCH v2 0/4] Modify memfd_luo code

Chenghao Duan posted 4 patches 1 week, 4 days ago
There is a newer version of this series
mm/memfd_luo.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
[PATCH v2 0/4] Modify memfd_luo code
Posted by Chenghao Duan 1 week, 4 days ago
I found several modifiable points while reading the code. Please review.

v2:
As suggested by Pratyush Yadav, add patch
<mm/memfd: use folio_nr_pages() for shmem inode accounting>.
https://lore.kernel.org/all/2vxzqzpebzi2.fsf@kernel.org/

<mm/memfd_luo: optimize shmem_recalc_inode calls in retrieve path>
Same as V1, no logic changes; depends on patch #1 for modifications.

<mm/memfd_luo: remove unnecessary memset in zero-size memfd path>
No modifications have been made.

<mm/memfd_luo: use i_size_write() to set inode size during retrieve>
Add consistency-related descriptions to the commit log.


v1:
https://lore.kernel.org/all/20260319012845.29570-1-duanchenghao@kylinos.cn/

Chenghao Duan (4):
  mm/memfd: use folio_nr_pages() for shmem inode accounting
  mm/memfd_luo: optimize shmem_recalc_inode calls in retrieve path
  mm/memfd_luo: remove unnecessary memset in zero-size memfd path
  mm/memfd_luo: use i_size_write() to set inode size during retrieve

 mm/memfd_luo.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

-- 
2.25.1
Re: [PATCH v2 0/4] Modify memfd_luo code
Posted by Andrew Morton 1 week, 3 days ago
On Mon, 23 Mar 2026 19:07:43 +0800 Chenghao Duan <duanchenghao@kylinos.cn> wrote:

> I found several modifiable points while reading the code. Please review.

Thanks, I've updated mm.git to this version,

AI review has raised a few potential issues.  Perhaps they were present
in its review of the v1 patchset.

	https://sashiko.dev/#/patchset/20260323110747.193569-1-duanchenghao@kylinos.cn
Re: [PATCH v2 0/4] Modify memfd_luo code
Posted by Chenghao Duan 1 week, 3 days ago
On Mon, Mar 23, 2026 at 02:09:38PM -0700, Andrew Morton wrote:
> On Mon, 23 Mar 2026 19:07:43 +0800 Chenghao Duan <duanchenghao@kylinos.cn> wrote:
> 
> > I found several modifiable points while reading the code. Please review.
> 
> Thanks, I've updated mm.git to this version,
> 
> AI review has raised a few potential issues.  Perhaps they were present
> in its review of the v1 patchset.
> 
> 	https://sashiko.dev/#/patchset/20260323110747.193569-1-duanchenghao@kylinos.cn

Sure. My apologies for only addressing Pratyush Yadav's comments in my
reply to the v1 patchset, while overlooking the AI review link mentioned
in the email.

I have realized that the AI raised structural potential issues in the
overall code, not problems specific to the patch itself. I will analyze
the findings from the AI review and attempt to resolve these potential
issues.

If anyone has better solutions or code for the potential issues raised
in the AI review, please feel free to contribute.

BRs
Chenghao