lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <49C9F416.1050707@cn.fujitsu.com>
Date:	Wed, 25 Mar 2009 17:06:30 +0800
From:	Lai Jiangshan <laijs@...fujitsu.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Paul Menage <menage@...gle.com>, miaoxie <miaox@...fujitsu.com>,
	Li Zefan <lizf@...fujitsu.com>, Ingo Molnar <mingo@...e.hu>,
	Steven Rostedt <srostedt@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] init,cpuset: fix initialize order


(After these two fixes applied:
[PATCH 1/2] trace_stat: keep original order
[PATCH 2/2] trace_workqueues: fix empty line's output
)
When I read /debugfs/tracing/trace_stat/workqueues,
and the I got this:

# CPU  INSERTED  EXECUTED   NAME
# |      |         |          |

  0      0          0       cpuset
  0    285        285       events/0
  0      2          2       work_on_cpu/0
  0   1115       1115       khelper
  0    325        325       kblockd/0
  0      0          0       kacpid
  0      0          0       kacpi_notify
  0      0          0       ata/0
  0      0          0       ata_aux
  0      0          0       ksuspend_usbd
  0      0          0       aio/0
  0      0          0       nfsiod
  0      0          0       kpsmoused
  0      0          0       kstriped
  0      0          0       kondemand/0
  0      1          1       hid_compat
  0      0          0       rpciod/0

  1     64         64       events/1
  1      2          2       work_on_cpu/1
  1      5          5       kblockd/1
  1      0          0       ata/1
  1      0          0       aio/1
  1      0          0       kondemand/1
  1      0          0       rpciod/1

I found "cpuset" is at the earliest.
---------

Subject: [PATCH] init,cpuset: fix initialize order

Impact: cpuset_wq should be initialized after init_workqueues()

I found a create_singlethread_workqueue() is earlier than
init_workqueues():

kernel_init()
->cpuset_init_smp()
  ->create_singlethread_workqueue()
->do_basic_setup()
  ->init_workqueues()

I think it's better that create_singlethread_workqueue() is called
after workqueue subsystem has been initialized.

Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
---
diff --git a/init/main.c b/init/main.c
index 1ce6931..91d5047 100644
--- a/init/main.c
+++ b/init/main.c
@@ -773,6 +773,7 @@ static void __init do_basic_setup(void)
 {
 	rcu_init_sched(); /* needed by module_init stage. */
 	init_workqueues();
+	cpuset_init_smp();
 	usermodehelper_init();
 	driver_init();
 	init_irq_proc();
@@ -869,8 +870,6 @@ static int __init kernel_init(void * unused)
 	smp_init();
 	sched_init_smp();
 
-	cpuset_init_smp();
-
 	do_basic_setup();
 
 	/*


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ