#
3eb6b656 |
| 08-Feb-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: remove now useless ENODEV handling from vn_fullpath consumers
Noted by: ngie
|
#
051669e8 |
| 25-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r356931 through r357118.
|
#
b3fb13eb |
| 24-Jan-2020 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Add kern_unmount() and use in Linuxulator. No functional changes.
Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D22646
|
#
bbb1e07d |
| 15-Jan-2020 |
Kirk McKusick <mckusick@FreeBSD.org> |
Peter Holm reports that his test that does an umount(8) on an active mount point while numerous tests are running that are writing to files on that mount point cause the unmount(8) to hang forever.
Peter Holm reports that his test that does an umount(8) on an active mount point while numerous tests are running that are writing to files on that mount point cause the unmount(8) to hang forever.
The unmount(8) system call is handled in the kernel by the dounmount() function. The cause of the hang is that prior to dounmount() calling VFS_UNMOUNT() it is calling VFS_SYNC(mp, MNT_WAIT). The MNT_WAIT flag indicates that VFS_SYNC() should not return until all the dirty buffers associated with the mount point have been written to disk. Because user processes are allowed to continue writing and can do so faster than the data can be written to disk, the call to VFS_SYNC() can never finish.
Unlike VFS_SYNC(), the VFS_UNMOUNT() routine can suspend all processes when they request to do a write thus having a finite number of dirty buffers to write that cannot be expanded. There is no need to call VFS_SYNC() before calling VFS_UNMOUNT(), because VFS_UNMOUNT() needs to flush everything again anyway after suspending writes, to catch anything that was dirtied between the VFS_SYNC() and writes being suspended.
The fix is to simply remove the unnecessary call to VFS_SYNC() from dounmount().
Reported by: Peter Holm Analysis by: Chuck Silvers Tested by: Peter Holm MFC after: 7 days Sponsored by: Netflix
show more ...
|
#
cc3593fb |
| 13-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: rework vnode list management
The current notion of an active vnode is eliminated.
Vnodes transition between 0<->1 hold counts all the time and the associated traversal between different lists
vfs: rework vnode list management
The current notion of an active vnode is eliminated.
Vnodes transition between 0<->1 hold counts all the time and the associated traversal between different lists induces significant scalability problems in certain workloads.
Introduce a global list containing all allocated vnodes. They get unlinked only when UMA reclaims memory and are only requeued when hold count reaches 0.
Sample result from an incremental make -s -j 104 bzImage on tmpfs: stock: 118.55s user 3649.73s system 7479% cpu 50.382 total patched: 122.38s user 1780.45s system 6242% cpu 30.480 total
Reviewed by: jeff Tested by: pho (in a larger patch, previous version) Differential Revision: https://reviews.freebsd.org/D22997
show more ...
|
#
57083d25 |
| 13-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: add per-mount vnode lazy list and use it for deferred inactive + msync
This obviates the need to scan the entire active list looking for vnodes of interest.
msync is handled by adding all vnod
vfs: add per-mount vnode lazy list and use it for deferred inactive + msync
This obviates the need to scan the entire active list looking for vnodes of interest.
msync is handled by adding all vnodes with write count to the lazy list.
deferred inactive directly adds vnodes as it sets the VI_DEFINACT flag.
Vnodes get dequeued from the list when their hold count reaches 0.
Newly added MNT_VNODE_FOREACH_LAZY* macros support filtering so that spurious locking is avoided in the common case.
Reviewed by: jeff Tested by: pho (in a larger patch, previous version) Differential Revision: https://reviews.freebsd.org/D22995
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 ...
|
#
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: release/12.1.0 |
|
#
8b3bc70a |
| 08-Oct-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r352764 through r353315.
|
#
dc20b834 |
| 07-Oct-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: add optional root vnode caching
Root vnodes looekd up all the time, e.g. when crossing a mount point. Currently used routines always perform a costly lookup which can be trivially avoided.
Rev
vfs: add optional root vnode caching
Root vnodes looekd up all the time, e.g. when crossing a mount point. Currently used routines always perform a costly lookup which can be trivially avoided.
Reviewed by: jeff (previous version), kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21646
show more ...
|
#
50bb04b7 |
| 27-Sep-2019 |
Andrew Turner <andrew@FreeBSD.org> |
Check the vfs option length is valid before accessing through
When a VFS option passed to nmount is present but NULL the kernel will place an empty option in its internal list. This will have a NULL
Check the vfs option length is valid before accessing through
When a VFS option passed to nmount is present but NULL the kernel will place an empty option in its internal list. This will have a NULL pointer and a length of 0. When we come to read one of these the kernel will try to load from the last address of virtual memory. This is normally invalid so will fault resulting in a kernel panic.
Fix this by checking if the length is valid before dereferencing.
MFC after: 3 days Sponsored by: DARPA, AFRL
show more ...
|
#
668ee101 |
| 26-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r352587 through r352763.
|
#
ba7a55d9 |
| 23-Sep-2019 |
Sean Eric Fagan <sef@FreeBSD.org> |
Add two options to allow mount to avoid covering up existing mount points. The two options are
* nocover/cover: Prevent/allow mounting over an existing root mountpoint. E.g., "mount -t ufs -o nocov
Add two options to allow mount to avoid covering up existing mount points. The two options are
* nocover/cover: Prevent/allow mounting over an existing root mountpoint. E.g., "mount -t ufs -o nocover /dev/sd1a /usr/local" will fail if /usr/local is already a mountpoint. * emptydir/noemptydir: Prevent/allow mounting on a non-empty directory. E.g., "mount -t ufs -o emptydir /dev/sd1a /usr" will fail.
Neither of these options is intended to be a default, for historical and compatibility reasons.
Reviewed by: allanjude, kib Differential Revision: https://reviews.freebsd.org/D21458
show more ...
|
#
f05b9584 |
| 21-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r352537 through r352586.
|
#
b488246b |
| 19-Sep-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: group fields used for per-cpu ops in one cacheline
Sponsored by: The FreeBSD Foundation
|
#
419f843f |
| 17-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r352319 through r352435.
|
#
4cace859 |
| 16-Sep-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: convert struct mount counters to per-cpu
There are 3 counters modified all the time in this structure - one for keeping the structure alive, one for preventing unmount and one for tracking acti
vfs: convert struct mount counters to per-cpu
There are 3 counters modified all the time in this structure - one for keeping the structure alive, one for preventing unmount and one for tracking active writers. Exact values of these counters are very rarely needed, which makes them a prime candidate for conversion to a per-cpu scheme, resulting in much better performance.
Sample benchmark performing fstatfs (modifying 2 out of 3 counters) on a 104-way 2 socket Skylake system: before: 852393 ops/s after: 76682077 ops/s
Reviewed by: kib, jeff Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21637
show more ...
|
#
a8c8e44b |
| 16-Sep-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: manage mnt_ref with atomics
New primitive is introduced to denote sections can operate locklessly on aspects of struct mount, but which can also be disabled if necessary. This provides an oppor
vfs: manage mnt_ref with atomics
New primitive is introduced to denote sections can operate locklessly on aspects of struct mount, but which can also be disabled if necessary. This provides an opportunity to start scaling common case modifications while providing stable state of the struct when facing unmount, write suspendion or other events.
mnt_ref is the first counter to start being managed in this manner with the intent to make it per-cpu.
Reviewed by: kib, jeff Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21425
show more ...
|
#
c5c3ba6b |
| 03-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351317 through r351731.
|
#
e671edac |
| 23-Aug-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
De-commision the MNTK_NOINSMNTQ kernel mount flag.
After all the changes, its dynamic scope is same as for MNTK_UNMOUNT, but to allow the syncer vnode to be re-installed on unmount failure. But the
De-commision the MNTK_NOINSMNTQ kernel mount flag.
After all the changes, its dynamic scope is same as for MNTK_UNMOUNT, but to allow the syncer vnode to be re-installed on unmount failure. But the case of syncer was already handled by using the VV_FORCEINSMQ flag for quite some time.
Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
#
4b3f7673 |
| 19-Aug-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: fix up r351193 ("stop always overwriting ->mnt_stat in VFS_STATFS")
fs-specific part of vfs_statfs routines only fill in small portion of the structure. Previous code was always copying everyth
vfs: fix up r351193 ("stop always overwriting ->mnt_stat in VFS_STATFS")
fs-specific part of vfs_statfs routines only fill in small portion of the structure. Previous code was always copying everything at a higher layer to acoomodate it and this patch does the same.
'df' (no arguments) worked fine because the caller uses mnt_stat itself as the target buffer, making all the copying a no-op for its own case. 'df /' and similar use a different consumer which passes its own buffer and this is where you can run into trouble.
Reported by: cy Fixes: r351193 Sponsored by: The FreeBSD Foundation
show more ...
|
#
e7c1709a |
| 18-Aug-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: stop always overwriting ->mnt_stat in VFS_STATFS
The struct is already populated on each mount (and remount). Fields are either constant or not used by filesystem in the first place.
Some infr
vfs: stop always overwriting ->mnt_stat in VFS_STATFS
The struct is already populated on each mount (and remount). Fields are either constant or not used by filesystem in the first place.
Some infrequently used functions use it to avoid having to allocate a new buffer and are left alone.
The current code results in an avoidable copying single-threaded and significant cache line bouncing multithreaded
While here deduplicate initial filling of the struct.
Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21317
show more ...
|
Revision tags: release/11.3.0 |
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|
#
daec9284 |
| 21-May-2019 |
Conrad Meyer <cem@FreeBSD.org> |
Include ktr.h in more compilation units
Similar to r348026, exhaustive search for uses of CTRn() and cross reference ktr.h includes. Where it was obvious that an OS compat header of some kind inclu
Include ktr.h in more compilation units
Similar to r348026, exhaustive search for uses of CTRn() and cross reference ktr.h includes. Where it was obvious that an OS compat header of some kind included ktr.h indirectly, .c files were left alone. Some of these files clearly got ktr.h via header pollution in some scenarios, or tinderbox would not be passing prior to this revision, but go ahead and explicitly include it in files using it anyway.
Like r348026, these CUs did not show up in tinderbox as missing the include.
Reported by: peterj (arm64/mp_machdep.c) X-MFC-With: r347984 Sponsored by: Dell EMC Isilon
show more ...
|
#
13c31c29 |
| 21-Dec-2018 |
Kirk McKusick <mckusick@FreeBSD.org> |
Some filesystems (like cd9660 and ext3) require that VFS_STATFS() be called before VFS_ROOT() is called. Move the call for VFS_STATFS() so that it is done after VFS_MOUNT(), but before VFS_ROOT(). Th
Some filesystems (like cd9660 and ext3) require that VFS_STATFS() be called before VFS_ROOT() is called. Move the call for VFS_STATFS() so that it is done after VFS_MOUNT(), but before VFS_ROOT(). This change actually improves the robustness of the mount system call because it returns an error rather than failing silently when VFS_STATFS() returns failure.
Reported by: Rebecca Cran <rebecca@bluestop.org> Sponsored by: Netflix
show more ...
|