Re: horrible disk thorughput on itanium

Linus Torvalds
2001-12-07T17:50:58Z

On 7 Dec 2001, Andi Kleen wrote:
> torvalds@transmeta.com (Linus Torvalds) writes:
> >
> > "putc()" is a standard function. If it sucks, let's get it fixed. And
> > instead of changing bonnie, how about pinging the _real_ people who
> > write sucky code?
>
> It is easy to fix. Just do #define putc putc_unlocked

Sure. And why don't you also do

#define sin(x) (1)
#define sqrt(x) (1)
#define strlen(x) (1)
...

to make other benchmarks happier?

bonnie is a _benchmark_. It's meant for finding bad performance. Changing
it to make it work better when performance is bad is _pointless_. You've
now made the whole point of bonnie go away.

> There is just a slight problem: it'll fail if your application is threaded
> and wants to use the same FILE from multiple threads.
>
> It is a common problem on all OS that eventually got threadsafe stdio.

It's a common problem with bad programming.

You can be thread-safe without sucking dead baby donkeys through a straw.
I already mentioned two possible ways to fix it so that you have locking
when you need to, and no locking when you don't.

Linus