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: Kaz Kylheku <kaz at ashi dot footprints dot net>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: Linus Torvalds <torvalds at transmeta dot com>, <libc-alpha at sources dot redhat dot com>
- Date: Fri, 7 Dec 2001 21:51:56 -0800 (PST)
- Subject: Re: [libc-alpha] Re: horrible disk thorughput on itanium
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?