public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: colpatch@us.ibm.com
Cc: linux-kernel@vger.kernel.org, mbligh@aracnet.com, akpm@osdl.org,
	wli@holomorphy.com, haveblue@us.ibm.com
Subject: Re: [PATCH] mask ADT: replace cpumask_t implementation [3/22]
Date: Thu, 1 Apr 2004 07:22:32 -0800	[thread overview]
Message-ID: <20040401072232.798d98c8.pj@sgi.com> (raw)
In-Reply-To: <1080611340.6742.147.camel@arrakis>

> >  #define	cpu_online_map			cpumask_of_cpu(0)
> >  #define	cpu_possible_map		cpumask_of_cpu(0)
> >  ...
> Might it make more sense to actually define a cpu_online_map &
> cpu_possible_map for UP, rather than generating this code:
> 
> #define mask_of_bit(bit, T)                                            \
> ({                                                                     \
>        typeof(T) m;                                                    \
>        mask_clearall(m);                                               \
>        mask_setbit((bit), m);                                          \
>        m;                                                              \
> })
> 
> every time some code references cpu_online_map?  It'll only cost us 2
> unsigned longs on 32-bit == 8 bytes...

Perhaps.

When I looked at the code just now, this only seemed to take a
couple of instructions.  Do you think that there is much to gain?
Better a couple of inline instructions than a possible uncached
memory reference, I suspect.

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

  reply	other threads:[~2004-04-01 15:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29 12:12 [PATCH] mask ADT: replace cpumask_t implementation [3/22] Paul Jackson
2004-03-30  1:49 ` Matthew Dobson
2004-04-01 15:22   ` Paul Jackson [this message]
2004-04-01 20:40     ` Matthew Dobson
2004-04-01 20:46       ` Paul Jackson
2004-04-01 22:50         ` Matthew Dobson
2004-04-01  1:05 ` Matthew Dobson

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=20040401072232.798d98c8.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@osdl.org \
    --cc=colpatch@us.ibm.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=wli@holomorphy.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