diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-03-09 09:18:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 19:38:26 -0400 |
commit | 4995f8ef9d3aac72745e12419d7fbaa8d01b1d81 (patch) | |
tree | 32b86d8b5f5ccba8f367d3e911ba3d1e19d73729 /include/linux/console.h | |
parent | ce21c7bcd796fc4f45d48781b7e85f493cc55ee5 (diff) |
vcs: hook sysfs devices into object lifetime instead of "binding"
During bootup performance tracing I noticed many occurrences of
vca* device creation and removal, leading to the usual userspace
uevent processing, which are, in this case, rather pointless.
A simple test showing the kernel timing (not including all the
work userspace has to do), gives us these numbers:
$ time for i in `seq 1000`; do echo a > /dev/tty2; done
real 0m1.142s
user 0m0.015s
sys 0m0.540s
If we move the hook for the vcs* driver core devices from the
tty "binding" to the vc allocation/deallocation, which is what
the vcs* devices represent, we get the following numbers:
$ time for i in `seq 1000`; do echo a > /dev/tty2; done
real 0m0.152s
user 0m0.030s
sys 0m0.072s
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/console.h')
-rw-r--r-- | include/linux/console.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/console.h b/include/linux/console.h index a67a90cf826..dcca5339ceb 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -137,8 +137,8 @@ extern void resume_console(void); | |||
137 | int mda_console_init(void); | 137 | int mda_console_init(void); |
138 | void prom_con_init(void); | 138 | void prom_con_init(void); |
139 | 139 | ||
140 | void vcs_make_sysfs(struct tty_struct *tty); | 140 | void vcs_make_sysfs(int index); |
141 | void vcs_remove_sysfs(struct tty_struct *tty); | 141 | void vcs_remove_sysfs(int index); |
142 | 142 | ||
143 | /* Some debug stub to catch some of the obvious races in the VT code */ | 143 | /* Some debug stub to catch some of the obvious races in the VT code */ |
144 | #if 1 | 144 | #if 1 |