I've become aware of an issue where a multithreaded pike application on Linux causes very frequent context switches (around 17000 per second). It's about five threads that all do a lot of data structure manipulation in pike code.
What could be the cause of this? Is th_yield called way too often? Or is it possible that the thread lib is so stupid that it schedules all threads that hangs on the interpreter lock in round-robin fashion?