Age | Commit message (Collapse) | Author |
|
- 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
|
|
|
|
to see if we've hogged the cpu for >1 second.
okay miod@
|
|
yield() if the cpu is marked SHOULDYIELD.
ok miod@ tedu@ phessler@
|
|
this should provide a degree of scan resistance, and also serves as a
midway point for further development of multi queue algorithms.
i've tried to minimize the risk and degree of regressions.
probably ok beck
|
|
|
|
|
|
after discussions with beck deraadt kettenis.
|
|
size (kern.bufcachepercent) on resume, for better hibernate performance.
ok beck@
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
algorithms to be tested. in the process, drop support for unused B_AGE and
b_synctime options.
previous versions ok beck deraadt
|
|
a single target of used pages in the cache - so we don't to a ton of work
throwing away pages sporadically while holding the biglock - noticed by dlg.
ok dlg@ deraadt@
|
|
once brelse() is called and the buffer is B_INVAL.
ok jsing@ krw@
|
|
tested on vax (gcc3) ok miod@
|
|
will come back soon.
ok deraadt@
|
|
undo style changes.
|
|
|
|
This change splits the buffer cache free lists into lists of dma reachable
buffers and high memory buffers based on the ranges returned by pmemrange.
Buffers move from dma to high memory as they age, but are flipped to dma
reachable memory if IO is needed to/from and high mem buffer. The total
amount of buffers allocated is now bufcachepercent of both the dma and
the high memory region.
This change allows the use of large buffer caches on amd64 using more than
4 GB of memory
ok tedu@ krw@ - testing by many.
|
|
test period; i think 3 years ago the last bugs fell out.
ok otto beck others
|
|
in MI code; gcc 2.95 does not accept such annotation for function pointer
declarations, only function prototypes.
To be uncommented once gcc 2.95 bites the dust.
|
|
function pointer arguments which are {used as,} wrappers around the kernel
printf function.
No functional change.
|
|
really have been called "maybemapped and hope it all works out". - use
buf_acquire_nomap instead which acounts for busymapped bufs correctly.
ok krw@ guenther@ kettenis@
|
|
set a high water mark, as this will likely cause us problems in low memory
situations where we can't get a struct buf.
ok kettenis@
|
|
there are no buffers on the dirty queue to clean.
ok beck@
|
|
as fix the case where buffers can be returned on the vinvalbuf path
and we do not get woken up when waiting for kva.
An earlier version looked at and ok'd by guenther@ in coimbra. - helpful
comments from kettenis@
|
|
be throwing away when growing the buffer cache - ok mlarkin@
|
|
A long time ago (in vienna) the reserves for the cleaner and syncer were
removed. softdep and many things have not performed ths same ever since.
Follow on generations of buffer cache hackers assumed the exising code
was the reference and have been in frustrating state of coprophagia ever
since.
This commit
0) Brings back a (small) reserve allotment of buffer pages, and the kva to
map them, to allow the cleaner and syncer to run even when under intense
memory or kva pressure.
1) Fixes a lot of comments and variables to represent reality.
2) Simplifies and corrects how the buffer cache backs off down to the lowest
level.
3) Corrects how the page daemons asks the buffer cache to back off, ensuring
that uvmpd_scan is done to recover inactive pages in low memory situaitons
4) Adds a high water mark to the pool used to allocate struct buf's
5) Correct the cleaner and the sleep/wakeup cases in both low memory and low
kva situations. (including accounting for the cleaner/syncer reserve)
Tested by many, with very much helpful input from deraadt, miod, tobiasu,
kettenis and others.
ok kettenis@ deraadt@ jj@
|
|
- Whitespace KNF
- Removal/fixing of old useless comments
- Removal of unused counter
- Removal of pointless test that had no effect
ok krw@
|
|
This change ensures that writes in flight from the buffer cache via bufq
are limited to a high water mark - when the limit is reached the writes sleep
until the amount of IO in flight reaches a low water mark. This avoids the
problem where userland can queue an unlimited amount of asynchronous writes
resulting in the consumption of all/most of our available buffer mapping kva,
and a long queue of writes to the disk.
ok kettenis@, krw@
|
|
- make sure the buffer reclaiming loop in buf_get() actually does something
but spin, if `backoffpages' is nonzero and all free queues have been drained.
- don't forget to set a poor man's condition variable to nonzero before
tsleeping on it in bufadjust(), otherwise you'll never get woken up.
- don't be too greedy and reassing backoffpages a large amount immediately
after bufadjust() has been called.
This fixes reproduceable hangs seen during heavy I/O (such as `make install'
of many large files, e.g. run in /usr/src/lib with NOMAN=) on systems with
a challenged number of pages (less than a few thousands, total).
Part of this is temporary bandaid until a better pressure logic is devised,
but it's solving an immediate problem. Been in snapshots for a solid month.
|
|
of per-rthread. Handling of per-thread tick and runtime counters
inspired by how FreeBSD does it.
ok kettenis@
|
|
remove some now useless statistics, and add some
relevant ones regarding kva usage in the cache.
make systat io and show bcstats in ddb both show
these counters.
ok deraadt@ krw@
|
|
(part missed from previous commit)
|
|
|
|
|
|
for now; that is unlikely to hit some of the remaining starvation bugs.
Repair the bufpages calculation too; i386 was doing it ahead of time
(incorrectly) and then re-calculating it.
ok thib
|
|
does not do what it purports to do, it shrinks mapping, not allocation, as
the pages have already been given away to other buffers. This also renames
the function to make this a little more obvious
and art should not name funcitons
ok thib@, art@
|
|
With this change bufcachepercent will be the percentage of dma reachable
memory that the buffer cache will attempt to use.
ok deraadt@ thib@ oga@
|
|
it is totally wrong to convert bdwrite into bawrite on the fly. this just
causes way bigger issues.
ok beck blambert
|
|
repair that situation. Darn newbies...
|
|
from its vnode's buffer cache in an interrupt context. Therefore we
need interrupt protection when searching the buffer red-black tree.
ok deraadt@, thib@, art@
|