Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755270AbYCLVdQ (ORCPT ); Wed, 12 Mar 2008 17:33:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752450AbYCLVc6 (ORCPT ); Wed, 12 Mar 2008 17:32:58 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:41892 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752169AbYCLVc5 (ORCPT ); Wed, 12 Mar 2008 17:32:57 -0400 Date: Wed, 12 Mar 2008 21:32:55 +0000 From: Al Viro To: Rik van Riel Cc: "J.C. Pizarro" , LKML Subject: Re: linux+glibc memory allocator, poor performance Message-ID: <20080312213255.GM27894@ZenIV.linux.org.uk> References: <998d0e4a0803121309s125dddbao801e53e44296a4d6@mail.gmail.com> <20080312172221.6b6dba95@bree.surriel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080312172221.6b6dba95@bree.surriel.com> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1193 Lines: 26 On Wed, Mar 12, 2008 at 05:22:21PM -0400, Rik van Riel wrote: > On Wed, 12 Mar 2008 21:09:04 +0100 > "J.C. Pizarro" wrote: > > > Assume a SMP system that has 8 CPUs. The main problem of requesting > > pages is the BKL (Big Kernel Lock) in this SMP system used for mutual > > exclusion of the shared resource (the memory). > > > > To solve this major problem, i propose you freely to allocate 8 local caches > > of (e.g.) 2 MiB each CPU (total 2MiB x 8 CPUs = 16 MiB) acting as > > 8 producer buffers for globally many consumer tasks (e.g. >= 20). > > > > When the some producer buffer is empty then it does unfrequently BKL to > > allocate another 2 MiB more from the shared resource (the memory). > > You really should read the source code before proposing ideas. > > The kernel has done roughly what you describe since a little before > 2.6.0. ITYM a little before 2.4.0, and even prior to that it hadn't been under BKL. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/