lkml.org 
[lkml]   [1998]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.1.114 fails build on i386


On Tue, 4 Aug 1998, Horst von Brand wrote:

> Linus Torvalds <torvalds@transmeta.com> said:
> >
> > It fixes the problem at a negligible cost in size, but I much prefer
> > losing a few bytes of memory than to have different code for SMP or not
> > SMP.
>
> What's wrong with placing the offending empty structure at the end again,
> like I proposed earlier?

It's simply conceptually wrong. The ugly hack was ugly, but more
importantly it was unmaintainable, as shown by the fact that I didn't even
notice that I broke it. I don't want those kinds of hacks into the kernel.

The other reason is that it's not at all clear that a unlocked spinlock
has to be all zeroes, which is what leaving it at the end will do. In
particular, imagine that you have a spinlock debugging patch that works on
UP too, and depends on some internal lock entry being set up to something
else than zero. BOOM.

In short, it's a fragile solution. Adding a dummy entry fixes the problem
at the heart of the thing, which is that gcc has a bug when it comes to
empty initializers. As such, there's no way that can break by mistake like
the old hack did.

For me, robustness and clarity of sources is at least as important as
performance. I have to maintain the thing, while most other people don't
care at all.

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:3.122 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site