diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-08-05 03:07:21 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-09-11 08:33:31 -0400 |
commit | 5e605b64a183a6c0e84cdb99a6f8acb1f8200437 (patch) | |
tree | 1133a343bea602cb1bd8ee744c5997ce42a69b54 /kernel/sysctl.c | |
parent | fb1e75389bd06fd5987e9cda1b4e0305c782f854 (diff) |
block: add blk-iopoll, a NAPI like approach for block devices
This borrows some code from NAPI and implements a polled completion
mode for block devices. The idea is the same as NAPI - instead of
doing the command completion when the irq occurs, schedule a dedicated
softirq in the hopes that we will complete more IO when the iopoll
handler is invoked. Devices have a budget of commands assigned, and will
stay in polled mode as long as they continue to consume their budget
from the iopoll softirq handler. If they do not, the device is set back
to interrupt completion mode.
This patch holds the core bits for blk-iopoll, device driver support
sold separately.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 58be76017fd0..0ed9fa6f322e 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -92,6 +92,7 @@ extern int sysctl_nr_trim_pages; | |||
92 | #ifdef CONFIG_RCU_TORTURE_TEST | 92 | #ifdef CONFIG_RCU_TORTURE_TEST |
93 | extern int rcutorture_runnable; | 93 | extern int rcutorture_runnable; |
94 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 94 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ |
95 | extern int blk_iopoll_enabled; | ||
95 | 96 | ||
96 | /* Constants used for minimum and maximum */ | 97 | /* Constants used for minimum and maximum */ |
97 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 98 | #ifdef CONFIG_DETECT_SOFTLOCKUP |
@@ -990,7 +991,14 @@ static struct ctl_table kern_table[] = { | |||
990 | .proc_handler = &proc_dointvec, | 991 | .proc_handler = &proc_dointvec, |
991 | }, | 992 | }, |
992 | #endif | 993 | #endif |
993 | 994 | { | |
995 | .ctl_name = CTL_UNNUMBERED, | ||
996 | .procname = "blk_iopoll", | ||
997 | .data = &blk_iopoll_enabled, | ||
998 | .maxlen = sizeof(int), | ||
999 | .mode = 0644, | ||
1000 | .proc_handler = &proc_dointvec, | ||
1001 | }, | ||
994 | /* | 1002 | /* |
995 | * NOTE: do not add new entries to this table unless you have read | 1003 | * NOTE: do not add new entries to this table unless you have read |
996 | * Documentation/sysctl/ctl_unnumbered.txt | 1004 | * Documentation/sysctl/ctl_unnumbered.txt |