From: Debian User <h.vanberkum@chello.nl>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Kernel-janitors] serial.c cli() patch
Date: Wed, 25 Feb 2004 23:51:20 +0000 [thread overview]
Message-ID: <403D34F8.7040809@chello.nl> (raw)
In-Reply-To: <403D1CC3.6080906@chello.nl>
Zach Brown wrote:
> Sometimes it makes more sense to think of the locking as protecting data
> instead of paths through code that uses the data. This can get very
> complicated depending on the access patterns, of course, but it's a good
> way to approach the problem.
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?
Richard
_______________________________________________
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-25 23:51 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 [this message]
2004-02-26 22:59 ` Zach Brown
2004-02-26 23:18 ` Matthew Wilcox
2004-02-27 0:32 ` Zach Brown
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=403D34F8.7040809@chello.nl \
--to=h.vanberkum@chello.nl \
--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.