public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Anton Blanchard <anton@samba.org>, Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch] O(1) scheduler, -D1, 2.5.2-pre9, 2.4.17
Date: Thu, 10 Jan 2002 12:42:19 -0800	[thread overview]
Message-ID: <3C3DFCAB.3D918176@mvista.com> (raw)
In-Reply-To: <20020108114355.GA25718@krispykreme> <Pine.LNX.4.33.0201081533270.7255-100000@localhost.localdomain> <20020109231513.GA10002@krispykreme> <20020109170928.A4365@twiddle.net> <20020110200446.A695@jurassic.park.msu.ru>

Ivan Kokshaysky wrote:
> 
> On Wed, Jan 09, 2002 at 05:09:28PM -0800, Richard Henderson wrote:
> > Careful.  The following is really quite a bit better on Alpha:
> >
> > static inline int
> > sched_find_first_zero_bit(unsigned long *bitmap)
> > {
> >         unsigned long b0 = bitmap[0];
> >         unsigned long b1 = bitmap[1];
> >         unsigned long b2 = bitmap[2];
> >         unsigned long ofs = MAX_RT_PRIO;
> >
> >         if (unlikely(~(b0 & b1) != 0)) {
> >                 b2 = (~b0 == 0 ? b0 : b1);
> >                 ofs = (~b0 == 0 ? 0 : 64);
> >         }
> >
> >         return ffz(b2) + ofs;
> > }
> 
> True. Minor correction:
> -               b2 = (~b0 == 0 ? b0 : b1);
> -               ofs = (~b0 == 0 ? 0 : 64);
> +               b2 = (~b0 ? b0 : b1);
> +               ofs = (~b0 ? 0 : 64);
> 
> Note that comment for this function is a bit confusing:
>  * ... It's the fastest
>  * way of searching a 168-bit bitmap where the first 128 bits are
>  * unlikely to be set.

What if we want a 2048-bit bitmap???
> 
> s/set/cleared/
> 
> > While we're on the subject of sched_find_first_zero_bit, I'd
> > like to complain about Ingo's choice of header file.  Why in
> > the world did you choose mmu_context.h?  Invent a new asm/sched.h
> > if you must, but please don't choose headers at random.
> 
> Agreed. Apparently asm/bitops.h?
> 
> Ivan.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
George           george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/

  reply	other threads:[~2002-01-10 20:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200201071922.g07JMN106760@penguin.transmeta.com>
2002-01-07 21:36 ` [patch] O(1) scheduler, -D1, 2.5.2-pre9, 2.4.17 Ingo Molnar
2002-01-08  8:49   ` FD Cami
2002-01-08 18:44     ` J Sloan
2002-01-08 11:32   ` Anton Blanchard
2002-01-08 11:43     ` Anton Blanchard
2002-01-08 14:34       ` Ingo Molnar
2002-01-09 23:15         ` Anton Blanchard
2002-01-10  1:09           ` Richard Henderson
2002-01-10 17:04             ` Ivan Kokshaysky
2002-01-10 20:42               ` george anzinger [this message]
2002-01-10 23:56               ` Ingo Molnar
2002-01-08 14:32     ` [patch] O(1) scheduler, -E1, 2.5.2-pre10, 2.4.17 Ingo Molnar
2002-01-07 20:24 [patch] O(1) scheduler, -D1, 2.5.2-pre9, 2.4.17 Ingo Molnar
2002-01-07 19:03 ` Brian Gerst
2002-01-07 21:19   ` Ingo Molnar
2002-01-09  3:39 ` Mike Kravetz
2002-01-09  5:05   ` Davide Libenzi
2002-01-09  3:32     ` Rusty Russell
2002-01-09 18:02       ` Davide Libenzi
2002-01-09 11:37     ` Ingo Molnar
2002-01-09 11:19       ` Rene Rebe
2002-01-09 15:34         ` Ryan Cumming
2002-01-09 18:24       ` Davide Libenzi
2002-01-09 21:24         ` Ingo Molnar
2002-01-09 19:38           ` Mike Kravetz
2002-01-10 18:21             ` Mike Kravetz
2002-01-10 19:08               ` Davide Libenzi
2002-01-10 19:09                 ` Linus Torvalds
2002-01-10 21:08                   ` Davide Libenzi
2002-01-10 19:15                 ` Mike Kravetz
2002-01-10 20:05                   ` Davide Libenzi
2002-01-09 22:34           ` Mark Hahn
2002-01-10 14:04             ` Ingo Molnar
2002-01-09 20:15       ` Linus Torvalds
2002-01-09 23:02         ` Ingo Molnar
2002-01-09  6:29   ` Brian
2002-01-09  6:40     ` Jeffrey W. Baker
2002-01-09  6:45     ` Ryan Cumming
2002-01-09  6:48     ` Ryan Cumming
2002-01-09 10:25   ` Ingo Molnar
2002-01-09 17:40     ` Mike Kravetz

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=3C3DFCAB.3D918176@mvista.com \
    --to=george@mvista.com \
    --cc=anton@samba.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@transmeta.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