History log of /freebsd/sys/kern/vfs_subr.c (Results 1 – 25 of 8039)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.3.0, vendor/libucl/20240206, vendor/xz/5.6.0, vendor/llvm-project/llvmorg-18.1.0-rc3-0-g6c90f8dd5463, vendor/llvm-project/llvmorg-18.1.0-rc2-53-gc7b0a6ecd442, vendor/arm-optimized-routines/v24.01, vendor/zlib/1.3.1, vendor/expat/2.6.0, vendor/unbound/1.19.1, vendor/tzcode/tzcode2024a, vendor/llvm-project/llvmorg-18.1.0-rc2-0-gc6c86965d967, vendor/tzdata/tzdata2024a, vendor/sendmail/8.18.1, vendor/acpica/20230628, vendor/acpica/20230331, vendor/llvm-project/llvmorg-18-init-18361-g22683463740e, vendor/libcxxrt/2024-01-25-fd484be8d1e94a1fcf6bc5c67e5c07b65ada19b6, vendor/llvm-project/llvmorg-18-init-18359-g93248729cfae, vendor/sqlite3/sqlite-3450000, vendor/NetBSD/bmake/20240108, vendor/llvm-project/llvmorg-18-init-16864-g3b3ee1f53424, vendor/llvm-project/llvmorg-18-init-16595-g7c00a5be5cde, vendor/llvm-project/llvmorg-18-init-16003-gfc5f51cf5af4, vendor/bc/6.7.4, vendor/ena-com/2.7.0
# 9530182e 26-Dec-2023 Jason A. Harmening <jah@FreeBSD.org>

VFS: update VOP_FSYNC() debug check to reflect actual locking policy

Shared vs. exclusive locking is determined not by MNT_EXTENDED_SHARED
but by MNT_SHARED_WRITES (although there are several places

VFS: update VOP_FSYNC() debug check to reflect actual locking policy

Shared vs. exclusive locking is determined not by MNT_EXTENDED_SHARED
but by MNT_SHARED_WRITES (although there are several places that
ignore this and simply always use an exclusive lock). Also add a
comment on the possible difference between VOP_GETWRITEMOUNT(vp)
and vp->v_mount on this path.

Found by local testing of unionfs atop ZFS with DEBUG_VFS_LOCKS.

MFC after: 2 weeks
Reviewed by: kib, olce
Differential Revision: https://reviews.freebsd.org/D43816

show more ...


# b068bb09 08-Jan-2024 Konstantin Belousov <kib@FreeBSD.org>

Add vnode_pager_clean_{a,}sync(9)

Bump __FreeBSD_version for ZFS use.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D4

Add vnode_pager_clean_{a,}sync(9)

Bump __FreeBSD_version for ZFS use.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43356

show more ...


# 2d33ad48 31-Dec-2023 Konstantin Belousov <kib@FreeBSD.org>

vtruncbuf: improve the check for meta buffer

Revision e99215a614675 reorganized the code in vtruncbuf(), and moved
the logic to flush meta buffers into a dedicated loop. While doing it,
the conditio

vtruncbuf: improve the check for meta buffer

Revision e99215a614675 reorganized the code in vtruncbuf(), and moved
the logic to flush meta buffers into a dedicated loop. While doing it,
the condition was changed from bp->b_lblkno < 0 (to handle) into
bp->b_lblkno > 0 (to skip), which causes buffer at lblkno to needlessly
flush.

Reviewed by: chs, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43261

show more ...


# 4c41d10f 31-Dec-2023 Konstantin Belousov <kib@FreeBSD.org>

vtruncbuf: add a comment explaining the purpose of the loop

Reviewed by: chs, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43261


# 27f4eda3 04-Jan-2024 Mark Johnston <markj@FreeBSD.org>

vfs: Simplify vrefact()

refcount_acquire() returns the old value, just use that. No functional
change intended.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.or

vfs: Simplify vrefact()

refcount_acquire() returns the old value, just use that. No functional
change intended.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43255

show more ...


Revision tags: vendor/llvm-project/llvmorg-18-init-15692-g007ed0dccd6a, vendor/tzdata/tzdata2023d, vendor/openssh/9.6p1, vendor/llvm-project/llvmorg-18-init-15088-gd14ee76181fb, vendor/llvm-project/llvmorg-18-init-14265-ga17671084db1, vendor/llvm-project/llvmorg-17.0.6-0-g6009708b4367, vendor/xz/5.4.5
# 29363fb4 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl s

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


Revision tags: vendor/llvm-project/llvmorg-17.0.5-0-g98bfdac5ce82, vendor/unbound/1.19.0, vendor/sqlite3/sqlite-3440000, release/14.0.0
# 0c5cd045 01-Nov-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: remove majority of stale commentary about free list

There is no "free list" for a long time now.

While here slightly tidy up affected comments in other ways.

Note that the "free vnode" term i

vfs: remove majority of stale commentary about free list

There is no "free list" for a long time now.

While here slightly tidy up affected comments in other ways.

Note that the "free vnode" term is a misnomer at best and will also need
to get sorted out.

show more ...


Revision tags: vendor/bc/6.7.2, vendor/llvm-project/llvmorg-17.0.3-0-g888437e1b600
# 3943698c 20-Oct-2023 Kirk McKusick <mckusick@FreeBSD.org>

Minor sysctl description cleanup.

No functional change.

Agreed-by: Mateusz Guzik


# 37544d97 12-Oct-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: convert recycles_count and recycles_free_count to mere u_long

Only vnlru ever updates them.

This also removes recycles_count updates from hand-rolled debug vnode
recycling via sysctl.

Sponsor

vfs: convert recycles_count and recycles_free_count to mere u_long

Only vnlru ever updates them.

This also removes recycles_count updates from hand-rolled debug vnode
recycling via sysctl.

Sponsored by: Rubicon Communications, LLC ("Netgate")

show more ...


# a92fc312 12-Oct-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: count recycles by vnlru and by vn_alloc separately

Sponsored by: Rubicon Communications, LLC ("Netgate")


# bb679b0c 11-Oct-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: count calls to uma_reclaim in vnlru


# 281a9715 11-Oct-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: add max_vnlru_free to the vfs.vnode.vnlru tree

While here rename the var internally.


# 054f45e0 11-Oct-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: further speed up continuous free vnode recycle

The primary bottleneck *was* vnode_list mtx, which got artificially
worsened due to the following work done with the lock held:
1. the global heav

vfs: further speed up continuous free vnode recycle

The primary bottleneck *was* vnode_list mtx, which got artificially
worsened due to the following work done with the lock held:
1. the global heavily modified numvnodes counter was being read,
inducing massive cache line ping pong
2. should the value fit limits (which it normally did) there would be an
avoidable write to vn_alloc_cyclecount, which is being read outside
of the lock, once more inducing traffic

But if vn_alloc_cyclecount is 0, which it normally is even when facing
vnode shortage, there is no need to check numvnodes nor set it to 0 again.

Another problem was numvnodes adjustment (which made the locked read
much worse). While it fundamentally does not scale as it is not
distributed in any fashion, it was avoidably slow. When bumping over the
vnode limit, it would be modified with atomics 3 times: inc + dec to
backpedal in vn_alloc, then final inc in vn_alloc_hard.

One can let some slop persist over calls to vnlru_free instead.

In principle each thread in the system could get here and bump it, so a
limit is put in place to keep things sane.

Bench setup same as in prior commits: zfs, 20 separate directory trees
each with 1 million files in total and 20 find(1) processes stating them
in parallel (one per each tree).

Total run time (in seconds) goes down as follows:
vnode limit 8388608 400000
before ~20 ~35
after ~8 ~15

With this in place the primary bottleneck is now ZFS.

Sponsored by: Rubicon Communications, LLC ("Netgate")

show more ...


# a4f753e8 11-Oct-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: don't recycle transiently excess vnodes

Sponsored by: Rubicon Communications, LLC ("Netgate")


Revision tags: vendor/bsddialog/1.0, vendor/llvm-project/llvmorg-17.0.2-0-gb2417f51dbbd, vendor/openssh/9.5p1, vendor/llvm-project/llvmorg-17.0.1-25-g098e653a5bed, vendor/nvi/2.2.1, vendor/openssl/3.0.11, vendor/sqlite3/sqlite-3430100, vendor/unbound/1.18.0, vendor/NetBSD/bmake/20230909
# 90a008e9 14-Sep-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: prefix regular vnlru with a special case for free vnodes

Works around severe performance problems in certain corner cases, see
the commentary added.

Modifying vnlru logic has proven rather err

vfs: prefix regular vnlru with a special case for free vnodes

Works around severe performance problems in certain corner cases, see
the commentary added.

Modifying vnlru logic has proven rather error prone in the past and a
release is near, thus take the easy way out and fix it without having to
dig into the current machinery.

show more ...


# 23ef25d2 10-Oct-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: consult freevnodes in vnlru_kick_cond

If the count is high enough there is no point trying to produce more.
Not going there reduces traffic on the vnode_list mtx.

This further shaves total rea

vfs: consult freevnodes in vnlru_kick_cond

If the count is high enough there is no point trying to produce more.
Not going there reduces traffic on the vnode_list mtx.

This further shaves total real time in a test mentioned in:
74be676d87745eb7 ("vfs: drop one vnode list lock trip during vnlru free
recycle") -- 20 instances of find each creating 1 million vnodes, while
total limit is set to 400k.

Time goes down from ~41 to ~35 seconds.

Sponsored by: Rubicon Communications, LLC ("Netgate")

show more ...


# 1bf55a73 10-Oct-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: be less eager to call uma_reclaim(UMA_RECLAIM_DRAIN)

In face of vnode shortage the count very easily can go few units above
the limit before going back down.

Calling uma_reclaim results in mas

vfs: be less eager to call uma_reclaim(UMA_RECLAIM_DRAIN)

In face of vnode shortage the count very easily can go few units above
the limit before going back down.

Calling uma_reclaim results in massive amount of work which in this case
is not warranted.

Sponsored by: Rubicon Communications, LLC ("Netgate")

show more ...


# 8733bc27 14-Sep-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: don't provoke recycling non-free vnodes without a good reason

If the total number of free vnodes is at or above target, there is no
point creating more of them.

Tested by: pho (in a bigger pat

vfs: don't provoke recycling non-free vnodes without a good reason

If the total number of free vnodes is at or above target, there is no
point creating more of them.

Tested by: pho (in a bigger patch)

show more ...


# 9080190b 16-Sep-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: count how many times vnlru got woken up due to vnode shortage


# ef89b78b 16-Sep-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: stabilize freevnodes_old

In face of parallel callers.


# 509d843a 16-Sep-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: s/u_long vstir/bool vstir/


# d3e64789 15-Sep-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: group vnode-related sysctls under vfs.vnode

Instead of having things scattered through vfs, debug and kern trees.

Old names remain for compatibility.

Sample output of "sysctl vfs.vnode":
vfs.

vfs: group vnode-related sysctls under vfs.vnode

Instead of having things scattered through vfs, debug and kern trees.

Old names remain for compatibility.

Sample output of "sysctl vfs.vnode":
vfs.vnode.vnlru.failed_runs: 0
vfs.vnode.vnlru.recycles_free: 0
vfs.vnode.vnlru.recycles: 0
vfs.vnode.stats.alloc_sleeps: 0
vfs.vnode.stats.free: 1310
vfs.vnode.stats.skipped_requeues: 0
vfs.vnode.stats.created: 1686
vfs.vnode.stats.count: 1641
vfs.vnode.param.wantfree: 2097152
vfs.vnode.param.limit: 8388608

show more ...


# 2a689cad 16-Sep-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: retire kern.minvnodes

It was marked as legacy in 2005.


# 03bfee17 14-Sep-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: use vnlru_read_freevnodes for the freevnodes sysctl

For a more accurate result.


# ba5dc166 14-Sep-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: retire vnlru_under_unlocked

It only looks at the centralized value which in corner cases can end up
being negative.


12345678910>>...322