Hybrid kernel, not NT

By: nick (anon.delete@this.anon.com), May 14, 2006 11:46 pm
Room: Moderated Discussions
Brendan (btrotter@gmail.com) on 5/14/06 wrote:
---------------------------
>Hi,
>
>nick (anon@anon.com) on 5/14/06 wrote:

>>Doesn't matter, if they have to both take the lock ->
>>cacheline bouncing; if one CPU writes a messages which is
>>read by another -> cacheline bouncing.
>
>That would involve a cache line fill. It's not even close to the performance effects
>of lock contention (which either involves repeated cache

No. I told you, you're 10 years out of date. Lock
contention is largely not an issue any more, it is cache
misses "cache line fill". Read some of literature for
reasons why there is increasing focus on lock-free
algorithms and data structures.

Maybe in your big lock based kernel, contention is an
issue, but not for those (eg Linux) which care about
scalability.


>line fills or context switches and TLB flushing).

TLB flushing? You mean due to sleeping locks causing
context switches? Again that's obviously bad if it is
out of control, but that is not the case on real OSes.

You're first assuming that there is a large amount of
lock contention in scalable OSes then concluding
that, therefore, the relatively minor cost of cacheline
contention is unimportant.

Your assumption is wrong.

>
>>>Given that (IIRC) Linux itself used a "big kernel lock" and nothing else for version
>>>2.0, and that this lock is still used (although for a lot less than it originally
>>>was), and that the slowest kernel function within Linux 2.0 would've been much longer,
>>>I don't think you're in a position to argue too much.
>>
>>Err, I don't follow your logic at all. Linux 2.0 has a
>>global lock, scalability sucked. What is my position, and
>>why isn't it one to argue too much? How much am I allowed
>>to argue?
>
>Linux 2.0 used a big kernel lock that would've been acceptable for that release
>(given developer time constraints and a probable desire to support 2-way SMP before
>worrying much about larger systems). Sometimes scalability isn't the most important
>factor - if it was they probably wouldn't have used a big kernel lock to start with.
>

Of course, my position was never contrary. Again, why am I
not in a position to argue about this too much?

>Still, I'm getting "side-tracked". My original comment was about the time taken
>by the longest kernel function. Consider a system where a CPU spends 50% of it's
>time in the kernel on average, compared to a system where a CPU spends 1% of it's
>time in the kernel on average. For the first system "big kernel lock contention"
>is extremely likely (even for a 2-way system), while for the second system "big
>kernel lock contention" is unlikely (even for 8-way SMP).


I'm not talking about lock contention, I'm talking about
cacheline contention. But if all else was equal, of course
you're right.

However, your 1% system may need to enter the kernel much
more *frequently*, in which case the cacheline contention
might be as bad or worse.


>
>For monolithic systems the time spent in the kernel includes the time spent within
>all device drivers, so the time spent inside the kernel is going to be greater than
>an equivelent micro-kernel (where time spent in the kernel doesn't include the time
>spent within device drivers). Therefore using a big kernel lock is going to effect
>performance/scalability in a monolithic system much more than it would effect performance/scalability
>in an equivelent micro-kernel.
>

Yes. But nobody would call a monolithic big lock kernel
scalable, so I don't think you can transitively conclude
anything about the microkernel.

>>In Linux, the control data does not need to go across
>>node because it is basically kept in the stack of the
>>running process. Instruction text is a different matter,
>>but AFAIK, that can be replicated on the big NUMA machines
>>in Linux.
>
>My last prototype used multiple copies of the kernel (one for each NUMA domain)
>and my current prototype uses multiple copies of the kernel and multiple copies
>of "static kernel data" (anything that doesn't change after boot). My kernels are
>normally less than 64 KB though so the memory costs aren't too bad and it's still
>sensible when the "across node penalty" isn't too high (e.g. 2 or 4 way Opterons).
>Linux is typically around 3 MB so you might get better results using this memory for disk cache instead. :-)

Well are you replecating the text of your servers?

Considering that nobody in Linux even cares that much
about it except the guys with 1024 CPU systems, I'm
guessing it is completely unmeasurable on your kernel
(outside microbenchmarks, maybe). :-)

I'd wager that passing messages across interconnect would
be more interesting...
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Hybrid (micro)kernelsTzvetan Mikov05/08/06 04:41 PM
  Hybrid (micro)kernelsS. Rao05/08/06 06:14 PM
  Hybrid (micro)kernelsBill Todd05/08/06 06:16 PM
    Hybrid (micro)kernelsTzvetan Mikov05/08/06 07:21 PM
      Hybrid (micro)kernelsnick05/08/06 07:50 PM
      Hybrid (micro)kernelsBill Todd05/09/06 01:26 AM
        There aren't enough words...Rob Thorpe05/09/06 02:39 AM
          There aren't enough words...Tzvetan Mikov05/09/06 03:10 PM
            There aren't enough words...Rob Thorpe05/15/06 12:25 AM
        Hybrid (micro)kernelsTzvetan Mikov05/09/06 11:17 AM
          Hybrid (micro)kernelsBill Todd05/09/06 04:05 PM
  Hybrid (micro)kernelsrwessel05/08/06 11:23 PM
    Hybrid kernel, not NTRichard Urich05/09/06 06:03 AM
      Hybrid kernel, not NT_Arthur05/09/06 07:06 AM
        Hybrid kernel, not NTRob Thorpe05/09/06 07:40 AM
          Hybrid kernel, not NT_Arthur05/09/06 08:30 AM
            Hybrid kernel, not NTRob Thorpe05/09/06 09:07 AM
              Hybrid kernel, not NT_Arthur05/09/06 09:36 AM
                Linux vs MacOSX peformance, debunked_Arthur05/18/06 07:30 AM
                  Linux vs MacOSX peformance, debunkedRob Thorpe05/18/06 08:19 AM
                    Linux vs MacOSX peformance, debunkedAnonymous05/18/06 12:31 PM
        Hybrid kernel, not NTLinus Torvalds05/09/06 08:16 AM
          Hybrid kernel, not NTAndi Kleen05/09/06 02:32 PM
            Hybrid kernel, not NTmyself05/09/06 03:24 PM
              Hybrid kernel, not NTmyself05/09/06 03:41 PM
              Hybrid kernel, not NTBrendan05/09/06 05:26 PM
                Hybrid kernel, not NTLinus Torvalds05/09/06 08:06 PM
                  Hybrid kernel, not NTBrendan05/13/06 01:35 AM
                    Hybrid kernel, not NTnick05/13/06 04:40 AM
                      Hybrid kernel, not NTBrendan05/13/06 09:48 AM
                        Hybrid kernel, not NTnick05/13/06 07:41 PM
                          Hybrid kernel, not NTBrendan05/13/06 09:51 PM
                            Hybrid kernel, not NTnick05/14/06 05:57 PM
                              Hybrid kernel, not NTBrendan05/14/06 10:40 PM
                                Hybrid kernel, not NTnick05/14/06 11:46 PM
                                  Hybrid kernel, not NTBrendan05/15/06 04:00 AM
                                    Hybrid kernel, not NTrwessel05/15/06 07:21 AM
                                      Hybrid kernel, not NTBrendan05/15/06 08:55 AM
                                        Hybrid kernel, not NTLinus Torvalds05/15/06 09:49 AM
                                          Hybrid kernel, not NTnick05/15/06 04:41 PM
                                          Hybrid kernel, not NTtony roth01/31/08 02:20 PM
                                    Hybrid kernel, not NTnick05/15/06 06:33 PM
                                      Hybrid kernel, not NTBrendan05/16/06 01:39 AM
                                        Hybrid kernel, not NTnick05/16/06 02:53 AM
                                          Hybrid kernel, not NTBrendan05/16/06 05:37 AM
                  Hybrid kernel, not NTAnonymous05/01/08 10:31 PM
                    Following the structure of the treeMichael S05/02/08 04:19 AM
                      Following the structure of the treeDean Kent05/02/08 05:31 AM
                        Following the structure of the treeMichael S05/02/08 06:02 AM
                        Following the structure of the treeDavid W. Hess05/02/08 06:48 AM
                          Following the structure of the treeDean Kent05/02/08 09:14 AM
                            Following the structure of the treeDavid W. Hess05/02/08 10:05 AM
                              LOL!Dean Kent05/02/08 10:33 AM
                              Following the structure of the treeanonymous05/02/08 03:04 PM
                                Following the structure of the treeDean Kent05/02/08 07:52 PM
                                Following the structure of the treeFoo_05/03/08 02:01 AM
                                  Following the structure of the treeDavid W. Hess05/03/08 06:54 AM
                                    Following the structure of the treeDean Kent05/03/08 10:06 AM
                                      Following the structure of the treeFoo_05/04/08 01:06 AM
                                        Following the structure of the treeMichael S05/04/08 01:22 AM
            Hybrid kernel, not NTLinus Torvalds05/09/06 05:19 PM
              Microkernel Vs Monolithic KernelKernel_Protector05/09/06 09:41 PM
                Microkernel Vs Monolithic KernelDavid Kanter05/09/06 10:30 PM
                  Sigh, Stand back, its slashdotting time. (NT)Anonymous05/09/06 10:44 PM
                  Microkernel Vs Monolithic Kernelblah05/12/06 08:58 PM
                  Microkernel Vs Monolithic KernelRob Thorpe05/15/06 01:41 AM
          Hybrid kernel, not NTAnalGuy05/16/06 03:10 AM
            Theory versus practiceDavid Kanter05/16/06 12:55 PM
              Distributed algorithmsRob Thorpe05/17/06 12:53 AM
              Theory versus practiceHoward Chu05/17/06 02:54 AM
                Theory versus practiceJS05/17/06 04:29 AM
          Play online poker, blackjack !!! Gamezonex08/16/07 01:49 PM
  Hybrid (micro)kernelsphilt05/14/06 09:15 PM
    Hybrid (micro)kernelsLinus Torvalds05/15/06 08:20 AM
      Hybrid (micro)kernelsLinus Torvalds05/15/06 11:56 AM
        Hybrid (micro)kernelsRob Thorpe05/16/06 01:22 AM
          Hybrid (micro)kernelsrwessel05/16/06 11:23 AM
            Hybrid (micro)kernelsRob Thorpe05/17/06 12:43 AM
              Hybrid (micro)kernelsrwessel05/17/06 01:33 AM
                Hybrid (micro)kernelsRob Thorpe05/19/06 07:51 AM
                  Hybrid (micro)kernelsrwessel05/19/06 12:27 PM
      Hybrid (micro)kernelstechIperson05/15/06 01:25 PM
      Hybrid (micro)kernelsmas05/15/06 05:17 PM
        Hybrid (micro)kernelsLinus Torvalds05/15/06 05:39 PM
          Hybrid (micro)kernelsColonel Kernel05/15/06 09:17 PM
            Hybrid (micro)kernelsWink Saville05/15/06 10:31 PM
              Hybrid (micro)kernelsLinus Torvalds05/16/06 10:08 AM
                Hybrid (micro)kernelsWink Saville05/16/06 09:55 PM
          Hybrid (micro)kernelsrwessel05/16/06 11:31 AM
            Hybrid (micro)kernelsLinus Torvalds05/16/06 12:00 PM
        Hybrid (micro)kernelsBrendan05/16/06 01:36 AM
        Hybrid (micro)kernelsPaul Elliott09/03/06 08:44 AM
          Hybrid (micro)kernelsRob Thorpe09/04/06 09:25 AM
      Hybrid (micro)kernelsphilt05/16/06 12:55 AM
        Hybrid (micro)kernelspgerassi08/16/07 07:41 PM
  Another questionable entry on Wikipedia?Chung Leong05/18/06 10:33 AM
  Hybrid (micro)kernelsisrael05/20/06 04:25 AM
    Hybrid (micro)kernelsRob Thorpe05/22/06 08:35 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell blue?