Skip to contentSkip to conversation

horrible disk thorughput on itanium

DISCUSSION Dan Kegel 1 participant 1 message Dec 7, 2001

lore
Share & tools
lore

Dan Kegel

author
#0 lore raw
Quoted 7 lines · Linus
Quoted 4 lines
Quoted 1 line

As far as I can see bonnie++ doesn't use putc_unlocked, but putc.

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

Oh, yeah, blame it on bonnie.

Quoted 7 lines

"Our C library 'putc' is horribly sucky"

"Well, then, use something else then".

Isn't somebody ashamed of glibc and willing to try to fix it? It might be as simple as just testing a static flag "have I used pthread_create" or even a function pointer that gets switched around at pthread_create..

That sounds racy. Better to make the change at compile time, maybe? Say,

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

That's pedantically safe, I think.

- Dan