[libc-alpha] Re: horrible disk thorughput on itanium

Kaz Kylheku kaz@ashi.footprints.net
Fri Dec 7 23:08:00 GMT 2001


On Fri, 7 Dec 2001, Andreas Jaeger wrote:

> >>Plain old Bonnie suffered from the same thing.  I long ago made it
> >>use putc_unlocked() here because throughput was horrible otherwise.

I'm a little drunk, so you should take this with a grain of salt.
Better yet, a ring of salt around your glass and a little umbrella.

In a single-threaded application, compiled without _REENTRANT, can't
putc() just be a *macro* in the header file that calls putc_unlocked()?
This solves the problem for newly recompiled code.

#ifdef __USE_REENTRANT
#define putc(_ch, _fp) _IO_putc(_ch, _fp)
#else
#define putc(_ch, _fp) _IO_putc_unlocked(_ch, _fp)
#endif

This could be done in addition to the fix you suggest, which helps
already compiled libc clients. Same for getc.

Or am I too wasted to see some obvious or not-so-obvious problem?



More information about the Libc-alpha mailing list