mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: mingo@redhat.com, dahlmann.thomas@arcor.de,
	LKML <linux-kernel@vger.kernel.org>,
	uclinux-dist-devel@blackfin.uclinux.org,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] Delete redundant IRQ_DISABLED check in irq_thread
Date: Sat, 18 Jul 2009 22:11:47 +0800	[thread overview]
Message-ID: <3c17e3570907180711i28a4a577wbc2437f22f913e2d@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0907181032210.11571@localhost.localdomain>

2009/7/18, Thomas Gleixner <tglx@linutronix.de>:
> On Sat, 18 Jul 2009, Barry Song wrote:
>> I guess people call disable_irq to disable the whole execution,
>> specially to disable the hardirq(then both top and bottom are
>> blocked). It's really strange the disable operation only blocks the
>> bottom-half.
>
> The disable blocks both. After the disable no hardirq comes in
> anymore.
>
I know disable_irq will block the future hardirq and bottom-half. Here
I means the current hardirq has been executed, but bottom-half will
not be executed because of the disable_irq. So the disable_irq only
blocks a half for the special case and the work of the current IRQ is
not finished fully in fact. But anyway, it should not cause trouble,
but just give the semantic of disable_irq a little confused.
Anyway, I agree it is not necessary to fulfill a complicated
check/sync for thread IRQ.

And thanks for your review and providing a good solution for my problem!

> The disabled check in the thread is just to take care of the case when
> the disable comes in between the hardirq and the thread handler.
>
> That way we avoid doing the full tracking of the hardirq / thread
> chain simply because it is complex and would produce significant
> overhead in the fast path for no gain. It could be done, but it's not
> worth the trouble.
>
> Thanks,
>
> 	tglx
>
>

Thanks,
Barry

  reply	other threads:[~2009-07-18 14:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17  8:43 Barry Song
2009-07-17 14:13 ` Thomas Gleixner
2009-07-17 14:58   ` Barry Song
2009-07-17 19:01     ` Thomas Gleixner
2009-07-17 23:26       ` Barry Song
2009-07-18  9:41         ` Thomas Gleixner
2009-07-18 14:11           ` Barry Song [this message]
2009-07-20  3:52       ` Barry Song
2009-07-20 10:09         ` Thomas Gleixner

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=3c17e3570907180711i28a4a577wbc2437f22f913e2d@mail.gmail.com \
    --to=21cnbao@gmail.com \
    --cc=dahlmann.thomas@arcor.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=uclinux-dist-devel@blackfin.uclinux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®