From: Peter Zijlstra <peterz@infradead.org>
To: Ken Chen <kenchen@google.com>, "Luck,Tony" <tony.luck@intel.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Ralf Baechle <ralf@linux-mips.org>,
David Miller <davem@davemloft.net>
Subject: [ia64] Question on __ARCH_WANT_UNLOCKED_CTXSW
Date: Wed, 24 Aug 2011 14:27:13 +0200 [thread overview]
Message-ID: <1314188833.6925.3.camel@twins> (raw)
Ken, Tony,
happen to remember what the perceived benefit of using
__ARCH_WANT_UNLOCKED_CTXSW was about?
---
commit f8efa27662532ad5adb2790bfc3f4c78e019cfad
Author: Chen, Kenneth W <kenneth.w.chen@intel.com>
Date: Thu Jan 26 18:24:59 2006 -0800
[IA64] remove staled comments in asm/system.h
With the recent optimization made to wrap_mmu_context function,
we don't hold tasklist_lock anymore when wrapping context id.
The comments in asm/system.h must fall through the crack earlier.
Remove staled comments.
I believe it is still beneficial to unlock the runqueue lock
across context switch. So leave __ARCH_WANT_UNLOCKED_CTXSW on.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h
index 80c5a23..0625387 100644
--- a/include/asm-ia64/system.h
+++ b/include/asm-ia64/system.h
@@ -249,32 +249,7 @@ extern void ia64_load_extra (struct task_struct *task);
# define switch_to(prev,next,last) __switch_to(prev, next, last)
#endif
-/*
- * On IA-64, we don't want to hold the runqueue's lock during the low-level context-switch,
- * because that could cause a deadlock. Here is an example by Erich Focht:
- *
- * Example:
- * CPU#0:
- * schedule()
- * -> spin_lock_irq(&rq->lock)
- * -> context_switch()
- * -> wrap_mmu_context()
- * -> read_lock(&tasklist_lock)
- *
- * CPU#1:
- * sys_wait4() or release_task() or forget_original_parent()
- * -> write_lock(&tasklist_lock)
- * -> do_notify_parent()
- * -> wake_up_parent()
- * -> try_to_wake_up()
- * -> spin_lock_irq(&parent_rq->lock)
- *
- * If the parent's rq happens to be on CPU#0, we'll wait for the rq->lock
- * of that CPU which will not be released, because there we wait for the
- * tasklist_lock to become available.
- */
#define __ARCH_WANT_UNLOCKED_CTXSW
-
#define ARCH_HAS_PREFETCH_SWITCH_STACK
#define ia64_platform_is(x) (strcmp(x, platform_name) == 0)
next reply other threads:[~2011-08-24 12:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 12:27 Peter Zijlstra [this message]
2011-08-24 16:51 ` [ia64] Question on __ARCH_WANT_UNLOCKED_CTXSW Ken Chen
2011-08-24 20:46 ` Luck, Tony
2011-09-13 18:59 ` Peter Zijlstra
2011-09-16 8:09 ` Paul Turner
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=1314188833.6925.3.camel@twins \
--to=peterz@infradead.org \
--cc=davem@davemloft.net \
--cc=kenchen@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=tony.luck@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox