1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
Kirk McKusick e03486d198 This checkin reimplements the io-request priority hack in a way
that works in the new threaded kernel. It was commented out of
the disksort routine earlier this year for the reasons given in
kern/subr_disklabel.c (which is where this code used to reside
before it moved to kern/subr_disk.c):

----------------------------
revision 1.65
date: 2002/04/22 06:53:20;  author: phk;  state: Exp;  lines: +5 -0
Comment out Kirks io-request priority hack until we can do this in a
civilized way which doesn't cause grief.

The problem is that it is not generally safe to cast a "struct bio
*" to a "struct buf *".  Things like ccd, vinum, ata-raid and GEOM
constructs bio's which are not entrails of a struct buf.

Also, curthread may or may not have anything to do with the I/O request
at hand.

The correct solution can either be to tag struct bio's with a
priority derived from the requesting threads nice and have disksort
act on this field, this wouldn't address the "silly-seek syndrome"
where two equal processes bang the diskheads from one edge to the
other of the disk repeatedly.

Alternatively, and probably better: a sleep should be introduced
either at the time the I/O is requested or at the time it is completed
where we can be sure to sleep in the right thread.

The sleep also needs to be in constant timeunits, 1/hz can be practicaly
any sub-second size, at high HZ the current code practically doesn't
do anything.
----------------------------

As suggested in this comment, it is no longer located in the disk sort
routine, but rather now resides in spec_strategy where the disk operations
are being queued by the thread that is associated with the process that
is really requesting the I/O. At that point, the disk queues are not
visible, so the I/O for positively niced processes is always slowed
down whether or not there is other activity on the disk.

On the issue of scaling HZ, I believe that the current scheme is
better than using a fixed quantum of time. As machines and I/O
subsystems get faster, the resolution on the clock also rises.
So, ten years from now we will be slowing things down for shorter
periods of time, but the proportional effect on the system will
be about the same as it is today. So, I view this as a feature
rather than a drawback. Hence this patch sticks with using HZ.

Sponsored by:	DARPA & NAI Labs.
Reviewed by:	Poul-Henning Kamp <phk@critter.freebsd.dk>
2002-10-22 00:59:49 +00:00
bin Staticify for lint. 2002-10-18 14:48:48 +00:00
contrib A better version of disabling SGR support in grotty(1). 2002-10-21 12:29:57 +00:00
crypto Permit the argument to the -s option to be a hostname. I see no 2002-10-02 00:27:14 +00:00
etc Do not build the majority of the games. Remaining are the 2002-10-20 11:18:56 +00:00
games Remove old build glue for removed games. 2002-10-21 10:05:14 +00:00
gnu Add support for sparc64 kernel debugging. 2002-10-21 21:36:36 +00:00
include Install the include files in sys/dev/ofw. 2002-10-18 15:30:50 +00:00
kerberos5 Build kerberized versions of the PAM library, and install them 2002-10-11 14:17:09 +00:00
kerberosIV Remove programs that no longer need a kerberisation option. 2002-10-16 16:12:22 +00:00
lib Lobotomize MakeDev(), we don't need it with devfs. 2002-10-21 22:03:03 +00:00
libexec Change the symbol lookup order to search RTLD_GLOBAL objects 2002-10-19 23:03:35 +00:00
release Make floppy-making part of release.9 conditional on *BOOTSIZE 2002-10-21 14:21:08 +00:00
sbin Fix LSRR option length check: it has to be less or equal remained header's 2002-10-21 11:43:46 +00:00
secure Don't lint contrib'ed sources, even if the builder has asked for linting. 2002-09-25 09:58:00 +00:00
share Add mac(9), a man page providing a basic introduction to the concepts 2002-10-21 23:51:18 +00:00
sys This checkin reimplements the io-request priority hack in a way 2002-10-22 00:59:49 +00:00
tools Fix a bug that showed up when trying to produce a database for 2002-10-17 16:29:26 +00:00
usr.bin Use more verbose diagnostics for wrong DIGIT range 2002-10-20 23:09:26 +00:00
usr.sbin DEVFS has been nmountified, so use nmount(2) to mount it. 2002-10-21 21:41:19 +00:00
COPYRIGHT
MAINTAINERS Add myself as da(4) maintainer. This is mostly so I can review and commit 2002-10-18 18:27:56 +00:00
Makefile PC98 is not a true architecture, but a subarchitecture of i386, so we need 2002-10-02 13:52:36 +00:00
Makefile.inc1 Do not build the majority of the games. Remaining are the 2002-10-20 11:18:56 +00:00
Makefile.upgrade
README Fix broken handbook links. 2002-07-21 16:45:30 +00:00
UPDATING gcc 3.2 2002-09-03 06:13:43 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

kerberosIV	KerberosIV (eBones) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html