#
879e0604 |
| 12-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
Add KERNEL_PANICKED macro for use in place of direct panicstr tests
|
#
91de98e6 |
| 11-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: only recalculate watermarks when limits are changing
Previously they would get recalculated all the time, in particular in: getnewvnode -> vcheckspace -> vspace
|
#
e6ae744e |
| 11-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: deduplicate vnode allocation logic
This creates a dedicated routine (vn_alloc) to allocate vnodes.
As a side effect code duplicationw with getnewvnode_reserve is eleminated.
Add vn_free for s
vfs: deduplicate vnode allocation logic
This creates a dedicated routine (vn_alloc) to allocate vnodes.
As a side effect code duplicationw with getnewvnode_reserve is eleminated.
Add vn_free for symmetry.
show more ...
|
#
b52d50cf |
| 11-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: prealloc vnodes in getnewvnode_reserve
Having a reserved vnode count does not guarantee that getnewvnodes wont block later. Said blocking partially defeats the purpose of reserving in the first
vfs: prealloc vnodes in getnewvnode_reserve
Having a reserved vnode count does not guarantee that getnewvnodes wont block later. Said blocking partially defeats the purpose of reserving in the first place.
Preallocate instaed. The only consumer was always passing "1" as count and never nesting reservations.
show more ...
|
#
69283067 |
| 11-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: incomplete pass at converting more ints to u_long
Most notably numvnodes and freevnodes were u_long, but parameters used to govern them remained as ints.
|
#
bf62296f |
| 11-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: add missing CLTFLA_MPSAFE annotations
This covers all kern/vfs_*.c files.
|
Revision tags: vendor/acpica/20200110 |
|
#
a9a047bc |
| 07-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: handle doomed vnodes in vdefer_inactive
vgone dooms the vnode while keeping VI_OWEINACT set and then drops the interlock.
vputx can pick up the interlock and pass it to vdefer_inactive since t
vfs: handle doomed vnodes in vdefer_inactive
vgone dooms the vnode while keeping VI_OWEINACT set and then drops the interlock.
vputx can pick up the interlock and pass it to vdefer_inactive since the flag is set.
The race is harmless, just don't defer anything as vgone will take care of it.
Reported by: pho
show more ...
|
#
c8b3463d |
| 07-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: reimplement deferred inactive to use a dedicated flag (VI_DEFINACT)
The previous behavior of leaving VI_OWEINACT vnodes on the active list without a hold count is eliminated. Hold count is kept
vfs: reimplement deferred inactive to use a dedicated flag (VI_DEFINACT)
The previous behavior of leaving VI_OWEINACT vnodes on the active list without a hold count is eliminated. Hold count is kept and inactive processing gets explicitly deferred by setting the VI_DEFINACT flag. The syncer is then responsible for vdrop.
Reviewed by: kib (previous version) Tested by: pho (in a larger patch, previous version) Differential Revision: https://reviews.freebsd.org/D23036
show more ...
|
#
b7cc9d18 |
| 07-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: trylock in vfs_msync and refactor the func
- use LK_NOWAIT instead of calling VOP_ISLOCKED before deciding to lock - evaluate flags before looping over vnodes
Reviewed by: kib Tested by: pho (
vfs: trylock in vfs_msync and refactor the func
- use LK_NOWAIT instead of calling VOP_ISLOCKED before deciding to lock - evaluate flags before looping over vnodes
Reviewed by: kib Tested by: pho (in a larger patch, previous version) Differential Revision: https://reviews.freebsd.org/D23035
show more ...
|
#
c92fe112 |
| 07-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: use a dedicated counter for free vnode recycling
Otherwise vlrureclaim activitity is mixed in and it is hard to tell which vnodes got reclaimed.
|
#
cc2b586d |
| 07-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: prevent numvnodes and freevnodes re-reads when appropriate
Otherwise in code like this: if (numvnodes > desiredvnodes) vnlru_free_locked(numvnodes - desiredvnodes, NULL);
numvnodes can drop b
vfs: prevent numvnodes and freevnodes re-reads when appropriate
Otherwise in code like this: if (numvnodes > desiredvnodes) vnlru_free_locked(numvnodes - desiredvnodes, NULL);
numvnodes can drop below desiredvnodes prior to the call and if the compiler generated another read the subtraction would get a negative value.
show more ...
|
#
37fe521a |
| 07-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: annotate numvnodes and vnode_free_list_mtx with __exclusive_cache_line
|
#
478368ca |
| 07-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: eliminate v_tag from struct vnode
There was only one consumer and it was using it incorrectly.
It is given an equivalent hack.
Reviewed by: jeff Differential Revision: https://reviews.freebsd
vfs: eliminate v_tag from struct vnode
There was only one consumer and it was using it incorrectly.
It is given an equivalent hack.
Reviewed by: jeff Differential Revision: https://reviews.freebsd.org/D23037
show more ...
|
#
a91190c6 |
| 07-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: add a helper for allocating marker vnodes
|
#
8dbc6352 |
| 05-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: drop thread argument from vinactive
|
#
867fd730 |
| 05-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: patch up vnode count assertions to report found value
|
#
b249ce48 |
| 03-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: drop the mostly unused flags argument from VOP_UNLOCK
Filesystems which want to use it in limited capacity can employ the VOP_UNLOCK_FLAGS macro.
Reviewed by: kib (previous version) Differenti
vfs: drop the mostly unused flags argument from VOP_UNLOCK
Filesystems which want to use it in limited capacity can employ the VOP_UNLOCK_FLAGS macro.
Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D21427
show more ...
|
Revision tags: vendor/openssl/1.0.2u |
|
#
57db0e12 |
| 01-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: drop an always-false check from vlrureclaim
The vnode gets held few lines prior, making the VI_FREE condition illegal.
|
Revision tags: vendor/libarchive/3.4.1, vendor/unbound/1.9.6 |
|
#
eb976461 |
| 27-Dec-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: remove production kernel checks and mp == NULL support from vdrop
1. The only place in the tree which calls getnewvnode with mp == NULL does it for vp_crossmp which will never execute this code
vfs: remove production kernel checks and mp == NULL support from vdrop
1. The only place in the tree which calls getnewvnode with mp == NULL does it for vp_crossmp which will never execute this codepath. Any vnode which legally has ->v_mount == NULL is also doomed, which once more wont execute this code. 2. Remove an assertion for v_holdcnt from production kernels. It gets taken care of by refcount macros in debug kernels.
Any code which would want to pass NULL mp can construct a fake one instead.
Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D22722
show more ...
|
Revision tags: vendor/llvm-project/llvmorg-9.0.1, vendor/llvm-project/llvmorg-10-init-8157-g186155b89c2, vendor/llvm-project/trunk-r375505 |
|
#
6fa079fc |
| 16-Dec-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: flatten vop vectors
This eliminates the following loop from all VOP calls:
while(vop != NULL && \ vop->vop_spare2 == NULL && vop->vop_bypass == NULL) vop = vop->vop_default;
Revie
vfs: flatten vop vectors
This eliminates the following loop from all VOP calls:
while(vop != NULL && \ vop->vop_spare2 == NULL && vop->vop_bypass == NULL) vop = vop->vop_default;
Reviewed by: jeff Tesetd by: pho Differential Revision: https://reviews.freebsd.org/D22738
show more ...
|
Revision tags: vendor/acpica/20191213 |
|
#
ff4486e8 |
| 10-Dec-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: refactor vhold and vdrop
No fuctional changes.
|
#
abd80ddb |
| 08-Dec-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: introduce v_irflag and make v_type smaller
The current vnode layout is not smp-friendly by having frequently read data avoidably sharing cachelines with very frequently modified fields. In part
vfs: introduce v_irflag and make v_type smaller
The current vnode layout is not smp-friendly by having frequently read data avoidably sharing cachelines with very frequently modified fields. In particular v_iflag inspected for VI_DOOMED can be found in the same line with v_usecount. Instead make it available in the same cacheline as the v_op, v_data and v_type which all get read all the time.
v_type is avoidably 4 bytes while the necessary data will easily fit in 1. Shrinking it frees up 3 bytes, 2 of which get used here to introduce a new flag field with a new value: VIRF_DOOMED.
Reviewed by: kib, jeff Differential Revision: https://reviews.freebsd.org/D22715
show more ...
|
#
791a24c7 |
| 08-Dec-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: clean up vputx a little
1. replace hand-rolled macros for operation type with enum 2. unlock the vnode in vput itself, there is no need to branch on it. existence of VPUTX_VPUT remains signific
vfs: clean up vputx a little
1. replace hand-rolled macros for operation type with enum 2. unlock the vnode in vput itself, there is no need to branch on it. existence of VPUTX_VPUT remains significant in that the inactive variant adds LK_NOWAIT to locking request. 3. remove the useless v_usecount assertion. few lines above the checks if v_usecount > 0 and leaves. should the value be negative, refcount would fail. 4. the CTR return vnode %p to the freelist is incorrect as vdrop may find the vnode with holdcnt > 1. if the like should exist, it should be moved there 5. no need to error = 0 for everyone
Reviewed by: kib, jeff (previous version) Differential Revision: https://reviews.freebsd.org/D22718
show more ...
|
#
fd6e0c43 |
| 08-Dec-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: factor out vnode destruction out of vdrop
Sponsored by: The FreeBSD Foundation
|
#
12e483e5 |
| 07-Dec-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: clean up delmntque similarly to vdrop r355414
|