From: Anton Blanchard <anton@linuxcare.com.au>
To: Florian Lohoff <flo@rfc822.org>
Cc: linux-irda@PASTA.cs.uit.no, mzyngier@freesurf.fr,
linux-kernel@vger.kernel.org
Subject: Re: [Linux-IrDA]Re: [IrDA+SMP] Lockup in handle_IRQ_event
Date: Thu, 4 Jan 2001 23:04:16 +1100 [thread overview]
Message-ID: <20010104230416.D13759@linuxcare.com> (raw)
In-Reply-To: <wrpzoh89t1c.fsf@hina.wild-wind.fr.eu.org> <3A53B356.32353C01@uow.edu.au> <20010104115159.D7660@paradigm.rfc822.org>
In-Reply-To: <20010104115159.D7660@paradigm.rfc822.org>; from flo@rfc822.org on Thu, Jan 04, 2001 at 11:51:59AM +0100
> BTW: What i have seen in the ircomm_tty.c (2.2.18):
>
> 647 save_flags(flags);
> 648 cli();
> 649
> 650 skb = self->tx_skb;
> 651 self->tx_skb = NULL;
> 652
> 653 restore_flags(flags);
>
> and a lot of other places simply use "save_flags(flags); cli();
> restore_flags()". Can someone enlighten me how this is supposed to work
> on SMP machines ? AFAIK "cli()" only disables IRQs on the local
> CPU so a different CPU could easily stumple half way as this
> is definitly non atomic. Or is the tty layer protected by some
> "big tty lock" ?
On SMP __cli() disables interrupts on the local cpu, cli() also grabs
the global irq lock which serialises irqs between cpus.
Using a spinlock is much preferred if possible as grabbing the global
irq lock is expensive (and in most cases unnecessary).
Anton
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-04 12:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-03 22:20 Marc ZYNGIER
2001-01-03 23:18 ` Andrew Morton
2001-01-04 9:58 ` Marc ZYNGIER
2001-01-04 13:22 ` Andrew Morton
2001-01-04 14:13 ` [PATCH] " Marc ZYNGIER
2001-01-04 10:51 ` [Linux-IrDA]Re: " Florian Lohoff
2001-01-04 12:04 ` Anton Blanchard [this message]
2001-01-04 12:06 ` Keith Owens
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=20010104230416.D13759@linuxcare.com \
--to=anton@linuxcare.com.au \
--cc=flo@rfc822.org \
--cc=linux-irda@PASTA.cs.uit.no \
--cc=linux-kernel@vger.kernel.org \
--cc=mzyngier@freesurf.fr \
/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
Powered by JetHome