All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, arnd@arndb.de, akpm@linux-foundation.org,
	Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 3/4] SCHED: Don't use BKL count for idle preempt count initialization
Date: Fri,  6 May 2011 14:05:27 -0700	[thread overview]
Message-ID: <1304715928-19266-4-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1304715928-19266-1-git-send-email-andi@firstfloor.org>

From: Andi Kleen <ak@linux.intel.com>

No need for that ever as far as I can see. Just set it to 0.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 kernel/sched.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 7fa5334..f70b2cc 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5776,11 +5776,8 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
 	raw_spin_unlock_irqrestore(&rq->lock, flags);
 
 	/* Set the preempt count _outside_ the spinlocks! */
-#if defined(CONFIG_PREEMPT)
-	task_thread_info(idle)->preempt_count = (idle->lock_depth >= 0);
-#else
 	task_thread_info(idle)->preempt_count = 0;
-#endif
+
 	/*
 	 * The idle tasks have their own, simple scheduling class:
 	 */
-- 
1.7.4.4


  parent reply	other threads:[~2011-05-06 21:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 21:05 Remove last BKL leftover: lock_depth Andi Kleen
2011-05-06 21:05 ` [PATCH 1/4] BKL: Remove BKL references in mutex code Andi Kleen
2011-05-06 21:05 ` [PATCH 2/4] SCHED: Remove BKL accounting from schedstats Andi Kleen
2011-05-07  8:16   ` Ingo Molnar
2011-05-06 21:05 ` Andi Kleen [this message]
2011-05-06 21:05 ` [PATCH 4/4] Remove last BKL leftover: lock_depth Andi Kleen
2011-05-06 21:11 ` Andrew Morton
2011-05-06 21:19   ` Andi Kleen

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=1304715928-19266-4-git-send-email-andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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.