From: Zach Brown <zab@zabbo.net>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Kernel-janitors] serial.c cli() patch
Date: Fri, 27 Feb 2004 00:32:03 +0000 [thread overview]
Message-ID: <403E9003.8060900@zabbo.net> (raw)
In-Reply-To: <403D1CC3.6080906@chello.nl>
> So if I lock data I should use a lock for every single data variable
> which is at risk for a race condition. If I use a global one like I did
> here then all data structures are locked at once, which is not very good
> in a SMP system since an other processor could access an other data
> structure which now is also locked by the global lock.
> Am I right here?
Yeah, you have the idea. It's always a trade-off between complexity and
concurrency. It's good practice to only go down the complexity road
when it has been proven that concurrency is strongly desired.
I'm pretty sure that's why Matthew questioned the patch :) Code changes
are always risky, and simple replacing cli with _irqsave spinlocks
doesn't increase the concurrency and I strongly suspect that no one has
shown that concurrency matters in these crufty old paths.
- z
(too wordy? I'm new here.)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2004-02-27 0:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-25 22:08 [Kernel-janitors] serial.c cli() patch Debian User
2004-02-25 23:44 ` Debian User
2004-02-25 23:51 ` Debian User
2004-02-26 22:59 ` Zach Brown
2004-02-26 23:18 ` Matthew Wilcox
2004-02-27 0:32 ` Zach Brown [this message]
2004-02-27 15:17 ` Matthew Wilcox
2004-02-28 4:07 ` Arnaldo Carvalho de Melo
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=403E9003.8060900@zabbo.net \
--to=zab@zabbo.net \
--cc=kernel-janitors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.