public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Rik van Riel <riel@redhat.com>
Cc: "J.C. Pizarro" <jcpiza@gmail.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: linux+glibc memory allocator, poor performance
Date: Wed, 12 Mar 2008 21:32:55 +0000	[thread overview]
Message-ID: <20080312213255.GM27894@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20080312172221.6b6dba95@bree.surriel.com>

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" <jcpiza@gmail.com> 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.

  reply	other threads:[~2008-03-12 21:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 20:09 linux+glibc memory allocator, poor performance J.C. Pizarro
2008-03-12 21:12 ` Al Viro
2008-03-13  5:57   ` David Newall
2008-03-13  6:12     ` Mike Galbraith
2008-03-13  6:22       ` David Newall
2008-03-13  7:38         ` Christoph Hellwig
2008-03-13 11:02           ` David Newall
2008-03-13  9:10         ` Pekka Enberg
2008-03-13 11:04           ` David Newall
2008-03-13 12:10           ` Alan Cox
2008-03-13 12:48             ` Pekka Enberg
2008-03-13 13:55               ` J.C. Pizarro
2008-03-13 19:40               ` David Newall
2008-03-13 20:05                 ` Pekka Enberg
2008-03-13 22:50                 ` Al Viro
2008-03-14 12:11                   ` Stephen Clark
2008-03-14  6:05               ` Willy Tarreau
2008-03-13 10:50     ` David Newall
2008-03-13 12:23   ` J.C. Pizarro
2008-03-12 21:22 ` Rik van Riel
2008-03-12 21:32   ` Al Viro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-03-12 18:14 Xose Vazquez Perez
2008-03-17 18:36 ` Xose Vazquez Perez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080312213255.GM27894@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=jcpiza@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox