From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Date: Tue, 27 Jul 2004 07:24:09 +0000 Subject: Re: [PATCH] Limit number of concurrent hotplug processes Message-Id: <20040727002409.68d49d7c.akpm@osdl.org> List-Id: References: <40FD23A8.6090409@suse.de> <20040725182006.6c6a36df.akpm@osdl.org> <4104E421.8080700@suse.de> <20040726131807.47816576.akpm@osdl.org> <4105FE68.7040506@suse.de> In-Reply-To: <4105FE68.7040506@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Hannes Reinecke Cc: linux-hotplug-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Hannes Reinecke wrote: > > The problem (from my point of view) with semaphores is that we don't > have an direct counter of the number of processes waiting on that > semaphore to become free. We do have a counter for the number of > processes which are allowed to use the semaphore concurrently (namely > ->count), but the number of waiting processes must be gathered > indirectly by the number of entries in the waitqueue. Well one could add the number of sleepers to the semaphore, or write some function which counts the number of entries on the waitqueue or something. But the result of this query would be out-of-date as soon as the caller obtained it and massaging all architectures would be needed. I don't see why the "number of waiters" needs to be known for this problem. > 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. ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idG21&alloc_id040&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel