[libc-alpha] Re: horrible disk thorughput on itanium
Andreas Jaeger
aj@suse.de
Sat Dec 8 01:42:00 GMT 2001
Kaz Kylheku <kaz@ashi.footprints.net> writes:
> 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.
It could be - but then we would break lots of stuff (most people
forget about _REENTRANT) and every library has to be build with
_REENTRANT so that the library is thread-safe :-(
Andreas
> #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?
>
>
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Libc-alpha
mailing list