History log of /freebsd/sys/kern/vfs_subr.c (Results 1 – 25 of 2257)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# b4663a8d 13-Jan-2025 Konstantin Belousov <kib@FreeBSD.org>

stat(2): add st_filerev

Reviewed by: asomers, markj, olce, rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48452


Revision tags: release/14.2.0
# 45666640 27-Nov-2024 Edward Tomasz Napierala <trasz@FreeBSD.org>

Speed up syncer shutdown

When shutting down, the syncer kernel deamon needs to iterate over all
32 of its queues, pausing for 1/4 of second each time waiting for essentially
nothing. Bump the SYNCE

Speed up syncer shutdown

When shutting down, the syncer kernel deamon needs to iterate over all
32 of its queues, pausing for 1/4 of second each time waiting for essentially
nothing. Bump the SYNCER_SHUTDOWN_SPEEDUP so that it takes just a second to
iterate. It will still wait for another second afterwards; that bit is left
unchanged.

Reviewed By: kib
Differential Revision: https://reviews.freebsd.org/D47647

show more ...


# ef9ffb85 25-Nov-2024 Mark Johnston <markj@FreeBSD.org>

kern: Make fileops and filterops tables const where possible

No functional change intended.

MFC after: 1 week


# ab05a1cf 13-Nov-2024 Kirk McKusick <mckusick@FreeBSD.org>

Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90
Author: Mateusz Guzik <mjg@FreeBSD.org>
Date: Thu Sep 14 16:13:01 2023 +0000

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

Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90
Author: Mateusz Guzik <mjg@FreeBSD.org>
Date: Thu Sep 14 16:13:01 2023 +0000

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.

This commit was done as a performance optimization but ends up
causing slowdowns when doing operations on many files.

Requested by: re (cperciva)
MFC after: 1 minute

show more ...


# e2414d91 22-Oct-2024 Doug Moore <dougm@FreeBSD.org>

vfs_subr: maintain sorted tailq

Pctries are based on unsigned index values. Type daddr_t is
signed. Using daddr_t as an index type for a pctrie works, except that
the pctrie considers negative value

vfs_subr: maintain sorted tailq

Pctries are based on unsigned index values. Type daddr_t is
signed. Using daddr_t as an index type for a pctrie works, except that
the pctrie considers negative values greater than nonnegative
ones. Building a sorted tailq of bufs, based on pctrie results, sorts
negative daddr_ts larger than nonnegative ones, and makes code that
depends on the tailq being actually sorted broken.

Write wrappers for the functions that do pctrie operations that depend
on index ordering that fix the order problem, and use them in place of
direct pctrie operations.

PR: 282134
Reported by: pho
Reviewed by: kib, markj
Tested by: pho
Fixes: 2c8caa4b3925aa7335 vfs_subr: optimize inval_buf_range
Differential Revision: https://reviews.freebsd.org/D47200

show more ...


# 2c8caa4b 14-Oct-2024 Doug Moore <dougm@FreeBSD.org>

vfs_subr: optimize inval_buf_range

Use a pctrie_lookup to avoid walking over low out-of-range buf list
entries, and an early break to avoid the high out-of-range
entries. Avoid writing almost identi

vfs_subr: optimize inval_buf_range

Use a pctrie_lookup to avoid walking over low out-of-range buf list
entries, and an early break to avoid the high out-of-range
entries. Avoid writing almost identical loops for the dirty and clean
lists.

Because pctries are built for unsigned keys, and these are signed
values, handle the wraparound problem the same way that bnoreuselist()
does.

Reviewed by: kib
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D46963

show more ...


# ff226346 10-Oct-2024 Doug Moore <dougm@FreeBSD.org>

Revert "vfs_subr: optimize inval_buf_range"

@pho has reported that this change leads to a failure of the mmap28.sh
stress test, and I have confirmed it, so I withdraw it for further
study.

This rev

Revert "vfs_subr: optimize inval_buf_range"

@pho has reported that this change leads to a failure of the mmap28.sh
stress test, and I have confirmed it, so I withdraw it for further
study.

This reverts commit af4cd5e7b5b50502922b5d2bb42daa7fc66545bb.

show more ...


# af4cd5e7 10-Oct-2024 Doug Moore <dougm@FreeBSD.org>

vfs_subr: optimize inval_buf_range

Use a pctrie_lookup to avoid walking over low out-of-range buf list
entries, and an early break to avoid the high out-of-range
entries. Avoid writing almost identi

vfs_subr: optimize inval_buf_range

Use a pctrie_lookup to avoid walking over low out-of-range buf list
entries, and an early break to avoid the high out-of-range
entries. Avoid writing almost identical loops for the dirty and clean
lists.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D46963

show more ...


Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0
# c3d8a931 07-Aug-2023 Konstantin Belousov <kib@FreeBSD.org>

Re-implement rangelocks part 1

Using the algorithms from https://doi.org/10.1145/3342195.3387533.

For the first part, consider all range lock requests as exclusive.

Reviewed by: markj, Olivier Cer

Re-implement rangelocks part 1

Using the algorithms from https://doi.org/10.1145/3342195.3387533.

For the first part, consider all range lock requests as exclusive.

Reviewed by: markj, Olivier Certner <olce.freebsd@certner.fr>
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D41787

show more ...


# 0a9aa6fd 08-Jul-2024 Mateusz Guzik <mjg@FreeBSD.org>

vfs: make skipping LRU requeue optional

As explained in the comment in the code it is a bottleneck in certain
workloads. On the other hand it does not need to be skipped in most
cases, while transie

vfs: make skipping LRU requeue optional

As explained in the comment in the code it is a bottleneck in certain
workloads. On the other hand it does not need to be skipped in most
cases, while transiently running into the lock being contended happens a
lot.

show more ...


# eae1767d 24-Jun-2024 Ryan Libby <rlibby@FreeBSD.org>

vfs: move __always_inline to canonical position

Ahead of including inline in __always_inline, move __always_inline to
where inline goes.

Reviewed by: kib, olce
Sponsored by: Dell EMC Isilon
Differe

vfs: move __always_inline to canonical position

Ahead of including inline in __always_inline, move __always_inline to
where inline goes.

Reviewed by: kib, olce
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D45709

show more ...


# 0dc98b57 16-Jun-2024 Ryan Libby <rlibby@FreeBSD.org>

getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile

This is a scheme to avoid taking the bufobj lock and doing a second
lookup in the case where in getblk we do an unlocked lookup

getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile

This is a scheme to avoid taking the bufobj lock and doing a second
lookup in the case where in getblk we do an unlocked lookup and find no
buf. Was there really no buf, or were we in the middle of a reassignbuf
race? By tracking any use of reassignbuf with a flag, we can know if
there can't have been a race because there has been no reassignbuf.
Because this scheme is spoiled on the first use of reassignbuf, it is
mostly only beneficial for cases where a certain vnode is never expected
to use dirty bufs at all.

Reviewed by: kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D45571

show more ...


# 780666c0 06-Jun-2024 Ryan Libby <rlibby@FreeBSD.org>

getblk: reduce time under bufobj lock

Use the new pctrie combined insert/lookup facility to reduce work and
time under the bufobj interlock when associating a buf with a vnode.

We now do one lookup

getblk: reduce time under bufobj lock

Use the new pctrie combined insert/lookup facility to reduce work and
time under the bufobj interlock when associating a buf with a vnode.

We now do one lookup in the dirty tree and one combined lookup/insert in
the clean tree instead of one lookup in dirty, two in clean, and then an
insert in clean. We also avoid touching the possibly unrelated buf at
the tail of the queue.

Also correct an issue where the actual order of the tail queue depended
on the insertion order due to sign issues.

Reviewed by: kib (previous version), dougm, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D45395

show more ...


# 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 ...


# 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 ...


# 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 ...


# 3943698c 21-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 12-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.


12345678910>>...91