#
afa121e7 |
| 24-Jun-2022 |
hannken <hannken@NetBSD.org> |
Remove an incorrect assertion.
Just issue a readahead near the end of the vnode and enqueue an async read. Now let nfs_setattr() truncate the vnode, set its new size and nfs_vinvalbuf() waits for th
Remove an incorrect assertion.
Just issue a readahead near the end of the vnode and enqueue an async read. Now let nfs_setattr() truncate the vnode, set its new size and nfs_vinvalbuf() waits for the pages from the readahead to become unbusy.
The async read gets processed and returns with uio_resid > 0 because there is a hole and no write after the hole has been pushed yet. As the vnode size already got truncated to the new size the KASSERT() incorrectly fires.
show more ...
|
#
8abbca48 |
| 20-Oct-2021 |
thorpej <thorpej@NetBSD.org> |
Overhaul of the EVFILT_VNODE kevent(2) filter:
- Centralize vnode kevent handling in the VOP_*() wrappers, rather than forcing each individual file system to deal with it (except VOP_RENAME(), b
Overhaul of the EVFILT_VNODE kevent(2) filter:
- Centralize vnode kevent handling in the VOP_*() wrappers, rather than forcing each individual file system to deal with it (except VOP_RENAME(), because VOP_RENAME() is a mess and we currently have 2 different ways of handling it; at least it's reasonably well-centralized in the "new" way). - Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ, compatible with the same events in FreeBSD. - Track which kevent notifications clients are interested in receiving to avoid doing work for events no one cares about (avoiding, e.g. taking locks and traversing the klist to send a NOTE_WRITE when someone is merely watching for a file to be deleted, for example).
In support of the above:
- Add support in vnode_if.sh for specifying PRE- and POST-op handlers, to be invoked before and after vop_pre() and vop_post(), respectively. Basic idea from FreeBSD, but implemented differently. - Add support in vnode_if.sh for specifying CONTEXT fields in the vop_*_args structures. These context fields are used to convey information between the file system VOP function and the VOP wrapper, but do not occupy an argument slot in the VOP_*() call itself. These context fields are initialized and subsequently interpreted by PRE- and POST-op handlers. - Version VOP_REMOVE(), uses the a context field for the file system to report back the resulting link count of the target vnode. Return this in tmpfs, udf, nfs, chfs, ext2fs, lfs, and ufs.
NetBSD 9.99.92.
show more ...
|
#
ea5c7e85 |
| 05-Sep-2020 |
riastradh <riastradh@NetBSD.org> |
Round of uvm.h cleanup.
The poorly named uvm.h is generally supposed to be for uvm-internal users only.
- Narrow it to files that actually need it -- mostly files that need to query whether curlw
Round of uvm.h cleanup.
The poorly named uvm.h is generally supposed to be for uvm-internal users only.
- Narrow it to files that actually need it -- mostly files that need to query whether curlwp is the pagedaemon, which should maybe be exposed by an external header.
- Use uvm_extern.h where feasible and uvm_*.h for things not exposed by it. We should split up uvm_extern.h but this will serve for now to reduce the uvm.h dependencies.
- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use UVMHIST(ubchist), since ubchist is declared in uvm.h but the reference evaporates if UVMHIST is not defined, so we reduce header file dependencies.
- Make uvm_device.h and uvm_swap.h independently includable while here.
ok chs@
show more ...
|
#
14b4bbb2 |
| 23-May-2020 |
ad <ad@NetBSD.org> |
Move proc_lock into the data segment. It was dynamically allocated because at the time we had mutex_obj_alloc() but not __cacheline_aligned.
|
#
7adefd14 |
| 17-May-2020 |
ad <ad@NetBSD.org> |
Start trying to reduce cache misses on vm_page during fault processing.
- Make PGO_LOCKED getpages imply PGO_NOBUSY and remove the latter. Mark pages busy only when there's actually I/O to do.
-
Start trying to reduce cache misses on vm_page during fault processing.
- Make PGO_LOCKED getpages imply PGO_NOBUSY and remove the latter. Mark pages busy only when there's actually I/O to do.
- When doing COW on a uvm_object, don't mess with neighbouring pages. In all likelyhood they're already entered.
- Don't mess with neighbouring VAs that have existing mappings as replacing those mappings with same can be quite costly.
- Don't enqueue pages for neighbour faults unless not enqueued already, and don't activate centre pages unless uvmpdpol says its useful.
Also:
- Make PGO_LOCKED getpages on UAOs work more like vnodes: do gang lookup in the radix tree, and don't allocate new pages.
- Fix many assertion failures around faults/loans with tmpfs.
show more ...
|
#
6c7e5f2a |
| 23-Apr-2020 |
ad <ad@NetBSD.org> |
PR kern/54759 (vm.ubc_direct deadlock when read()/write() into mapping of itself)
- Add new flag UBC_ISMAPPED which tells ubc_uiomove() the object is mmap()ed somewhere. Use it to decide whether
PR kern/54759 (vm.ubc_direct deadlock when read()/write() into mapping of itself)
- Add new flag UBC_ISMAPPED which tells ubc_uiomove() the object is mmap()ed somewhere. Use it to decide whether to do direct-mapped copy, rather than poking around directly in the vnode in ubc_uiomove(), which is ugly and doesn't work for tmpfs. It would be nicer to contain all this in UVM but the filesystem provides the needed locking here (VV_MAPPED) and to reinvent that would suck more.
- Rename UBC_UNMAP_FLAG() to UBC_VNODE_FLAGS(). Pass in UBC_ISMAPPED where appropriate.
show more ...
|
#
4e45be9e |
| 22-Mar-2020 |
ad <ad@NetBSD.org> |
Process concurrent page faults on individual uvm_objects / vm_amaps in parallel, where the relevant pages are already in-core. Proposed on tech-kern.
Temporarily disabled on MP architectures with _
Process concurrent page faults on individual uvm_objects / vm_amaps in parallel, where the relevant pages are already in-core. Proposed on tech-kern.
Temporarily disabled on MP architectures with __HAVE_UNLOCKED_PMAP until adjustments are made to their pmaps.
show more ...
|
#
b4dac182 |
| 23-Feb-2020 |
ad <ad@NetBSD.org> |
UVM locking changes, proposed on tech-kern:
- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock. - Break v_interlock and vmobjlock apart. v_interlock remains a mutex. - Do partial
UVM locking changes, proposed on tech-kern:
- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock. - Break v_interlock and vmobjlock apart. v_interlock remains a mutex. - Do partial PV list locking in the x86 pmap. Others to follow later.
show more ...
|
#
943ff07e |
| 15-Jan-2020 |
ad <ad@NetBSD.org> |
Merge from yamt-pagecache (after much testing):
- Reduce unnecessary page scan in putpages esp. when an object has a ton of pages cached but only a few of them are dirty.
- Reduce the number of p
Merge from yamt-pagecache (after much testing):
- Reduce unnecessary page scan in putpages esp. when an object has a ton of pages cached but only a few of them are dirty.
- Reduce the number of pmap operations by tracking page dirtiness more precisely in uvm layer.
show more ...
|
#
8e03926d |
| 13-Dec-2019 |
ad <ad@NetBSD.org> |
Break the global uvm_pageqlock into a per-page identity lock and a private lock for use of the pagedaemon policy code. Discussed on tech-kern.
PR kern/54209: NetBSD 8 large memory performance extre
Break the global uvm_pageqlock into a per-page identity lock and a private lock for use of the pagedaemon policy code. Discussed on tech-kern.
PR kern/54209: NetBSD 8 large memory performance extremely low PR kern/54210: NetBSD-8 processes presumably not exiting PR kern/54727: writing a large file causes unreasonable system behaviour
show more ...
|
#
7b600cee |
| 15-Jul-2015 |
manu <manu@NetBSD.org> |
Fix soft NFS force unmount
For many reasons, forcibly unmounting a soft NFS mount could hang forever. Here are the fixes: - Introduce decents timeouts in operation that awaited NFS server reply. - O
Fix soft NFS force unmount
For many reasons, forcibly unmounting a soft NFS mount could hang forever. Here are the fixes: - Introduce decents timeouts in operation that awaited NFS server reply. - On timeout, fails operations on soft mounts with EIO. - Introduce NFSMNT_DISMNTFORCE to let the filesystem know that a force unmount is ongoing. This causes timeouts to be reduced and prevents the NFS client to attempt reconnecting to the NFS server.
Also fix a race condition where some asynchronous I/O could reference destroyed mount structures. We fix this by awaiting asynchronous I/O to drain before proceeding.
Reviewed by Chuck Silvers.
show more ...
|
#
ab6da680 |
| 05-Sep-2014 |
matt <matt@NetBSD.org> |
Don't use catch as a variable name.
|
#
aca42c17 |
| 12-Aug-2013 |
hannken <hannken@NetBSD.org> |
Function nfs_vinvalbuf() ignores errors from vinvalbuf() and therefore delayed write errors may get lost. Change nfs_vinvalbuf() to keep errors from vinvalbuf() for fsync() or close().
Presented on
Function nfs_vinvalbuf() ignores errors from vinvalbuf() and therefore delayed write errors may get lost. Change nfs_vinvalbuf() to keep errors from vinvalbuf() for fsync() or close().
Presented on tech-kern@
Fix for PR kern/47980 (NFS over-quota not detected if utimes() called before fsync()/close())
show more ...
|
#
21f27c2a |
| 27-Sep-2011 |
christos <christos@NetBSD.org> |
use NFS_MAXNAMLEN for all names.
|
#
cfe3feef |
| 19-Jun-2011 |
rmind <rmind@NetBSD.org> |
- Fix a silly bug: remove umap from uobj in ubc_release() UBC_UNMAP case. - Use UBC_WANT_UNMAP() consistently.
ARM (PMAP_CACHE_VIVT case) works again.
|
#
f1146e73 |
| 12-Jun-2011 |
rmind <rmind@NetBSD.org> |
Welcome to 5.99.53! Merge rmind-uvmplock branch:
- Reorganize locking in UVM and provide extra serialisation for pmap(9). New lock order: [vmpage-owner-lock] -> pmap-lock.
- Simplify locking in
Welcome to 5.99.53! Merge rmind-uvmplock branch:
- Reorganize locking in UVM and provide extra serialisation for pmap(9). New lock order: [vmpage-owner-lock] -> pmap-lock.
- Simplify locking in some pmap(9) modules by removing P->V locking.
- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).
- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner. Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.
- Unify /dev/mem et al in MI code and provide required locking (removes kernel-lock on some ports). Also, avoid cache-aliasing issues.
Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches formed the core changes of this branch.
show more ...
|
#
4d4f3314 |
| 12-Jun-2010 |
jakllsch <jakllsch@NetBSD.org> |
Fix memory leak during some NFS writes.
|
#
0c20c076 |
| 23-Apr-2010 |
pooka <pooka@NetBSD.org> |
Enforce RLIMIT_FSIZE before VOP_WRITE. This adds support to file system drivers where it was missing from and fixes one buggy implementation. The arguably weird semantics of the check are maintaine
Enforce RLIMIT_FSIZE before VOP_WRITE. This adds support to file system drivers where it was missing from and fixes one buggy implementation. The arguably weird semantics of the check are maintained (v_size vs. va_bytes, overwrite).
show more ...
|
#
02cdf4d2 |
| 14-Mar-2009 |
dsl <dsl@NetBSD.org> |
Remove all the __P() from sys (excluding sys/dist) Diff checked with grep and MK1 eyeball. i386 and amd64 GENERIC and sys still build.
|
#
d32e59eb |
| 13-Mar-2009 |
yamt <yamt@NetBSD.org> |
nfs_bioread: don't truncate values in a debug printf.
|
#
92ce8c6a |
| 19-Nov-2008 |
ad <ad@NetBSD.org> |
Make the emulations, exec formats, coredump, NFS, and the NFS server into modules. By and large this commit:
- shuffles header files and ifdefs - splits code out where necessary to be modular - adds
Make the emulations, exec formats, coredump, NFS, and the NFS server into modules. By and large this commit:
- shuffles header files and ifdefs - splits code out where necessary to be modular - adds module glue for each of the components - adds/replaces hooks for things that can be installed at runtime
show more ...
|
#
2a274197 |
| 31-Oct-2008 |
christos <christos@NetBSD.org> |
- allocate 8 pointers on the stack to avoid stack overflow in nfs. - make that 8 a constant - remove bogus panic
|
#
02934a62 |
| 17-Oct-2008 |
christos <christos@NetBSD.org> |
Requested by yamt: - In getpages don't allocate if we are not locked - Use kmem_alloc instead of malloc and don't sleep
Also provide a 64 entry stack array so we don't have to allocate in the common
Requested by yamt: - In getpages don't allocate if we are not locked - Use kmem_alloc instead of malloc and don't sleep
Also provide a 64 entry stack array so we don't have to allocate in the common case.
show more ...
|
#
cff6728f |
| 17-Oct-2008 |
dogcow <dogcow@NetBSD.org> |
it appears the previous commit's sacrifice was "successful compilation with NFS_V2_ONLY defined".
|
#
a7242b8e |
| 16-Oct-2008 |
christos <christos@NetBSD.org> |
Another sacrifice to the stack protector gods.
|