From: Alexey Dobriyan Date: Tue, 10 Apr 2018 23:32:01 +0000 (-0700) Subject: proc: faster /proc/cmdline X-Git-Tag: v4.17-rc1~52^2~68 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=58c501aab3e54b99eac632a2f5ab5f53e0c27948;p=uclinux-h8%2Flinux.git proc: faster /proc/cmdline Use seq_puts() and skip format string processing. Link: http://lkml.kernel.org/r/20180309222948.GB3843@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c index 403cbb12a6e9..8233e7af9389 100644 --- a/fs/proc/cmdline.c +++ b/fs/proc/cmdline.c @@ -6,7 +6,8 @@ static int cmdline_proc_show(struct seq_file *m, void *v) { - seq_printf(m, "%s\n", saved_command_line); + seq_puts(m, saved_command_line); + seq_putc(m, '\n'); return 0; }