Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1593284 > unrolled thread
| Started by | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| First post | 2017-03-06 13:50 +0100 |
| Last post | 2017-03-06 13:50 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RFC][PATCH 4/4] printk: enable printk offloading Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-03-06 13:50 +0100
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Date | 2017-03-06 13:50 +0100 |
| Subject | [RFC][PATCH 4/4] printk: enable printk offloading |
| Message-ID | <ti0fn-8f0-13@gated-at.bofh.it> |
Initialize the kernel printing thread and enable printk()
offloading.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
kernel/printk/printk.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 6e00073a7331..601a9ef6db89 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2779,6 +2779,25 @@ static int printk_kthread_func(void *data)
return 0;
}
+/*
+ * Init printk kthread at late_initcall stage, after core/arch/device/etc.
+ * initialization.
+ */
+static int __init init_printk_kthread(void)
+{
+ struct task_struct *thread;
+
+ thread = kthread_run(printk_kthread_func, NULL, "printk");
+ if (IS_ERR(thread)) {
+ pr_err("printk: unable to create printing thread\n");
+ return PTR_ERR(thread);
+ }
+
+ printk_kthread = thread;
+ return 0;
+}
+late_initcall(init_printk_kthread);
+
void wake_up_klogd(void)
{
preempt_disable();
--
2.12.0
Back to top | Article view | linux.kernel
csiph-web