Re: sched_yield() makes OpenLDAP slow

From: Andi Kleen
Date: Mon Aug 22 2005 - 16:42:16 EST


> processes (PTHREAD_SCOPE_SYSTEM). The previous comment about slapd only
> needing to yield within a single process is inaccurate; since we allow
> slapcat to run concurrently with slapd (to allow hot backups) we need
> BerkeleyDB's locking/yield functions to work in System scope.

That's broken by design - it means you can be arbitarily starved
by other processes running in parallel. You are basically assuming
your application is the only thing running on the system
which is wrong. Also there are enough synchronization primitives
that can synchronize multiple processes without making
such broken assumptions.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/