public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Matthew Dobson <colpatch@us.ibm.com>
Cc: Paul Jackson <pj@sgi.com>, LKML <linux-kernel@vger.kernel.org>,
	"Martin J. Bligh" <mbligh@aracnet.com>,
	Andrew Morton <akpm@osdl.org>, Dave Hansen <haveblue@us.ibm.com>
Subject: Re: [PATCH] mask ADT: bitmap and bitop tweaks [1/22]
Date: Mon, 29 Mar 2004 15:52:33 -0800	[thread overview]
Message-ID: <20040329235233.GV791@holomorphy.com> (raw)
In-Reply-To: <1080601576.6742.43.camel@arrakis>

On Mon, Mar 29, 2004 at 03:06:16PM -0800, Matthew Dobson wrote:
> Do we need to check the last word specially?  If we're assuming that the
> unused bits are 0's, then they can't affect the check, right?  If we're
> not assuming the unused bits are 0's, then we need to do this last word
> special casing in bitmap_xor & bitmap_andnot, because they could set the
> unused bits.  Or am I confused?

No, not those two. xor of 0's is 0 again. and of 0 and anything is 0 again.
xornot and ornot would need those checks if implemented.


On Mon, Mar 29, 2004 at 03:06:16PM -0800, Matthew Dobson wrote:
> Same comments here, both the double ';' and the last word special
> casing...
> Looking ahead, patch 2/22 specifically states that we assume all our
> input masks have the high/unused bits cleared and we promise not to set
> them.  So we shouldn't need the last word special casing in
> bitmap_intersect & bitmap_subset...  I think. ;)

It looks like Paul wants those invariants. Which is fine; I can do things
on behalf of users, or stand back and let them do things themselves.

You're right that intersection (and) and subset (andnot) shouldn't require
any special cases for the final word.


-- wli

  reply	other threads:[~2004-03-29 23:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29 12:12 [PATCH] mask ADT: bitmap and bitop tweaks [1/22] Paul Jackson
2004-03-29 23:06 ` Matthew Dobson
2004-03-29 23:52   ` William Lee Irwin III [this message]
2004-03-29 23:43     ` Paul Jackson
2004-03-30  1:27       ` Matthew Dobson
2004-03-30  2:06       ` William Lee Irwin III
2004-03-30  1:46         ` Paul Jackson
2004-03-30  2:55           ` William Lee Irwin III
2004-03-30  5:09             ` Paul Jackson
2004-03-30  6:36               ` William Lee Irwin III
2004-03-30  8:00         ` Paul Jackson
2004-03-30  9:22           ` William Lee Irwin III
2004-03-29 23:50     ` Paul Jackson
2004-03-30 15:53     ` Chris Friesen
2004-03-30 18:30       ` 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=20040329235233.GV791@holomorphy.com \
    --to=wli@holomorphy.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=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