All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: Arjan van de Ven <arjan@infradead.org>,
	torvalds@linux-foundation.org, akpm@linux-foundation.org
Subject: [PATCH 7/7] async: don't do the initcall stuff post boot
Date: Wed, 7 Jan 2009 15:15:22 -0800	[thread overview]
Message-ID: <20090107151522.6850faf7@infradead.org> (raw)
In-Reply-To: <20090107151151.458333c1@infradead.org>

>From ad160d23198193135cb2bcc75222e0816b5838c0 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Wed, 7 Jan 2009 09:28:53 -0800
Subject: [PATCH] async: don't do the initcall stuff post boot

while tracking the asynchronous calls during boot using the initcall_debug
convention is useful, doing it once the kernel is done is actually
bad now that we use asynchronous operations post boot as well...

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
 kernel/async.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/async.c b/kernel/async.c
index afaa8a6..9737338 100644
--- a/kernel/async.c
+++ b/kernel/async.c
@@ -124,12 +124,12 @@ static void run_one_entry(void)
 	spin_unlock_irqrestore(&async_lock, flags);
 
 	/* 3) run it (and print duration)*/
-	if (initcall_debug) {
+	if (initcall_debug && system_state == SYSTEM_BOOTING) {
 		printk("calling  %lli_%pF @ %i\n", entry->cookie, entry->func, task_pid_nr(current));
 		calltime = ktime_get();
 	}
 	entry->func(entry->data, entry->cookie);
-	if (initcall_debug) {
+	if (initcall_debug && system_state == SYSTEM_BOOTING) {
 		rettime = ktime_get();
 		delta = ktime_sub(rettime, calltime);
 		printk("initcall %lli_%pF returned 0 after %lld usecs\n", entry->cookie,
@@ -220,14 +220,14 @@ void async_synchronize_cookie_special(async_cookie_t cookie, struct list_head *r
 {
 	ktime_t starttime, delta, endtime;
 
-	if (initcall_debug) {
+	if (initcall_debug && system_state == SYSTEM_BOOTING) {
 		printk("async_waiting @ %i\n", task_pid_nr(current));
 		starttime = ktime_get();
 	}
 
 	wait_event(async_done, __lowest_in_progress(running) >= cookie);
 
-	if (initcall_debug) {
+	if (initcall_debug && system_state == SYSTEM_BOOTING) {
 		endtime = ktime_get();
 		delta = ktime_sub(endtime, starttime);
 
-- 
1.6.0.6



-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

  parent reply	other threads:[~2009-01-07 23:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 23:11 [PATCH 0/7] V3 of the async function call patches Arjan van de Ven
2009-01-07 23:12 ` [PATCH 1/7] async: Asynchronous function calls to speed up kernel boot Arjan van de Ven
2009-01-08  0:31   ` Arnaldo Carvalho de Melo
2009-01-08  1:17     ` Arjan van de Ven
2009-01-13 20:48   ` Jonathan Corbet
2009-01-14 11:34     ` Cornelia Huck
2009-02-14  0:22   ` Andrew Morton
2009-02-14  4:59     ` Arjan van de Ven
2009-02-14  7:29       ` Andrew Morton
2009-02-15 19:16         ` Arjan van de Ven
2009-02-15 22:19           ` Arjan van de Ven
2009-02-16 10:31           ` Cornelia Huck
2009-01-07 23:12 ` [PATCH 2/7] fastboot: make scsi probes asynchronous Arjan van de Ven
2009-01-07 23:13 ` [PATCH 3/7] fastboot: make the libata port scan asynchronous Arjan van de Ven
2009-01-07 23:13 ` [PATCH 4/7] fastboot: Make libata initialization even more async Arjan van de Ven
2009-01-07 23:14 ` [PATCH 5/7] async: make the final inode deletion an asynchronous event Arjan van de Ven
2009-01-07 23:14 ` [PATCH 6/7] bootchart: improve output based on Dave Jones' feedback Arjan van de Ven
2009-01-07 23:15 ` Arjan van de Ven [this message]
2009-01-08  0:17 ` [PATCH 0/7] V3 of the async function call patches Linus Torvalds
2009-01-08  1:21   ` Arjan van de Ven
2009-01-15  8:10     ` Pavel Machek
2009-01-09 20:21 ` Ryan Hope

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090107151522.6850faf7@infradead.org \
    --to=arjan@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.