home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / arch / 8360 < prev    next >
Encoding:
Text File  |  1992-07-27  |  4.8 KB  |  86 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!csus.edu!netcomsv!aim.com!rec
  3. From: rec@aim.com (Bob Cousins)
  4. Subject: Re: Sun 600MP Benchmark Anomaly
  5. Message-ID: <1992Jul27.211927.5584@aim.com>
  6. Sender: news@aim.com
  7. Nntp-Posting-Host: lightning
  8. Organization: /usr/lib/news/organization
  9. References: <l6c2l5INNcds@appserv.Eng.Sun.COM> <JIM.92Jul24155432@hunter.cs.strath.ac.uk> <1992Jul27.155559.19995@crd.ge.com>
  10. Date: Mon, 27 Jul 1992 21:19:27 GMT
  11. Lines: 73
  12.  
  13. In article <1992Jul27.155559.19995@crd.ge.com> davidsen@crd.ge.com (bill davidsen) writes:
  14. >In article <JIM.92Jul24155432@hunter.cs.strath.ac.uk>, jim@cs.strath.ac.uk (Jim Reid) writes:
  15. >
  16. >| So does this mean that this "symmetrical multi-processor SunOS" isn't
  17. >| really what it claims to be? If only one CPU at a time can be executing 
  18. >| interrupt service code, what we've got is an OS with one dedicated
  19. >| (but not fixed) I/O processor.
  20. >There are tradeoffs to having multiple processors handle interrupts, and
  21. >if the latency is low enough with one processor you are possibly better
  22. >off with using only one and avoiding all the context switches. If one
  23. >can't keep up, then you will have to take the CS overhead and use them
  24. >all. I'm reassured that Sun has left this open to software change, and
  25. >I'm sure if people complain about how it works in Solaris 2.0 Sun will
  26. >change it.
  27. >bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
  28.  
  29. There are a number of issues at play here. One can create a mendacity sequence
  30. for MP interrupts as follows:
  31.  
  32. 1.    Only one CPU (the master) ever receives interrupts except for
  33.     cross-processor interrupts. (Few will argue that this is symmetrical.)
  34.     This is a common technique in master/slave systems. AIM's results
  35.     for these machines are often disappointing when one CPU cannot handle
  36.     the burden.
  37.  
  38. 2.    Only one CPU at a time can receive interrupts except for cross-
  39.     processor interrupts. (More will argue that this is symmetrical.)
  40.     This is a common technique in early UNIX MP implementations and
  41.     a number of proprietary OS's. It's a reasonable "first step."
  42.     These machines suffer from the above limitation, also.
  43.  
  44. 3.    Only one CPU at a time can be executing interrupts. (This limit
  45.     is often from the historic requirement that UNIX executes interrupts
  46.     on the current task's kernel stack, can't allow task switching,
  47.     etc.) This *may* be symmetrical or not depending on implementation
  48.     and your definition. Same performance problems.
  49.  
  50. 4.    Only one interrupt dispatch at a time (multiple outstanding
  51.     interrupts, but the dispatch is single threaded). This is typically
  52.     implemented in a "symmetric" fashion. (This is often used on
  53.     systems which have heavy kernel based support for FPUs, etc. where
  54.     a large amount of kernel state must be maintained for each CPU but
  55.     where it isn't efficient to use "standard" techniques.) These machines
  56.     often outperform machines of classes 1-3 because of their more
  57.     efficient interrupt handling. Interrupt dispatch is seldom a limiting
  58.     factor except in situations with high interrupt count peripherals
  59.     such as LANs, early dumb SCSI controllers, massive numbers of UARTs.
  60.  
  61. 5.    Any CPU can field an interrupt at any time. This is considered the
  62.     *most* symmetrical. In actuality, we see little benchmark difference
  63.     between this and #4. This is often because of the relative infrequency
  64.     of #4 delaying interrupt service sufficiently to cause lost performance
  65.     (an extra disk rotation, lost character or packets, etc.). For those
  66.     machines where this is a problem, there are usually other bottlenecks
  67.     which limit performance gained by interrupt services. (This is not
  68.     intrinsic, this is just an emperical conclusion.)
  69.  
  70. My personal favorite method is #4 with a twist: use a microcontroller to
  71. "single thread" interrupt dispatch. This microcontroller can be programmed
  72. with "interrupt policy" code during OS initialization. Since the microcontroller
  73. knows which interrupts are outstanding and which CPUs are busy (and how long
  74. since the last interrupt), it is able to make some intelligent choices as
  75. to the "optimal" CPU to interrupt. This also avoids the traditional spin-lock
  76. over shared interrupt masks common in #5. The first implementation could be
  77. simple code which forces mode #1 or #2. Eventually the system could alternate
  78. between modes depending upon load, timing, interrupt mix and a host of other
  79. parameters. Fortunately, most fast microcontrollers today can execute policy
  80. code and choose a processor in a few tens of microseconds, which is typically
  81. well under the variance of interrupt latencies for current machines.
  82. -- 
  83. ________________________________________________________________________________
  84. Robert Cousins                    rec@aim.com                  (408)748-8649x212
  85. Consultant to Aim Technology                          Speaking for myself alone.
  86.