Muli Ben-Yehuda's journal

December 11, 2003

Filed under: Uncategorized — Muli Ben-Yehuda @ 2:43 PM

Put up the work-in-progress version of the aib-B1 patch. The patch is by Con Kolivas and me. I supplied the percpu variables and list handling, and Con hooked it into the relevant points in the scheduler.

The purpose is to make the scheduler smarter when choosing which idle CPU to put a new task on, by keeping track of which CPU has been idle longest. This is a work in progress, Con is benchmarking it now, and we are thinking about a bit-field version that should be faster (although I’m concerned about possible contention).


  1. Cool
    Yay SMP.

    Comment by moshez — December 11, 2003 @ 4:54 AM | Reply

  2. Couldn’t all_cpus_busy be MAXINT instead of NRCPU+1? I’m not sure it matters, but it looks to be a value which is just as good 🙂
    Also, what is that #if 1 there? Just to enable easy debugging? Was it supposed to be #if DEBUG or something?
    Your code is confusing me!

    Comment by moshez — December 11, 2003 @ 10:20 AM | Reply

    • actually, MAX_INT is not a good value, because it’s an unsigned long. I would go with ~0UL.
      That #if 1 is indeed for debugging. That bit of code causes the boot sequence to get stuck on two machines. By turning the #if 1 to #if 0 and vice versa, I verifed that it’s this bit of code that is the culprit.
      Sorry if you got confused, it’s work in progress 😉

      Comment by mulix — December 11, 2003 @ 11:23 AM | Reply

      • It’s OK!
        I just decided that once in my life, I should actually try reading and understanding a kernel patch 🙂

        Comment by moshez — December 11, 2003 @ 12:27 PM

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: