From: Paul Jackson <pj@sgi.com>
To: Paul Mackerras <paulus@samba.org>
Cc: joe.korty@ccur.com, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: seperator error in __mask_snprintf_len
Date: Wed, 14 Jan 2004 15:03:31 -0800 [thread overview]
Message-ID: <20040114150331.02220d4d.pj@sgi.com> (raw)
In-Reply-To: <16381.61618.275775.487768@cargo.ozlabs.ibm.com>
Paul M suggested (in the 32-bit display loop of lib/mask.c):
> #define BITMAP_WORD(p, n) (((u32 *)(p))[(n) ^ 1])
Then, later, Joe sugguested a patch rewriting the lib/mask.c display
loop using various C bit operations (& ! / % << >>).
Joe - question - is there any good reason not to use Paul M's
suggestion, eor'ing the index with 1 on 64 bit big endian hardware?
I have a patch about ready (as soon as I can get time on my big system
to test it) that uses the eor 1 idea.
The eor 1 code looks good to me, and takes a few bytes fewer machine
instructions. Perhaps you know something I am missing. The actual
patch should be up in about 5 hours, in case you'd rather not comment on
code unseen ;).
Joe suggested:
> This patch preserves Paul's ideas of how a cpumask_t should be printed
> out even though I do not agree with those ideas. At a minimum I prefer
> a constant-width display so that columns of cpumasks will be readable.
On further review, I think you're right on this, Joe. After I get the
above big endian fix out, I will attempt a patch that changes this
format, zero-filling each word to 8 hex chars, from:
=========== OLD ===========
* Examples:
* A mask with just bit 0 set displays as "1".
* A mask with just bit 127 set displays as "80000000,0,0,0".
* A mask with just bit 64 set displays as "1,0,0".
* A mask with bits 0, 1, 2, 4, 8, 16, 32 and 64 set displays
* as "1,1,10117". The first "1" is for bit 64, the second
* for bit 32, the third for bit 16, and so forth, to the
* "7", which is for bits 2, 1 and 0.
* A mask with bits 32 through 39 set displays as "ff,0".
=========== OLD ===========
to:
=========== NEW ===========
* Examples:
* A mask with just bit 0 set displays as "00000001".
* A mask with just bit 127 set displays as "80000000,00000000,00000000,00000000".
* A mask with just bit 64 set displays as "00000001,00000000,00000000".
* A mask with bits 0, 1, 2, 4, 8, 16, 32 and 64 set displays
* as "00000001,00000001,00010117". The first "1" is for bit 64, the second
* for bit 32, the third for bit 16, and so forth, to the
* "7", which is for bits 2, 1 and 0.
* A mask with bits 32 through 39 set displays as "000000ff,00000000".
=========== NEW ===========
How does that look to you? Anyone else want to chime in?
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
next prev parent reply other threads:[~2004-01-14 23:07 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-07 16:56 seperator error in __mask_snprintf_len Joe Korty
2004-01-07 19:32 ` Andrew Morton
2004-01-08 13:11 ` Paul Jackson
2004-01-08 22:50 ` Paul Mackerras
2004-01-08 22:59 ` Joe Korty
2004-01-09 0:07 ` Paul Mackerras
2004-01-09 1:11 ` Paul Jackson
2004-01-14 23:03 ` Paul Jackson [this message]
2004-01-15 0:27 ` Joe Korty
2004-01-15 0:37 ` Paul Jackson
2004-01-15 4:40 ` Paul Jackson
2004-01-15 16:15 ` Andrew Morton
2004-01-15 18:15 ` Joe Korty
2004-01-16 0:17 ` Paul Jackson
2004-01-16 0:48 ` Joe Korty
2004-01-16 1:48 ` Paul Jackson
2004-01-16 23:29 ` Matthew Dobson
2004-01-17 6:36 ` [PATCH] bitmap parsing routines, version 3 Joe Korty
2004-01-17 10:08 ` Paul Jackson
[not found] ` <20040117145545.GA16318@tsunami.ccur.com>
2004-01-17 15:36 ` Joe Korty
2004-01-17 23:33 ` Paul Jackson
2004-01-18 5:52 ` William Lee Irwin III
2004-01-18 7:03 ` Paul Jackson
2004-01-17 18:39 ` [PATCH] bitmap parsing/printing routines, version 4 Joe Korty
2004-01-17 23:36 ` Paul Jackson
2004-01-19 21:17 ` Matthew Dobson
2004-01-20 0:17 ` Paul Jackson
2004-01-20 3:57 ` Joe Korty
2004-01-20 4:15 ` Paul Jackson
2004-01-20 5:41 ` Randy Dunlap
2004-01-20 7:03 ` Matthew Dobson
2004-01-20 15:36 ` Joe Korty
2004-01-20 17:06 ` Matthew Dobson
2004-01-17 9:12 ` seperator error in __mask_snprintf_len Paul Jackson
2004-01-16 5:14 ` Paul Jackson
2004-01-16 5:26 ` Andrew Morton
2004-01-16 5:52 ` William Lee Irwin III
2004-01-16 14:23 ` Joe Korty
2004-01-17 10:07 ` Paul Jackson
2004-01-15 22:53 ` Paul Jackson
2004-01-16 1:06 ` Andrew Morton
2004-01-16 2:54 ` Paul Jackson
2004-01-09 14:28 ` Paul Jackson
2004-01-09 14:46 ` Paul Jackson
2004-01-09 15:14 ` Andreas Schwab
2004-01-09 15:25 ` Christoph Hellwig
2004-01-09 17:23 ` Paul Jackson
2004-01-12 0:09 ` Joe Korty
2004-01-12 21:41 ` Paul Jackson
2004-01-12 22:00 ` Joe Korty
2004-01-12 22:28 ` Paul Jackson
2004-01-12 22:39 ` Joe Korty
2004-01-09 14:57 ` Paul Jackson
2004-01-08 1:06 ` Paul Jackson
2004-01-08 3:32 ` Joe Korty
2004-01-08 10:39 ` Paul Jackson
[not found] <1bpdu-5jP-35@gated-at.bofh.it>
[not found] ` <1brIi-Y0-57@gated-at.bofh.it>
[not found] ` <1bIf6-fh-21@gated-at.bofh.it>
[not found] ` <1bRiA-4PD-19@gated-at.bofh.it>
[not found] ` <1bRrZ-58C-9@gated-at.bofh.it>
[not found] ` <1bSHD-Xz-21@gated-at.bofh.it>
[not found] ` <1e2sZ-rG-19@gated-at.bofh.it>
[not found] ` <1e3Ih-1V0-1@gated-at.bofh.it>
[not found] ` <1e7Cd-4qD-5@gated-at.bofh.it>
[not found] ` <1einZ-64E-11@gated-at.bofh.it>
[not found] ` <1ekpM-87C-1@gated-at.bofh.it>
[not found] ` <1euyS-Eb-19@gated-at.bofh.it>
[not found] ` <1euSb-U8-3@gated-at.bofh.it>
2004-01-16 8:25 ` Andi Kleen
2004-01-16 8:35 ` Andrew Morton
2004-01-16 10:16 ` Andi Kleen
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=20040114150331.02220d4d.pj@sgi.com \
--to=pj@sgi.com \
--cc=akpm@osdl.org \
--cc=joe.korty@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.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.