From: Ravikiran G Thirumalai <kiran@in.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, manfred@colorfullife.com,
rusty@rustcorp.com.au, dipankar@in.ibm.com
Subject: Re: [patch] mm: Reimplementation of dynamic percpu memory allocator
Date: Mon, 17 Jan 2005 23:57:35 +0530 [thread overview]
Message-ID: <20050117182735.GA2322@impedimenta.in.ibm.com> (raw)
In-Reply-To: <20050114013425.77ad7c3f.akpm@osdl.org>
On Fri, Jan 14, 2005 at 01:34:25AM -0800, Andrew Morton wrote:
> Ravikiran G Thirumalai <kiran@in.ibm.com> wrote:
>
> > >
> > > Why cannot the code simply call vmalloc rather than copying its internals?
> >
> > Node local allocation. vmalloc cannot ensure pages for correspomding
> > cpus are node local. Also, design goal was to allocate pages for
> > cpu_possible cpus only. With plain vmalloc, we will end up allocating
> > pages for NR_CPUS.
>
> So... is it not possible to enhance vmalloc() for node-awareness, then
> just use it?
>
Memory for block management (free lists, bufctl lists) is also resident
in one block. A typical block in this allocator looks like this:
VMALLOC_ADDR PAGE_ADDR BLOCK
============ ========= ========
0xa0000 0x10100 ----------------- ^ ^
. | | | |
. | cpu 0 | PCPU_BLKSIZE |
| | | |
0xa0100 0x30100 ----------------- v |
| | |
| cpu 1 | |
| | |
0xa0200 - ----------------- NR_CPUS
| | |
| !cpu_possible | |
| | |
0xa0300 - ----------------- |
| | |
| !cpu_possible | |
| | |
0xa0400 0x10300 ----------------- ^ v
| | |
| Block mgmt |BLOCK_MANAGEMENT_SIZE
| | |
0xa05ff ----------------- v
This block is setup by valloc_percpu in the allocator code. There is lot
of allocator specific stuff like the PCPU_BLKSIZE, BLOCK_MANAGEMENT_SIZE
used here. I thought it was not appropriate to put them in vmalloc.c.
A common vmalloc_percpu which can take arguments for PCPU_BLKSIZE and
BLOCK_MANAGEMENT_SIZE is not useful anywhere else.
Changed patchset with other modifications suggested will follow.
Thanks,
Kiran
next prev parent reply other threads:[~2005-01-17 18:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-13 8:34 [patch] mm: Reimplementation of dynamic percpu memory allocator Ravikiran G Thirumalai
2005-01-13 8:57 ` Andrew Morton
2005-01-14 15:05 ` Ravikiran G Thirumalai
2005-01-14 9:34 ` Andrew Morton
2005-01-17 18:27 ` Ravikiran G Thirumalai [this message]
2005-01-17 22:11 ` Andrew Morton
2005-01-18 5:59 ` Ravikiran G Thirumalai
2005-01-14 2:24 ` Rusty Russell
2005-01-14 9:58 ` Ravikiran G Thirumalai
2005-01-14 10:41 ` Rusty Russell
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=20050117182735.GA2322@impedimenta.in.ibm.com \
--to=kiran@in.ibm.com \
--cc=akpm@osdl.org \
--cc=dipankar@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=rusty@rustcorp.com.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.