All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] reduce sizeof(percpu_data) and removes dependance against NR_CPUS
Date: Thu, 05 Jan 2006 15:33:27 +0100	[thread overview]
Message-ID: <43BD2E37.203@cosmosbay.com> (raw)
In-Reply-To: <20060105060050.37ec91d3.akpm@osdl.org>

Andrew Morton a écrit :
> Eric Dumazet <dada1@cosmosbay.com> wrote:
>> Current sizeof(percpu_data) is NR_CPUS*sizeof(void *)
>>
>>  This trivial patch makes percpu_data real size depends on 
>>  highest_possible_processor_id() instead of NR_CPUS
>>
>>  percpu_data allocations are not performance critical, we can spend few CPU 
>>  cycles and save some ram.
> 
> hm, highest_possible_processor_id() isn't very efficient.  And it's quite
> dopey that it's a macro.  We should turn it into a real function which
> caches its return result and goes BUG if it's called before
> cpu_possible_map is initialised.

I agree, I will see if I can do that without poking in every arch :(

More over, my patch has an error on pdsize computation, it should be :

size_t pdsize = (highest_possible_processor_id() + 1) * sizeof(void *);

Eric

  reply	other threads:[~2006-01-05 14:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-22 11:42 [PATCH] Debug shared irqs David Woodhouse
2006-01-05 10:19 ` Andrew Morton
2006-01-05 10:39   ` David Woodhouse
2006-01-05 11:08     ` Andrew Morton
2006-01-05 10:48   ` Arjan van de Ven
2006-01-05 13:49   ` [PATCH] reduce sizeof(percpu_data) and removes dependance against NR_CPUS Eric Dumazet
2006-01-05 14:00     ` Andrew Morton
2006-01-05 14:33       ` Eric Dumazet [this message]
2006-01-06  7:18     ` Jan Engelhardt
2006-01-06  7:27       ` Andrew Morton
2006-01-06  7:29       ` Eric Dumazet

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=43BD2E37.203@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.