Commit Graph

25 Commits

Author SHA1 Message Date
pgoyette
f48fa2dcc1 By popular request, don't bother initializing a static pointer to NULL. 2016-11-18 02:37:33 +00:00
pgoyette
fdd49fc76c Use compile-time initialization for the list head, and make sure that
the sysctllog is also initialized before being used.
2016-11-17 08:06:49 +00:00
pgoyette
219154eeef Define a new module class for the bufq_strategy modules. These need to
be loaded and intialized before autoconfigure runs, since some devices
(like disks and floppy drives) want to call bufq_alloc().
2016-11-16 10:42:14 +00:00
pgoyette
556c690963 Modularize the various bufq strategies 2016-11-16 00:46:46 +00:00
pooka
4f6fb3bf35 Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
2014-02-25 18:30:08 +00:00
pooka
26e4989d18 Provide unwind log for bufq sysctls, since (theoretically) bufq might
not be initialized during kernel bootstrap and therefore "permanent"
nodes can be created only with an unwind log.
2009-09-17 09:54:27 +00:00
pooka
11281f01a0 Replace a large number of link set based sysctl node creations with
calls from subsystem constructors.  Benefits both future kernel
modules and rump.

no change to sysctl nodes on i386/MONOLITHIC & build tested i386/ALL
2009-09-16 15:23:04 +00:00
yamt
3e196b68ff malloc -> kmem_alloc 2009-01-19 14:54:28 +00:00
yamt
b9b9c67db2 bufq_cancel: KNF. 2009-01-15 16:11:19 +00:00
yamt
70de973662 g/c BUFQ_FOO() macros and use bufq_foo() directly. 2009-01-13 13:33:58 +00:00
reinoud
5fc434dc18 Add a BUFQ_CANCEL() next to BUFQ_PUT() and BUFQ_GET().
BUFQ_CANCEL(queue, element) removes the specified element previously queued
on the queue. It returns NULL if it was not found on the queue and the
element if it was successfully removed.

Run trough tech-kern and changed name from BUFQ_REVOKE() by suggestion of
Jason Thorpe.
2008-04-30 12:09:02 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad
66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +00:00
yamt
9297401d54 - add ioctls to set/get disk bufq strategy.
- implement them for some drivers.
2005-12-26 10:36:47 +00:00
yamt
f9b53cfa6f bufq_alloc: return correct errors rather than 0. 2005-12-26 10:00:34 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt
450531ecb3 bufq_alloc: fix BUFQ_STRAT_ANY. pointed by Juan RP. 2005-10-17 12:28:21 +00:00
yamt
e7bb12271d sysctl_kern_bufq_strategies:
- handle too small buffer.
- handle the case that no bufq is configured.
2005-10-17 12:25:15 +00:00
yamt
d6c1668a16 sysctl_kern_bufq_strategies:
- don't assign size_t value to error number.
- remove an unnecessary assignment.
2005-10-16 08:30:37 +00:00
yamt
707ea62186 sysctl_kern_bufq_strategies: skip a dummy strategy correctly. 2005-10-16 08:27:51 +00:00
yamt
9f4759ccce add some bufq helper functions.
#if 0'ed out as there is no user currently.
2005-10-16 02:02:23 +00:00
yamt
4c9b2e4a8f whitespace. 2005-10-16 00:30:03 +00:00
yamt
834e69f6e0 fix rcsid. 2005-10-16 00:28:32 +00:00
xtraeme
40b7fffb63 Add a sysctl function that will print all buffer queue strategies
built in the kernel:

$ sysctl kern.bufq.strategies
kern.bufq.strategies = disksort fcfs priocscan readprio
$
2005-10-15 22:36:18 +00:00
yamt
aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00