public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [announce, patch, RFC] "big IRQ lock" removal, IRQ cleanups.
Date: Sun, 21 Jul 2002 16:43:48 -0700	[thread overview]
Message-ID: <3D3B4734.244BBE2A@mvista.com> (raw)
In-Reply-To: 3D39A48C.C0863416@tv-sign.ru

Oleg Nesterov wrote:
> 
> Hello.
> 
> > - to remove the preemption count increase/decrease code from the lowlevel
> >   IRQ assembly code.

IMHO this is unwise as the system NEEDS to exit to user (or
system) space when preempt_count is zero with a garuntee
that TIF_NEED_RESCHED is 0.  To do this from irq.c means
that it must exit with interrupts off and the the low level
code needs to keep them off till the irtn.  But this is
where we test TIF_NEED_RESCHED, and if it is set, schedule()
is called and should be called with preempt_count != 0, to
avoid stack overflow interrupt loops.  And, schedule()
returns with the interrupt system on (even if we, unwisely,
call it with it off).  
> 
> So do_IRQ() can start with preempt_count == 0.
> Suppose another cpu sets TIF_NEED_RESCHED flag
> at the same time.
> 
> spin_lock(&desc->lock) sets preempt_count == 1.
> Before calling handle_IRQ_event() (which adds IRQ_OFFSET
> to preempt_count), do_IRQ() does spin_unlock(&desc->lock)
> and falls into schedule().
> 
> Am I missed something?

Nope, you got it right.
> 
> It seems to me that call to irq_enter() must be shifted
> from handle_IRQ_event() to do_IRQ().

Even then...
> 
> Oleg.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
George Anzinger   george@mvista.com
High-res-timers: 
http://sourceforge.net/projects/high-res-timers/
Real time sched:  http://sourceforge.net/projects/rtsched/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml

  reply	other threads:[~2002-07-21 23:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-20 17:57 [announce, patch, RFC] "big IRQ lock" removal, IRQ cleanups Oleg Nesterov
2002-07-21 23:43 ` george anzinger [this message]
2002-07-21 23:50   ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2002-07-20 20:54 Ingo Molnar
2002-07-19 21:49 ` george anzinger
2002-07-20 14:25 ` Marcin Dalecki
2002-07-21 21:17   ` Ingo Molnar
2002-07-20 20:57 ` Ingo Molnar
2002-07-22 14:45 Oleg Nesterov
2002-07-22 18:03 ` george anzinger
2002-07-22 18:04   ` 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=3D3B4734.244BBE2A@mvista.com \
    --to=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@tv-sign.ru \
    /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