linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Ravikiran G Thirumalai <kiran@in.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Manfred Spraul <manfred@colorfullife.com>,
	Dipankar Sarma <dipankar@in.ibm.com>
Subject: Re: [patch 2/2] mm: Reimplementation of alloc_percpu
Date: Tue, 18 Jan 2005 12:30:32 +1100	[thread overview]
Message-ID: <1106011832.30801.5.camel@localhost.localdomain> (raw)
In-Reply-To: <20050117183617.GC2322@impedimenta.in.ibm.com>

On Tue, 2005-01-18 at 00:06 +0530, Ravikiran G Thirumalai wrote:
> Here's the alloc_percpu reimplementation changed to
> - Use qsort 
> - Use GFP_KERNEL|__GFP_HIGHMEM|__GFP_ZERO for BLOCK_MANAGEMENT_PAGES
>   (GFP_HIGHZERO would have been ideal)
> - Changed currency size to sizeof (int) from sizeof (void *) for better
>   utilization for small objects
> 
> The allocator can be easily modified to use __per_cpu_offset[] table at a later
> stage by: 
> 1. Allocating ALIGN(__per_cpu_end - __per_cpu_start, PAGE_SIZE) for the
>    static percpu areas and populating __per_cpu_offset[] offset table
> 2. Making PCPU_BLKSIZE same as the static per cpu area size above
> 3. Serving dynamic percpu requests from modules etc from blocks by
>    returning ret -= __per_cpu_offset[0] from a percpu block.  This way
>    modules need not have a limit on static percpu areas.

Unfortunately ia64 breaks (3).  They have pinned TLB entries covering
64k, which they put the static per-cpu data into.  This is used for
local_inc, etc, and David Mosberger loved that trick (this is why my
version allocated from that first reserved block for modules' static
per-cpu vars).

Hope that clarifies,
Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman


  reply	other threads:[~2005-01-18  1:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-17 18:30 [patch 1/2] mm: Reimplementation of alloc_percpu - move qsort from xfs/support to linux/lib Ravikiran G Thirumalai
2005-01-17 18:36 ` [patch 2/2] mm: Reimplementation of alloc_percpu Ravikiran G Thirumalai
2005-01-18  1:30   ` Rusty Russell [this message]
2005-01-18 15:15     ` Ravikiran G Thirumalai
2005-01-18 23:30       ` 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=1106011832.30801.5.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@osdl.org \
    --cc=dipankar@in.ibm.com \
    --cc=kiran@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.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;
as well as URLs for NNTP newsgroup(s).