Andrew Morton wrote: > Hannes Reinecke wrote: > >> Given enough processes in the waitqueue, the number of currently running >> processes effectively determines the number of processes to be started. >> And as those processes are already running, I don't see an effective >> procedure how we could _reduce_ the number of processes to be started. > > > By reducing the number of processes which can concurrently take the > semaphore? Confused. > Well, case in point: let's say we have khelper_max = 10, ten processes currently running, 15 processes in the waitqueue. How can I reduce the number of concurrently running processes? (Obviously not for the currently running processes, but for those in the waitqueue). If I were to use down() as per your suggestion, I would have to use another helper thread as down() will block. Otherwise I will block the calling function (e.g. sysctl). This just leads to added complexity; can't say I like it. But then, your call. If you say 'use semaphores' I will do it. Patch (for the semaphore version) is attached. Cheers, Hannes -- Dr. Hannes Reinecke hare@suse.de SuSE Linux AG S390 & zSeries Maxfeldstraße 5 +49 911 74053 688 90409 Nürnberg http://www.suse.de