[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0903060221500.25972@chino.kir.corp.google.com>
Date: Fri, 6 Mar 2009 02:27:25 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
cc: Ingo Molnar <mingo@...e.hu>,
"David S. Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org
Subject: Re: [patch 2/2] lockdep: initialize lockdep debugging statistics
On Fri, 6 Mar 2009, Peter Zijlstra wrote:
> > Peter, this is purely a matter of good software engineering practices.
>
> For complex types I would agree, but atomic_t is assumed to be just
> another int - just with special ops. For such things we can hold that
> memset('0') will properly initialize them to their 0 value.
>
That's the point about good software engineering practices: atomic_t
should not be assumed to be another int. If its implementation were ever
to change even for a single architecture, so would these variable
declarations.
> > I assume you wouldn't object to removing all such cases in the kernel.
> >
> > $ grep -r "atomic_t.*= ATOMIC_INIT(0)" * | wc -l
> > 104
>
> Only IFF all those cases are for static/global storage.
They are.
Anyway, I've already deferred to your maintainership of lockdep about not
wanting to initialize global atomics in this part of the kernel, so while
I disagree with it from a software engineering perspective, I think I'll
be able to move on.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists