From: Dipankar Sarma <dipankar@in.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@transmeta.com>,
davej@suse.de, Andrea Arcangeli <andrea@suse.de>,
Paul McKenney <paul.mckenney@us.ibm.com>
Subject: Re: [BKPATCH] Read-Copy Update 2.5
Date: Tue, 27 Aug 2002 11:41:52 +0530 [thread overview]
Message-ID: <20020827114152.A2072@in.ibm.com> (raw)
In-Reply-To: <20020826193708.0C64C2C07B@lists.samba.org>; from rusty@rustcorp.com.au on Tue, Aug 27, 2002 at 10:24:30AM +1000
Hi Rusty,
On Tue, Aug 27, 2002 at 10:24:30AM +1000, Rusty Russell wrote:
> In message <20020827022239.C31269@in.ibm.com> you write:
> > +static struct rcu_data rcu_data[NR_CPUS] __cacheline_aligned;
>
> Not "static DEFINE_PER_CPU(struct rcu_data, rcu_data)"?
Yes, I can use per-cpu data areas here. Done.
>
> > +/* Fake initialization to work around compiler breakage */
> > +DEFINE_PER_CPU(long, cpu_quiescent) = 0L;
>
> static? And I assume you're talking about the tendency for gcc 2.95
> to put uninitialized static vars in the bss, even if they are marked
> as having a section attribute? If so, you should say so.
>
> > +#ifdef CONFIG_PREEMPT
> > +/* Fake initialization to work around compiler breakage */
> > +DEFINE_PER_CPU(atomic_t[2], rcu_preempt_cntr) =
> > + {ATOMIC_INIT(0), ATOMIC_INIT(0)};
> > +DEFINE_PER_CPU(atomic_t, *curr_preempt_cntr) = NULL;
> > +DEFINE_PER_CPU(atomic_t, *next_preempt_cntr) = NULL;
>
> Also static I assume?
So, only statics are broken by gcc 2.95, right ? If so, then
the fake initializers aren't required. I got bitten by this in
another piece of RCU code where there was a static per-cpu
tasklet and I got paranoic after that.
>
> Other than that, it looks good. You should probably cc: Ingo Molnar
> as it touches the scheduler...
Ok, I will do that from now on. Thanks for the review.
I will have the new bits up as soon as I finish testing.
Thanks
--
Dipankar Sarma <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.
next prev parent reply other threads:[~2002-08-27 6:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-26 20:52 [BKPATCH] Read-Copy Update 2.5 Dipankar Sarma
2002-08-27 0:24 ` Rusty Russell
2002-08-27 6:11 ` Dipankar Sarma [this message]
2002-08-27 6:11 ` David S. Miller
2002-08-27 6:23 ` readsw/writesw readsl/writesl Andre Hedrick
2002-08-27 6:43 ` David S. Miller
2002-08-27 6:55 ` Andre Hedrick
2002-08-27 7:30 ` David S. Miller
2002-08-27 6:46 ` Benjamin Herrenschmidt
2002-08-27 6:49 ` Benjamin Herrenschmidt
2002-08-27 17:25 ` Alan Cox
2002-08-27 21:31 ` David S. Miller
2002-08-27 13:58 ` [BKPATCH] Read-Copy Update 2.5 Dipankar Sarma
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=20020827114152.A2072@in.ibm.com \
--to=dipankar@in.ibm.com \
--cc=andrea@suse.de \
--cc=davej@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.mckenney@us.ibm.com \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@transmeta.com \
/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