From: Ingo Molnar <mingo@elte.hu>
To: mika.penttila@kolumbus.fi
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch] voluntary-preempt-2.6.9-rc1-bk4-Q8
Date: Thu, 2 Sep 2004 10:32:05 +0200 [thread overview]
Message-ID: <20040902083205.GA22416@elte.hu> (raw)
In-Reply-To: <20040902075712.DGPM28426.fep02-app.kolumbus.fi@mta.imail.kolumbus.fi>
* mika.penttila@kolumbus.fi <mika.penttila@kolumbus.fi> wrote:
> Ingo,
>
> I think there might be a problem with voluntary-preempt's hadling of
> softirqs. Namely, in cond_resched_softirq(), you do
> __local_bh_enable() and local_bh_disable(). But it may be the case
> that the softirq is handled from ksoftirqd, and then the preempt_count
> isn't elevated with SOFTIRQ_OFFSET (only PF_SOFTIRQ is set). So the
> __local_bh_enable() actually makes preempt_count negative, which might
> have bad effects. Or am I missing something?
you are right. Fortunately the main use of cond_resched_softirq() is via
cond_resched_all() - which is safe because it uses softirq_count(). But
the kernel/timer.c explicit call to cond_resched_softirq() is unsafe.
I've fixed this in my tree and i've added an assert to catch the
underflow when it happens.
Ingo
next prev parent reply other threads:[~2004-09-02 8:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-02 7:57 [patch] voluntary-preempt-2.6.9-rc1-bk4-Q8 mika.penttila
2004-09-02 8:32 ` Ingo Molnar [this message]
2004-09-02 9:06 ` Peter Zijlstra
-- strict thread matches above, loose matches on Subject: below --
2004-08-30 19:13 [patch] voluntary-preempt-2.6.9-rc1-bk4-Q5 Mark_H_Johnson
2004-09-02 6:33 ` Ingo Molnar
2004-09-02 6:55 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-Q8 Ingo Molnar
2004-09-02 7:04 ` Lee Revell
2004-09-02 7:15 ` Ingo Molnar
2004-09-02 7:31 ` Lee Revell
2004-09-02 7:46 ` Ingo Molnar
2004-09-03 1:10 ` Rusty Russell
2004-09-02 23:25 ` Lee Revell
2004-09-02 23:28 ` Ingo Molnar
2004-09-02 23:32 ` Lee Revell
2004-09-02 7:17 ` Ingo Molnar
2004-09-02 8:23 ` Ingo Molnar
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=20040902083205.GA22416@elte.hu \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.penttila@kolumbus.fi \
/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