| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
|
|
| |
change on us. also, remove unused second arg to bufq_wait.
from pedro at bitrig via david hill.
ok beck kettenis
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
| |
KASSERT it being > 0 before decrementing.
ok dlg@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
safely remove disksort.
most hardware and pretty much all of the kernel has moved to logical
block addressing when dealing with disks, so the assumptions disksort
was built against arent useful these days. it also has bad edge cases
with lots of sequential writes being able to starve other io requests
in the system. these issues have been addressed by becks nscan
implementation, which disksort was previously deprecated in favour
of.
this removes the guts of disksort and the bufq wrapper around it.
ok miod@
|
|
|
|
| |
ok millert@
|
| |
|
|
|
|
|
|
|
| |
when there are more of them than size of queue waiting, and nothing else
going on.
ok miod@ kettenis@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
n = 128.
Nscan is essentially, the disksort() style elevator algorithm for ordering
disk io operations. The difference is that we will re-order in chunks of
128 operations before continuing with the rest of the work. This avoids
the problem that the basic SCAN (aka elevator algorithm) has where continued
inserts can cause starvation, where requests can sit for a long time. This
solves problems where usb sticks could be unusable while long sequential
writes happened, and systems would become unresponsive while dumping core.
hacked upon (and this version largely rewritten by) tedu and myself.
Note, can be "backed out" by changing BUFQ_DEFAULT back to disksort in
buf.h
ok kettenis@, tedu@, 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@
|
| |
|
|
|
|
|
|
| |
bufq_impls. Also, make bufq_impls const.
ok dlg@
|
|
|
|
|
|
| |
process of quiescing I/O.
ok dlg@
|
|
|
|
| |
comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rather than it being a pointer to something that needs to be allocated
at attach. since all these devices need a bufq to operate, it makes
sense to have it allocated as part of the softc and get bufq_init
to just initialise all its fields. it also gets rid of the possibility
that you wont be able to allocate the bufq struct during attach,
which is something you dont want to happen.
secondly, it consistently implements a split between wrapper functions
and the per discipline implementation of the bufq handlers. it
consistently does the locking in the wrappers rather than doing
half in the wrappers and the other half in the implementations.
it also consistently handles the outstanding bufq bq pointer in the
wrappers.
this hides most of the implementation inside kern_bufq.c. the only
stuff left in buf.h is for the bits each implementation needs to
put inside struct buf.
tested by thib@ krw@ and me
ok thib@ matthew@
no objection from krw@
|
|
|
|
|
|
| |
calling bufq_quiesce(). Problem spotted by matthew@.
ok matthew@, thib@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
between calls to bufq_enqueue and bufq_done calls, but bufq_requeue
can be called multiple times on an io in between the enqueue and
done. if you keep incrementing outstanding you'll never stop sleeping
for suspend.
bufq_requeue can be called via interrupts, so we cannot sleep
there.
the problems fixed by this diff were never hit cos the adapters
people are testing/running with do not cause bufq_requeue to be
called.
thanks to thib@ for helping me understand the code better
ok thib@ deraadt@ kettenis@ tedu@
|
| |
|
|
|
|
|
|
| |
immediately afterwards.
ok thib@, tedu@
|
|
|
|
| |
ok thib@
|
|
|
|
|
|
|
|
|
| |
and waits until all I/O currently on the queues has been completed. To get
I/O going again, call bufq_restart().
To be used for suspend/resume.
Joint effort with thib@, tedu@; tested by mlarkin@, marco@
|
| |
|
| |
|
|
|
|
| |
Pointed out by Jung <moorang at gmail dot com>
|
|
|
|
|
|
| |
conversion to bufq work. Taken from n2k10 scsi buf queueing code.
ok thib@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reintroduce bufqs. A few changes since it was backed out after some good
comments from dlg@.
No need for a separate bufq.h, keep all of in buf.h; As requested by kittens
and deraadt.
Only sd(4) and wd(4) for now. The rest of the drivers will be converted soon,
also other goodies like heuristics for sd(4) for selecting the bufq type and
the death of disksort() are forthcoming.
Tested on: i386, amd64, sparc64, macppc, loongson and alpha by myself and
phessler.
OK art@, beck@, kettenis@, oga@
|
|
|
|
|
|
| |
have been going on. this appears to bring us back to stable state.
lots of testing by oga and ariane and my self.
|
| |
|
|
one by tedu@. It doesn't do anything smart yet, it just uses
plain old disksort. we also keep the old method of queueing bufs
since some miods have crazy MD drivers that need some love.
ok beck@, art@
tested by many on many archs.
|