This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [libc-alpha] Re: horrible disk thorughput on itanium
- From: Andreas Jaeger <aj at suse dot de>
- To: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Cc: Linus Torvalds <torvalds at transmeta dot com>,<libc-alpha at sources dot redhat dot com>
- Date: Sat, 08 Dec 2001 08:38:42 +0100
- Subject: Re: [libc-alpha] Re: horrible disk thorughput on itanium
- References: <Pine.LNX.4.33.0112072137470.2640-100000@ashi.FootPrints.net>
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