From: Matthew Dobson <colpatch@us.ibm.com>
To: Andi Kleen <ak@muc.de>
Cc: LKML <linux-kernel@vger.kernel.org>, pj@sgi.com
Subject: Re: [PATCH] Introduce nodemask_t ADT [0/7]
Date: Fri, 19 Mar 2004 15:09:33 -0800 [thread overview]
Message-ID: <1079737773.17841.67.camel@arrakis> (raw)
In-Reply-To: <m37jxhvbgm.fsf@averell.firstfloor.org>
On Thu, 2004-03-18 at 18:04, Andi Kleen wrote:
> Matthew Dobson <colpatch@us.ibm.com> writes:
>
> >> Chris Hellwig responded to it at the time asking why I didn't provide a
> >> single generic mask ADT, and make cpumask and nodemask instances of
> >> that.
> >
> > That is a better idea, if it can be made to work. My goal is to stop
>
> It already exists in linux/bitmap.h. I use that in NUMA API for the node masks.
>
> It's just a bit ugly to write because you have to always pass MAX_NUMNODES.
> Some wrappers would be prettier.
>
> -Andi
For MAX_NUMNODES > BITS_PER_LONG, thats just what these are. There are
just built-in optimizations for the single bit (UP for cpumask, non-NUMA
for nodemask) case and the single unsigned long case. For the case of a
single unsigned long, the bitmap operations aren't as efficient as just
doing a
res = (mask1 & mask2);
vs.
bitmask_and(&res, &mask1, &mask2);
Maybe I'm overly concerned about the speed of these ops at the expense
of code size. If that's the consensus, I'll gladly look at a simpler
implementation. As I said, my only real goal is to stop people open
coding these types of operations.
-Matt
next prev parent reply other threads:[~2004-03-19 23:10 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1BeOx-7ax-55@gated-at.bofh.it>
[not found] ` <1BgGq-DU-5@gated-at.bofh.it>
[not found] ` <1BgZN-Vk-1@gated-at.bofh.it>
2004-03-19 2:04 ` [PATCH] Introduce nodemask_t ADT [0/7] Andi Kleen
2004-03-19 2:38 ` Paul Jackson
2004-03-19 23:09 ` Matthew Dobson [this message]
2004-03-20 0:47 ` Paul Jackson
2004-03-20 1:14 ` Paul Jackson
2004-03-18 23:04 Matthew Dobson
2004-03-18 23:23 ` Jesse Barnes
2004-03-18 23:32 ` Martin J. Bligh
2004-03-18 23:37 ` Jesse Barnes
2004-03-18 23:43 ` Martin J. Bligh
2004-03-18 23:59 ` Jesse Barnes
2004-03-19 16:20 ` Martin J. Bligh
2004-03-19 0:58 ` Zwane Mwaikambo
2004-03-19 1:11 ` Jesse Barnes
2004-03-19 1:34 ` Zwane Mwaikambo
2004-03-19 1:40 ` Jesse Barnes
2004-03-19 1:08 ` Paul Jackson
2004-03-19 0:01 ` Matthew Dobson
2004-03-18 23:58 ` Matthew Dobson
2004-03-19 2:55 ` William Lee Irwin III
2004-03-19 0:59 ` Paul Jackson
2004-03-19 1:19 ` Matthew Dobson
2004-03-19 1:45 ` Paul Jackson
2004-03-19 22:51 ` Matthew Dobson
2004-03-19 23:42 ` Paul Jackson
2004-03-19 1:48 ` Paul Jackson
2004-03-19 1:56 ` Paul Jackson
2004-03-19 23:02 ` Matthew Dobson
2004-03-20 0:59 ` Paul Jackson
2004-03-20 3:18 ` William Lee Irwin III
2004-03-20 6:09 ` Paul Jackson
2004-03-20 9:36 ` William Lee Irwin III
2004-03-22 23:59 ` Paul Jackson
2004-03-23 2:12 ` William Lee Irwin III
2004-03-23 1:21 ` Paul Jackson
2004-03-23 2:10 ` William Lee Irwin III
2004-03-23 1:24 ` Paul Jackson
2004-03-20 8:02 ` Paul Jackson
2004-03-20 11:13 ` William Lee Irwin III
2004-03-21 4:19 ` Paul Jackson
2004-03-21 4:36 ` William Lee Irwin III
2004-03-21 7:59 ` Nick Piggin
2004-03-23 1:12 ` Paul Jackson
2004-03-23 2:09 ` William Lee Irwin III
2004-03-23 2:39 ` Paul Jackson
2004-03-23 3:13 ` William Lee Irwin III
2004-03-23 3:36 ` Paul Jackson
2004-03-23 3:59 ` William Lee Irwin III
2004-03-23 4:03 ` Paul Jackson
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=1079737773.17841.67.camel@arrakis \
--to=colpatch@us.ibm.com \
--cc=ak@muc.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox