From: Thomas Gleixner <tglx@linutronix.de>
To: Blaisorblade <blaisorblade@yahoo.it>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>,
user-mode-linux-devel@lists.sourceforge.net, domen@coderock.org,
amitg@calsoftinc.com, gud@eth.net
Subject: [uml-devel] Re: [patch 1/1] unified spinlock initialization arch/um/drivers/port_kern.c
Date: Thu, 10 Mar 2005 09:12:00 +0100 [thread overview]
Message-ID: <1110442320.29330.196.camel@tglx.tec.linutronix.de> (raw)
In-Reply-To: <200503092052.24803.blaisorblade@yahoo.it>
On Wed, 2005-03-09 at 20:52 +0100, Blaisorblade wrote:
> > Are you sure this is really the best option in this instance?
> > Sometimes, static data initialisation is more efficient than
> > code-based manual initialisation, especially when the memory
> > is written to anyway.
> Agreed, theoretically, but this was done for multiple reasons globally, for
> instance as a preparation to Ingo Molnar's preemption patches. There was
> mention of this on lwn.net about this:
>
> http://lwn.net/Articles/108719/
Those patches did only the conversion of
static spinlock_t lock = SPIN_LOCK_UNLOCKED;
lock = SPIN_LOCK_UNLOCKED;
to
static DEFINE_SPINLOCK(lock);
spin_lock_init(lock);
If you want to do static initialization inside of structures, then you
have to define a seperate MACRO similar to the static initialization of
list_head's inside of structures:
static struct sysfs_dirent sysfs_root = {
.s_sibling = LIST_HEAD_INIT(sysfs_root.s_sibling),
tglx
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2005-03-10 8:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-09 9:42 [uml-devel] [patch 1/1] unified spinlock initialization arch/um/drivers/port_kern.c blaisorblade
2005-03-09 17:12 ` [uml-devel] " Russell King
2005-03-09 19:52 ` Blaisorblade
2005-03-09 22:42 ` Russell King
2005-03-09 22:50 ` Andrew Morton
[not found] ` <Pine.LNX.4.61.0503091840210.22633@chaos.analogic.com>
2005-03-10 2:09 ` Zwane Mwaikambo
2005-03-10 8:12 ` Thomas Gleixner [this message]
2005-03-11 19:18 ` Blaisorblade
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=1110442320.29330.196.camel@tglx.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=akpm@osdl.org \
--cc=amitg@calsoftinc.com \
--cc=blaisorblade@yahoo.it \
--cc=domen@coderock.org \
--cc=gud@eth.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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