FUSE sessions reserve ~158 KiB of fixed tables each, mostly unused
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
Start with src/syscall/fuse.c, especially fuse_session_t, fuse_proc_open, and the node-ref path functions named in the issue; trace how requests and node references are allocated and released. Compare the two proposed approaches and check existing limits such as FUSE_MAX_OPEN_FILES and FUSE_MAX_SESSIONS. Done means reducing per-session storage and initialization cost while preserving FUSE request and node-reference behavior; the issue names no tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Each fuse_session_t in src/syscall/fuse.c carries four fixed arrays:
| Field | Size |
|---|---|
| requests[FUSE_MAX_PENDING] (128) | 14,336 B |
| node_refs[FUSE_MAX_NODE_REFS] (4096) | 98,304 B |
| node_ref_hash[8192] | 32,768 B |
| node_ref_free[4096] | 16,384 B |
One session is 162,016 bytes, and fuse_sessions[8] is 1.24 MiB of static storage. fuse_proc_open memsets the whole slot and fills both index tables, so every open("/dev/fuse") makes about 158 KiB resident. The slot stays resident until the /dev/fuse fd and every FUSE file fd are closed, which is usually the daemon's whole lifetime.
Linux keeps the same information but allocates it on demand (torvalds/linux master, fs/fuse):
- Requests are allocated per request:
fuse_request_alloc→kmem_cache_zalloc(fuse_req_cachep, ...)(dev.c). Only background requests are capped, atFUSE_DEFAULT_MAX_BACKGROUND(12). - The lookup count is a field of the inode,
u64 nlookupinstruct fuse_inode(fuse_i.h). It is incremented infuse_iget, and FORGET is sent fromfuse_evict_inode, so there is no per-connection nodeid table.
The node-ref tables are also far larger than elfuse can fill. fuse_walk_path_locked drops each component's lookup as soon as it steps past it. Only fuse_open_path (an open file) and fuse_materialize_path (an exec copy) keep the final lookup. The live count is therefore bounded by FUSE_MAX_OPEN_FILES (128, shared by all sessions) plus the walks in flight, against 4096 entries per session. The comment that sizes the table for ls -R style walks no longer matches the walk.
Possible directions:
- Size
node_refsfromFUSE_MAX_OPEN_FILESinstead of 4096. - Or allocate the node-ref tables and request slots on demand, as Linux does.
Either change also makes it cheaper to raise FUSE_MAX_SESSIONS above 8.
- Ngôn ngữ chính
- C
- Star
- 287
- Fork
- 33
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sysprog21/elfuse
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của sysprog21/elfuse
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
libreswan/libreswan#3185 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
[SDL3pp] update to 0.12.0Đang mởcategory:port-update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[InstCombine] 23.x folds 0.0 * (0.0 / x) to 0.0 when x may be zero (fixed on main by #202482)Đang mởllvm:instcombine
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
llvm/llvm-project#246503 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày