Age | Commit message (Collapse) | Author |
|
Reviewed by miod@, ok tb@, beck@
|
|
Softdep has been a no-op for some time now, this removes it to get
it out of the way.
Flensing mostly done in Talinn, with some help from krw@
ok deraadt@
|
|
Called wrong incore when not holding bio.
ok claudio@
|
|
in preparation for improvements.
ok claudio@
|
|
ok mpi@ miod@
|
|
Buffer cache related struct vnode fields can be accessed in interrupt
context. Be more consistent with the use of splbio().
OK mpi@
|
|
Pass the device vnode as a parameter to VOP_STRATEGY() to allow calling
the correct vop_strategy callback. Now the vnode is also available
in the callback.
OK mpi@
|
|
Some pmaps (x86, hppa) and the buffer cache rely on UVM objects to allocate
and manipulate pages. These objects should not be manipulated by uvm_fault()
and do not currently require the same locking enforcement.
Use the dummy pagers to explicitly document which UVM functions are meant to
manipulate UVM objects (uobj) that do not need the upcoming `vmobjlock' and
instead still rely on the KERNEL_LOCK().
Tested by many as part of a larger diff.
ok kettenis@, beck@
|
|
For example uvm_objinit() becomes uvm_obj_init(). Reduce differences
between the trees and help porting new functions needed for UVM object
locking.
No functionnal change.
|
|
ok gnezdo@ semarie@ mpi@
|
|
ok beck@
|
|
while here, swap two lines in bufcache_release() to put a KASSERT() first
following the pattern in bufcache_take()
ok beck@ mpi@
|
|
Noticed by, and based on a diff from Mike Small <smallm@sdf.org>.
|
|
into more delayed writes if the vnd is mounted from a file on an MNT_ASYNC
filesystem. This prevents a situaiton where the cleaner can not clean
delayed writes out without making more delayed writes, and we end up
waiting for the syncer to spit things occasionaly when it runs.
noticed and reported by sven falempin <sven.falempin@gmail.com> on tech,
who validated this fixes his issue.
ok krw@
|
|
clear the NOCACHE flag, since if we are doing a delayed write the buffer
must be cached or it is thrown away when the "write" is done.
fixes vnd on mfs regress tests.
ok kettenis@ deraadt@
|
|
|
|
Otherwise the write will be discarded, which would prevent use of vnd(4)
on top of an async-mounted file system.
OK beck@
|
|
assert that the wire count is equal to 1 and not unconditionally set it
to 1.
ok kettenis@ mpi@
|
|
no function change.
|
|
otherwise we are guaranteed to panic a few lines down in
softdep_deallocate_dependencies.
Found by Matthias Pitzl <matthias_pitzl@genua.de> running vnd's on top
of a softdep filesystem.
ok bluhm@ deraadt@
|
|
ok visa@, jca@
|
|
ensure we handle the uvm_objects of bread_cluster buffers correctly.
Original commit message:
Fix the buffer cache code to not use a giant uvm obj of all pages
when a small one on each buf is all that is needed. reduces the
cost of large frees by about 25%.
Again, lots of assistence from kettenis and mlarkin
still ok kettenis@
|
|
in a few places. No code change.
|
|
|
|
Noticed by me and otto@
ok tedu@
|
|
This also modifies the backoff logic to only back off what is requested
and not a "mimimum" amount. Tested by me, benno@, tedu@ anda ports build
by naddy@.
ok tedu@
|
|
lead to lost errors, where a later fsync will return success. to fix this,
set a flag on the vnode indicating a past error has occurred, and return
an error for future fsync calls.
ok bluhm deraadt visa
|
|
ok mikeb@, visa@
|
|
passing the main function directly to kthread_create(9). The start_*
functions are mere stepping stones nowadays and can be pruned.
They used to contain more logic in the pre-kthread era.
While here, set `cleanerproc' and `syncerproc' during the thread
creation rather than expect the threads to set the proc pointer.
Also, rename `sched_sync' to `syncer_thread' to reduce confusion
with the scheduler-related functions.
OK kettenis@, deraadt@, mpi@
|
|
to a max of 4096 pages. Limit the warm and cold queues to half the cache.
This allows us to more effectively notice re-interest in buffers instead
of losing it in a large hot queue. Discussed and shown with claudio@
and benno@ at tk217
|
|
* add clarifications and bread_cluster() buffercache(9)
* add some comments to vfs_bio.c
ok tedu@
|
|
Buffercache performs read-ahead for cluster reads by extending
the length of an original read operation to the MAXPHYS (64k).
Upon I/O completion, the length is trimmed and the buffer is
returned to the filesystem and the remaining data is cached.
However, under certain circumstances, the underlying hardware
may fail to do a complete I/O operation and return with a non-
zero value of the residual length (i.e. data that wasn't read).
The residual length may exceed the size of an original request
and must be re-adjusted to uphold the contract with the caller,
e.g. the filesystem. At the same time, read-ahead buffers that
cover chunks of memory corresponding to the residual length
must be invalidated and not cached.
Discussed at length during d2k17, ok tedu
|
|
of memory, handling the fact that both queues are actually in dma
space when not flipping buffers high
|
|
region if uvm tells us it is available.
nits from deraadt@
ok krw@ guenther@ kettenis@
|
|
unsigned variables as argument in most places anyway. Decrease the
chance of signedness/range mismatch issues.
ok stefan
|
|
The distinction between preempt() and yield() stays as it is usueful
to know if a thread decided to yield by itself or if the kernel told
him to go away.
ok tedu@, guenther@
|
|
i had to shuffle the order of some header bits cos RBT_PROTOTYPE
needs to see what RBT_HEAD produces.
|
|
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
|
|
ok deraadt@ guenther@
|
|
ok mglocker
|
|
- modify B_DMA handling to be in vfs_biomem.c
- change buffer allocation to try allocations with NOWAIT and to throw away clean pages
if allocation fails - allocate with WAITOK only if you can't throw away enough pages to
succeed
"probably sound" deraadt@
|
|
of the hibernate path and starts preparing for some other work in here
|
|
in the buffer cache.
When the Dynamic Buffer Cache has been introduced bread_cluster()
became the replacement of cluster_read(). However this function
did not consider the B_CACHE flag of the first buffer of a cluster
like its predecessor did.
This improves a lot read operations on MSDOSFS while reducing the
number of DMA operations.
ok beck@
|
|
ok mpi@
|
|
first queue to the second.
Mark the first queue as DMA in preparation for being able to use more memory
by flipping. Flipper code currently only sets and clears the flag.
ok tedu@ guenther@
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS). This will allow these to no
longer be constants in the future.
ok guenther@
|
|
and the bufq pointer might be NULL at the time it is `saved'.
Found the hard way on sparc due to the limited kva, with all disk active
processes ending up sleeping on "buf_needva".
ok kettenis@ krw@
|
|
change on us. also, remove unused second arg to bufq_wait.
from pedro at bitrig via david hill.
ok beck kettenis
|
|
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt
|