Skip to contentSkip to conversation

Revert "9p: Enable multipage folios"

PATCH In review Dominique Martinet 3 participants 3 messages Oct 23, 2024 – Oct 24, 2024 9P file system

lore
Share & tools
lore

Dominique Martinet

author maintainer
#0 lore raw

PATCH 1/1 Revert "9p: Enable multipage folios"

This reverts commit 1325e4a91a405f88f1b18626904d37860a4f9069.

using multipage folios apparently break some madvise operations like MADV_PAGEOUT which do not reliably unload the specified page anymore,

Revert the patch until that is figured out.

Fixes 1325e4a91a40 ("9p: Enable multipage folios")
---
 fs/9p/vfs_inode.c | 1 -
 1 file changed, 1 deletion(-)
fs/9p/vfs_inode.c +0 -1
index effb3aa1f3ed..fd72fc38c8f5 100644
@@ -295,7 +295,6 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses,
 			inode->i_op = &v9fs_file_inode_operations;
 			inode->i_fop = &v9fs_file_operations;
 		}
-		mapping_set_large_folios(inode->i_mapping);
 
 		break;
 	case S_IFLNK:

---
base-commit: 42f7652d3eb527d03665b09edac47f85fb600924
change-id: 20241024-revert_multifolio-3e117978b5c2

Best regards,

Signature · 1 line
Dominique Martinet | Asmadeus
Acked-by on v1 1/1
#1 lore raw

+cc Linus, in case he decides the revert is necessary and wants to apply it directly

Quoted 20 lines · Dominique Martinet

This reverts commit 1325e4a91a405f88f1b18626904d37860a4f9069.

using multipage folios apparently break some madvise operations like MADV_PAGEOUT which do not reliably unload the specified page anymore,

Revert the patch until that is figured out.

Fixes 1325e4a91a40 ("9p: Enable multipage folios")
---
 fs/9p/vfs_inode.c | 1 -
 1 file changed, 1 deletion(-)
fs/9p/vfs_inode.c +0 -0
index effb3aa1f3ed..fd72fc38c8f5 100644

fs/9p/vfs_inode.c int v9fs_init_inode(struct v9fs_session_info *v9ses, · line 298

Quoted 5 lines
fs/9p/vfs_inode.c +0 -1
@@ -295,7 +295,6 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses,
                        inode->i_op = &v9fs_file_inode_operations;
                        inode->i_fop = &v9fs_file_operations;
                }
-               mapping_set_large_folios(inode->i_mapping);
 

This fixes our issue (might be worth recording the link to original report for the context, [0]), so:

I think the bigger question is the MADV_PAGEOUT behavior in the presence of multi-page folios. Currently it seems fragile and inconsistent, working for single-page folios, but not doing anything (and not returning any error while at it) for multi-page folios (if the theory about the root cause of an issue is right).

[0] https://lore.kernel.org/all/[email protected]

Quoted 11 lines
fs/9p/vfs_inode.c +0 -1
                break;
        case S_IFLNK:
 
---

base-commit: 42f7652d3eb527d03665b09edac47f85fb600924
change-id: 20241024-revert_multifolio-3e117978b5c2

Best regards,
--
Dominique Martinet | Asmadeus

#2 lore raw
Quoted 3 lines · Andrii Nakryiko

+cc Linus, in case he decides the revert is necessary and wants to apply it directly

Ack. Applied directly. Thanks,

Linus