Skip to contentSkip to conversation

proc: faster /proc/cmdline

PATCH New Alexey Dobriyan 1 participant 1 message Mar 9, 2018 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 proc: faster /proc/cmdline

Use seq_puts() and skip format string processing.

---

 fs/proc/cmdline.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/proc/cmdline.c +2 -1
@@ -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;
 }