diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2023-03-21 07:27:25 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2023-08-25 22:52:23 +0000 |
commit | b61645ef3c4e6b7f66e6e8accad61aab227a0dd9 (patch) | |
tree | 3939c284b43b2a2dcf172e4a8be1038f0b046aed /sys/sys | |
parent | 42d73e9ec1464a4ebc26d32201def571550e9ba9 (diff) | |
download | src-b61645ef3c4e6b7f66e6e8accad61aab227a0dd9.tar.gz src-b61645ef3c4e6b7f66e6e8accad61aab227a0dd9.zip |
vfs: decouple freevnodes from vnode batching
In principle one cpu can keep vholding vnodes, while another vdrops
them. In this case it may be the local count will keep growing in an
unbounded manner. Roll it up after a threshold instead.
While here move it out of dpcpu into struct pcpu.
Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D39195
(cherry picked from commit b5d43972e3941d6c03d935dc423385f3c2178d68)
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/pcpu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h index 15d74d90778a..58e47f11f917 100644 --- a/sys/sys/pcpu.h +++ b/sys/sys/pcpu.h @@ -187,7 +187,8 @@ struct pcpu { long pc_cp_time[CPUSTATES]; /* statclock ticks */ struct _device *pc_device; /* CPU device handle */ void *pc_netisr; /* netisr SWI cookie */ - int pc_unused1; /* unused field */ + int8_t pc_vfs_freevnodes; /* freevnodes counter */ + char pc_unused1[3]; /* unused pad */ int pc_domain; /* Memory domain. */ struct rm_queue pc_rm_queue; /* rmlock list of trackers */ uintptr_t pc_dynamic; /* Dynamic per-cpu data area */ |