All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Paul Jackson <pj@sgi.com>
Cc: joe.jin@oracle.com, bill.irwin@oracle.com,
	linux-kernel@vger.kernel.org, gurudas.pai@oracle.com,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>
Subject: Re: [PATCH] Add nid sanity on alloc_pages_node
Date: Fri, 13 Jul 2007 01:38:19 -0700	[thread overview]
Message-ID: <20070713013819.0f8bd1ea.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070713012906.a6f63c90.pj@sgi.com>

On Fri, 13 Jul 2007 01:29:06 -0700 Paul Jackson <pj@sgi.com> wrote:

> > I'm scratching my head over that min_t in __first_node(), too.   I don't think
> > it's possible for find_first_bit(..., N) to return anything >N _anyway_.  And if
> > it does, we want to know about it.
> > 
> > <looks at Paul>
> 
> I'm not sure I've got this right, but looks like that min_t went in after
> Zwane Mwaikambo, then <zwane@fsmlabs.com>, whom I am presuming is the same
> person as now at <zwane@arm.linux.org.uk>, found a problem with the i386
> find_next_bit implementation returning > N when merging i386 cpu hotplug.

Ah, Zwane was involved - say no more ;)

> See the thread:
> 
>   http://lkml.org/lkml/2004/7/31/102
>   [PATCH][2.6] first/next_cpu returns values > NR_CPUS
> 
> I apparently lobbied at the time to mandate that find_first_bit(..., N)
> return exactly N on failure to find a set bit, but gave up, after some
> confusions on my part.

iirc, find_first_bit(..., N) _must_ return N on nothing-found.  It'd be
untidy to return some randomly-larger number.

I wonder which was the culpable architecture?  Oh, i386.

Note how the i386 implementation's documentation carefully avoids describing
the return value.  I don't think _any_ of our find_foo_bit()
implementations have return-value docs, and here we see the result.

Sigh.  What crap.  I guess we leave it as-is.



  reply	other threads:[~2007-07-13  8:39 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-13  2:45 [PATCH] Add nid sanity on alloc_pages_node Joe Jin
2007-07-13  5:18 ` Andrew Morton
2007-07-13  6:40   ` Joe Jin
2007-07-13  6:49     ` Andrew Morton
2007-07-13  6:57       ` Andrew Morton
2007-07-13  8:29         ` Paul Jackson
2007-07-13  8:38           ` Andrew Morton [this message]
2007-07-13  8:43             ` Paul Jackson
2007-07-13  8:49               ` Andrew Morton
2007-07-13  8:54                 ` Paul Jackson
2007-07-13 12:48                   ` Benjamin Herrenschmidt
2007-07-13  8:03       ` Joe Jin
2007-07-13  8:15         ` Andrew Morton
2007-07-13 12:18           ` Joe Jin
2007-07-13 12:42             ` Paul Jackson
2007-07-14 17:40             ` Nish Aravamudan
2007-07-14 18:04               ` Andrew Morton
2007-07-14 20:47                 ` Nish Aravamudan
2007-07-13  8:04       ` gurudas pai
2007-07-13  8:19         ` Andrew Morton
2007-07-13 12:37           ` gurudas pai
2007-07-13  8:37       ` Joe Jin
2007-07-13  8:44         ` Andrew Morton
2007-07-17 15:04   ` Hugh Dickins
2007-07-17 16:32     ` Andrew Morton
2007-07-17 17:26       ` Hugh Dickins
2007-07-17 18:58         ` Andrew Morton
2007-07-17 19:49           ` Hugh Dickins
2007-07-17 20:01             ` Andrew Morton
2007-07-17 20:35               ` Hugh Dickins
2007-07-18  1:40                 ` Joe Jin
2007-07-18  4:49                   ` Hugh Dickins
2007-07-18  5:45                     ` Andrew Morton
2007-07-18  7:34                       ` Joe Jin
2007-07-18  6:32                     ` Joe Jin
2007-07-18  8:09                     ` Joe Jin
2007-07-18  8:35                       ` Hugh Dickins

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=20070713013819.0f8bd1ea.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bill.irwin@oracle.com \
    --cc=gurudas.pai@oracle.com \
    --cc=joe.jin@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    --cc=zwane@arm.linux.org.uk \
    /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.