summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorXiubo Li <xiubo.li@clyso.com>2026-10-08 03:28:02 +0200
committerIlya Dryomov <idryomov@gmail.com>2026-10-26 14:15:47 +0100
commit2377544a8ffe5b617cb9e9f8797fe086a9449a90 (patch)
treeec769c54348cca46c619b1421cb5c54025f6b737 /include/linux/debugobjects.h
parent6ff7920ca78f6edcabc26c63d20f681d938027c7 (diff)
ceph: check the caps of a closed file after caps_wanted_delay_min
__ceph_caps_file_wanted() stops wanting the caps of a closed file once its last read or write is caps_wanted_delay_min (5s) old, but nothing checks its caps again before caps_wanted_delay_max (60s): closing does not call ceph_check_caps(), and the inode waits on cap_delay_list, whose check has always come at caps_wanted_delay_max. Meanwhile the MDS keeps us the loner, so each stat from another client of a file we created first waits for the MDS to revoke our exclusive caps. This is what makes mdtest-easy-stat in IO500 on kernel clients swing between 3.6k and 100k stats/s from run to run. Queue a regular file that still holds exclusive or write caps for a cap check caps_wanted_delay_min after its last close, on a list of its own, as cap_delay_list is in caps_wanted_delay_max order. The check gives back what it already gives back at caps_wanted_delay_max (shared caps and the page cache caps stay), only earlier. Directories and open files are not affected. Two noshare kernel mounts on one VM, 1 MDS: 20000 empty files created on A, statted by path on B after a wait. Caps messages are the ones A sends, revokes are the ones the MDS sends A: +--------+------+---------------+---------------+---------------+ | | | in the wait | in the stat | | kernel | wait | caps msgs | stats/s | revokes | +--------+------+---------------+---------------+---------------+ | before | 15s | 0 | 374 - 435 | 11164 - 11730 | | after | 15s | 20000 | 18680 - 24027 | 0 | | before | 3s | 0 | 328 - 342 | 13727 - 14538 | | after | 3s | 0 - 3010 | 2238 - 3216 | 963 - 996 | +--------+------+---------------+---------------+---------------+ The caps go back in the background before the stat instead of one revoke per file during it; with a 3s wait most of them still go back while the stat runs. Signed-off-by: Xiubo Li <xiubo.li@clyso.com> Reviewed-by: Alex Markuze <amarkuze@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions