[Devel] [PATCH VZ9 2/7] fs/fuse/kio: some pages were not unlocked while revoke

2025-03-28 Thread Alexey Kuznetsov
Request migrates from fiq to fpq for awhile it is out of revocation lists. So, we must recheck revoke status. The bug is old. Affects: #VSTOR-100953 Signed-off-by: Alexey Kuznetsov --- fs/fuse/dev.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c inde

[Devel] [PATCH VZ9 4/7] fs/fuse/kio: keep kio requests on revoke list at all times

2025-03-28 Thread Alexey Kuznetsov
Before kio request is submitted downstream is it off revoke list. This was a bug, but it was directly required by bogus revoke logic which stole page cache pages from requests. So, we processed pages while the req was isolated from revocation, which would result in deadlock. Now we keep pages accou

[Devel] [PATCH VZ9 5/7] fs/fuse/kio: tidy up RPC_AFFINITY_RSS

2025-03-28 Thread Alexey Kuznetsov
Also, enable it for rdma (tested with mellanox) and unix sockets. Now it provides essentially perfect affinity when socket contexts never hit lock contention and cache bouncing provided RSS and XPS are configured correctly. Change fallback when rx_cpu is not available from RPC_AFFINITY_RETENT to R

[Devel] [PATCH VZ9 6/7] fs/fuse/kio: create krpc request in special thread

2025-03-28 Thread Alexey Kuznetsov
Overhead of mapping rpc request is pretty high. And in cases when vstorage-mount even loop is saturated it makes sense to create shadow kernel thread which mm/files shared with user space. This is one series of patches (others are in user space), which increase raid read iops more than twice. It

[Devel] [PATCH VZ9 3/7] fs/fuse: keep req page refcnt sane

2025-03-28 Thread Alexey Kuznetsov
It was _our_ ancient patch, fb7ae3cf4ca1e052335b94b86b9f43f09b9740f0, subj: "fuse: fuse_prepare_write() cannot handle page from killed request" The patch was entirely crazy, I would veto it a moment I have seen it, but obviously I was distracted and this abomination entered the kernel from behind.

[Devel] [PATCH VZ9 7/7] fs/fuse/krpc: prevent krpc request from crossing reconnect

2025-03-28 Thread Alexey Kuznetsov
Do it with already existing generation id. kreq stores genid of connection at time of enqueue, and if it races with reconnect, it is rejected. Signed-off-by: Alexey Kuznetsov --- fs/fuse/kio/pcs/pcs_krpc.c | 5 - fs/fuse/kio/pcs/pcs_krpc.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(

[Devel] [PATCH RHEL9 COMMIT] fs/fuse/kio: tidy up RPC_AFFINITY_RSS

2025-03-28 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.0-427.44.1.vz9.80.x-ovz" and will appear at g...@bitbucket.org:openvz/vzkernel.git after rh9-5.14.0-427.44.1.vz9.80.23 --> commit 44b11631cff26667d0d2d63f1e3dd8cb3394d43a Author: Alexey Kuznetsov Date: Fri Mar 28 20:01:03 2025 +0800 fs/fuse/kio:

[Devel] [PATCH RHEL9 COMMIT] fs/fuse: keep req page refcnt sane

2025-03-28 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.0-427.44.1.vz9.80.x-ovz" and will appear at g...@bitbucket.org:openvz/vzkernel.git after rh9-5.14.0-427.44.1.vz9.80.23 --> commit b191d0a510fbfcdf9b5a8c9d792a5b924ad6b48d Author: Alexey Kuznetsov Date: Fri Mar 28 20:00:53 2025 +0800 fs/fuse: kee

[Devel] [PATCH RHEL9 COMMIT] fs/fuse/krpc: prevent krpc request from crossing reconnect

2025-03-28 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.0-427.44.1.vz9.80.x-ovz" and will appear at g...@bitbucket.org:openvz/vzkernel.git after rh9-5.14.0-427.44.1.vz9.80.23 --> commit f1b3519cb9cb2dcac93a92d9ae362cfdd740f4d2 Author: Alexey Kuznetsov Date: Fri Mar 28 20:01:13 2025 +0800 fs/fuse/krpc

[Devel] [PATCH RHEL9 COMMIT] fs/fuse/kio: some pages were not unlocked while revoke

2025-03-28 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.0-427.44.1.vz9.80.x-ovz" and will appear at g...@bitbucket.org:openvz/vzkernel.git after rh9-5.14.0-427.44.1.vz9.80.23 --> commit 06d704548a63f5afc73fe4915f90674f98c77656 Author: Alexey Kuznetsov Date: Fri Mar 28 20:00:47 2025 +0800 fs/fuse/kio:

[Devel] [PATCH VZ9 1/7] fs/fuse/kio: correct return of error from io backed to rpc

2025-03-28 Thread Alexey Kuznetsov
Backport from user space. The bug is unlikely to see in kernel and we have never observe it. Yet, it is better to keep this place clean. Cloning comment from corresponsing user space commit: We used to have an ugly problem there, when ->done is called from IO backend which is not aware about rpc

[Devel] [PATCH RHEL9 COMMIT] fs/fuse/kio: keep kio requests on revoke list at all times

2025-03-28 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.0-427.44.1.vz9.80.x-ovz" and will appear at g...@bitbucket.org:openvz/vzkernel.git after rh9-5.14.0-427.44.1.vz9.80.23 --> commit dd6421ab35d0cf479033061b28f055404d7a16c7 Author: Alexey Kuznetsov Date: Fri Mar 28 20:00:58 2025 +0800 fs/fuse/kio: