LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Davide Libenzi <davidel@xmailserver.org>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
rmk+lkml@arm.linux.org.uk
Subject: Re: scheduler: IRQs disabled over context switches
Date: Mon, 24 May 2004 17:10:48 +1000 [thread overview]
Message-ID: <40B19FF8.2050402@yahoo.com.au> (raw)
In-Reply-To: <20040524090538.GA26183@elte.hu>
Ingo Molnar wrote:
> * Davide Libenzi <davidel@xmailserver.org> wrote:
>
>
>>We used to do it in 2.4. What changed to make it fragile? The
>>threading (TLS) thing?
>
>
> it _should_ work, but in the past we only had trouble from such changes
> (at least in the O(1) tree of scheduling - 2.4 scheduler is OK.). We
> could try the patch below. It certainly boots on SMP x86. But it causes
> a 3.5% slowdown in lat_ctx so i'd not do it unless there are some really
> good reasons.
>
> Ingo
>
> --- linux/kernel/sched.c.orig
> +++ linux/kernel/sched.c
> @@ -247,9 +247,15 @@ static DEFINE_PER_CPU(struct runqueue, r
> * Default context-switch locking:
> */
> #ifndef prepare_arch_switch
> -# define prepare_arch_switch(rq, next) do { } while (0)
> -# define finish_arch_switch(rq, next) spin_unlock_irq(&(rq)->lock)
> -# define task_running(rq, p) ((rq)->curr == (p))
> +# define prepare_arch_switch(rq, next) \
> + do { \
> + spin_lock(&(next)->switch_lock); \
> + spin_unlock(&(rq)->lock); \
spin_unlock_irq?
next prev parent reply other threads:[~2004-05-24 7:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-23 16:43 Russell King
2004-05-23 18:59 ` Davide Libenzi
2004-05-23 19:38 ` Russell King
2004-05-23 23:04 ` Davide Libenzi
2004-05-23 23:33 ` Russell King
2004-05-24 0:27 ` Davide Libenzi
2004-05-24 8:37 ` Ingo Molnar
2004-05-24 6:41 ` Davide Libenzi
2004-05-24 9:05 ` Ingo Molnar
2004-05-24 7:10 ` Nick Piggin [this message]
2004-05-24 9:15 ` Ingo Molnar
2004-05-24 17:16 ` Davide Libenzi
2004-05-24 17:46 ` Davide Libenzi
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=40B19FF8.2050402@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rmk+lkml@arm.linux.org.uk \
--subject='Re: scheduler: IRQs disabled over context switches' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).