kernel_optimize_test/lib
Tom Herbert 75957ba36c dql: Dynamic queue limits
Implementation of dynamic queue limits (dql).  This is a libary which
allows a queue limit to be dynamically managed.  The goal of dql is
to set the queue limit, number of objects to the queue, to be minimized
without allowing the queue to be starved.

dql would be used with a queue which has these properties:

1) Objects are queued up to some limit which can be expressed as a
   count of objects.
2) Periodically a completion process executes which retires consumed
   objects.
3) Starvation occurs when limit has been reached, all queued data has
   actually been consumed but completion processing has not yet run,
   so queuing new data is blocked.
4) Minimizing the amount of queued data is desirable.

A canonical example of such a queue would be a NIC HW transmit queue.

The queue limit is dynamic, it will increase or decrease over time
depending on the workload.  The queue limit is recalculated each time
completion processing is done.  Increases occur when the queue is
starved and can exponentially increase over successive intervals.
Decreases occur when more data is being maintained in the queue than
needed to prevent starvation.  The number of extra objects, or "slack",
is measured over successive intervals, and to avoid hysteresis the
limit is only reduced by the miminum slack seen over a configurable
time period.

dql API provides routines to manage the queue:
- dql_init is called to intialize the dql structure
- dql_reset is called to reset dynamic values
- dql_queued called when objects are being enqueued
- dql_avail returns availability in the queue
- dql_completed is called when objects have be consumed in the queue

Configuration consists of:
- max_limit, maximum limit
- min_limit, minimum limit
- slack_hold_time, time to measure instances of slack before reducing
  queue limit

Signed-off-by: Tom Herbert <therbert@google.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-29 12:46:19 -05:00
..
lzo
raid6 md: Add in export.h for files using EXPORT_SYMBOL 2011-10-31 19:31:19 -04:00
reed_solomon
xz XZ: Fix incorrect XZ_BUF_ERROR 2011-09-21 13:39:59 -07:00
zlib_deflate
zlib_inflate
.gitignore
argv_split.c
atomic64_test.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
atomic64.c lib: atomic64: Change the type of local lock to raw_spinlock_t 2011-09-14 13:14:11 +02:00
audit.c
average.c
bcd.c
bch.c
bitmap.c lib/bitmap.c: quiet sparse noise about address space 2011-10-31 17:30:56 -07:00
bitrev.c
bsearch.c
btree.c
bug.c
bust_spinlocks.c
check_signature.c
checksum.c
cmdline.c
cordic.c
cpu_rmap.c
cpu-notifier-error-inject.c
cpumask.c cpumask: alloc_cpumask_var() use NUMA_NO_NODE 2011-07-26 16:49:44 -07:00
crc-ccitt.c
crc-itu-t.c
crc-t10dif.c
crc7.c
crc8.c
crc16.c
crc32.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
crc32defs.h
ctype.c
debug_locks.c
debugobjects.c
dec_and_lock.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
decompress_bunzip2.c
decompress_inflate.c
decompress_unlzma.c
decompress_unlzo.c
decompress_unxz.c
decompress.c
devres.c devres: fix possible use after free 2011-07-25 20:57:14 -07:00
div64.c
dma-debug.c lib: dma-debug needs export.h for EXPORT_SYMBOL 2011-10-31 19:32:23 -04:00
dump_stack.c
dynamic_debug.c Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2011-10-25 12:13:59 +02:00
dynamic_queue_limits.c dql: Dynamic queue limits 2011-11-29 12:46:19 -05:00
extable.c
fault-inject.c fault-inject: export setup_fault_attr() 2011-10-26 16:32:11 -04:00
find_last_bit.c
find_next_bit.c
flex_array.c
gcd.c
gen_crc32table.c
genalloc.c lib, Make gen_pool memory allocator lockless 2011-08-03 11:15:57 -04:00
halfmd4.c
hexdump.c lib: add error checking to hex2bin 2011-09-20 23:24:44 -04:00
hweight.c
idr.c ida: make ida_simple_get/put() IRQ safe 2011-11-02 16:07:00 -07:00
inflate.c
int_sqrt.c
iomap_copy.c
iomap.c
iommu-helper.c
ioremap.c
irq_regs.c
is_single_threaded.c
kasprintf.c
Kconfig dql: Dynamic queue limits 2011-11-29 12:46:19 -05:00
Kconfig.debug lib/Kconfig.debug: fix help message for DEFAULT_HUNG_TASK_TIMEOUT 2011-10-31 17:30:51 -07:00
Kconfig.kgdb
Kconfig.kmemcheck
klist.c
kobject_uevent.c kobj_uevent: Ignore if some listeners cannot handle message 2011-08-22 18:31:24 -07:00
kobject.c
kref.c
kstrtox.c lib/kstrtox: common code between kstrto*() and simple_strto*() functions 2011-10-31 17:30:56 -07:00
kstrtox.h lib/kstrtox: common code between kstrto*() and simple_strto*() functions 2011-10-31 17:30:56 -07:00
lcm.c lib/lcm.c: quiet sparse noise 2011-07-25 20:57:15 -07:00
libcrc32c.c
list_debug.c
list_sort.c
llist.c llist: Remove cpu_relax() usage in cmpxchg loops 2011-10-04 12:44:03 +02:00
locking-selftest-hardirq.h
locking-selftest-mutex.h
locking-selftest-rlock-hardirq.h
locking-selftest-rlock-softirq.h
locking-selftest-rlock.h
locking-selftest-rsem.h
locking-selftest-softirq.h
locking-selftest-spin-hardirq.h
locking-selftest-spin-softirq.h
locking-selftest-spin.h
locking-selftest-wlock-hardirq.h
locking-selftest-wlock-softirq.h
locking-selftest-wlock.h
locking-selftest-wsem.h
locking-selftest.c
lru_cache.c
Makefile dql: Dynamic queue limits 2011-11-29 12:46:19 -05:00
md5.c crypto: Move md5_transform to lib/md5.c 2011-08-06 18:32:45 -07:00
nlattr.c netlink: validate NLA_MSECS length 2011-11-04 17:47:34 -04:00
parser.c
percpu_counter.c lib/percpu_counter.c: enclose hotplug only variables in hotplug ifdef 2011-10-31 17:30:56 -07:00
plist.c
prio_heap.c
prio_tree.c
proportions.c locking, lib/proportions: Annotate prop_local_percpu::lock as raw 2011-09-13 11:11:50 +02:00
radix-tree.c radix_tree: clean away saw_unset_tag leftovers 2011-10-31 17:30:45 -07:00
random32.c
ratelimit.c locking, printk: Annotate logbuf_lock as raw 2011-09-13 11:11:54 +02:00
rational.c
rbtree.c
reciprocal_div.c
rwsem-spinlock.c locking, rwsem: Annotate inner lock as raw 2011-09-13 11:11:59 +02:00
rwsem.c locking, rwsem: Annotate inner lock as raw 2011-09-13 11:11:59 +02:00
scatterlist.c
sha1.c lib/sha1.c: quiet sparse noise about symbol not declared 2011-09-13 16:09:41 -07:00
show_mem.c
smp_processor_id.c sched: Wrap scheduler p->cpus_allowed access 2011-10-06 12:46:56 +02:00
sort.c
spinlock_debug.c lib/spinlock_debug.c: print owner on spinlock lockup 2011-10-31 17:30:56 -07:00
string_helpers.c
string.c lib/string.c: fix strim() semantics for strings that have only blanks 2011-10-31 17:30:56 -07:00
swiotlb.c
syscall.c
test-kstrtox.c
textsearch.c
timerqueue.c
ts_bm.c
ts_fsm.c
ts_kmp.c
uuid.c
vsprintf.c net: introduce and use netdev_features_t for device features sets 2011-11-16 17:43:10 -05:00