From: Eric Dumazet <dada1@cosmosbay.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Mike Travis <travis@sgi.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux kernel <linux-kernel@vger.kernel.org>,
Christoph Lameter <clameter@sgi.com>
Subject: Re: [PATCH] modules: Use a better scheme for refcounting
Date: Sat, 17 May 2008 09:36:21 +0200 [thread overview]
Message-ID: <482E8AF5.9050804@cosmosbay.com> (raw)
In-Reply-To: <200805171533.46295.rusty@rustcorp.com.au>
Rusty Russell a écrit :
> On Friday 16 May 2008 23:41:16 Mike Travis wrote:
>
>> Eric Dumazet wrote:
>>
>>> Rusty Russell a écrit :
>>>
>>>> Any chance I can ask you look at the issue of full dynamic per-cpu
>>>> allocation?
>>>>
>>> You mean using alloc_percpu() ? Problem is that current implementation
>>> is expensive,
>>>
>
> I mean rewriting alloc_percpu :)
>
>
>>> We probably can change this to dynamic per-cpu as soon as Mike or
>>> Christopher finish their work on new dynamic per-cpu implementation ?
>>>
>> Yes, the zero-based percpu variables followed by the cpu_alloc patch should
>> provide this and shrink the code quite well, including in some cases
>> removing locking requirements (because the resultant instructions will be
>> atomic.)
>>
>
> Ah, I hadn't realized that Mike was already working on this. Mike, have you
> published patches already?
>
>
Christoph Lameter made good work last year and apparently the path is to :
1) Put pda at the begining of percpu section.
2) Relocate percpu variables to begin at zero
3) Use %gs (or %fs) register to address pda AND percpu section.
4) Reserve an appropriate large virtual zone into percpu section so that
it can fullfill :
- percpu "static" allocations needed by module loader.
- per_cpu "dynamic" allocations
(No more need for an array of pointers to find the address of dynamic
per_cpu variable)
- Eventually allocates PAGES dynamically into this zone to satisfy any
size of percpu needs.
(But with a limit of say 256 MB per cpu on x86_64)
Thats a lot of work and apparently Mike and Christoph are doing it.
Some pointers to previous work:
http://groups.google.pl/group/linux.kernel/browse_thread/thread/f2ff6901ca6ae9fc/b2ed3b7f3612a157?lnk=raot
http://kerneltrap.org/mailarchive/linux-kernel/2008/2/1/683104
http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-01/msg09052.html
next prev parent reply other threads:[~2008-05-17 7:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 20:40 [PATCH] modules: Use a better scheme for refcounting Eric Dumazet
2008-05-15 21:57 ` Andi Kleen
2008-05-16 4:44 ` Eric Dumazet
2008-05-16 0:09 ` Rusty Russell
2008-05-16 5:29 ` Eric Dumazet
2008-05-16 13:41 ` Mike Travis
2008-05-17 5:33 ` Rusty Russell
2008-05-17 7:36 ` Eric Dumazet [this message]
2008-05-18 14:31 ` Rusty Russell
2008-05-19 16:42 ` Christoph Lameter
2008-05-19 16:41 ` Christoph Lameter
2008-05-19 18:04 ` Mike Travis
2008-05-19 16:39 ` Christoph Lameter
-- strict thread matches above, loose matches on Subject: below --
2009-02-03 3:01 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=482E8AF5.9050804@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=travis@sgi.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 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.