History

fix from john

rminnich committed 15 years ago

Commit a4d55721 parent 845aa433 files · +54 −37Browse files

Unified · Split

3 files
  1. sys/doc/CURRY/all.bib +21 −0
  2. sys/doc/CURRY/sc11.tex +32 −36
  3. sys/doc/CURRY/standard.ps +1 −1
sys/doc/CURRY/all.bib+21−0
@@ -3874,4 +3874,25 @@ address = {Los Alamitos, CA, USA}, · 3873 unmodified lines
3874 pages={1--10},3874 pages={1--10},
3875 year={2008},3875 year={2008},
3876 organization={IEEE}3876 organization={IEEE}
3877}
3878
3879@conference{barrett2009application,
3880 title={{An application based MPI message throughput benchmark}},
3881 author={Barrett, B.W. and Hemmert, K.S.},
3882 booktitle={Cluster Computing and Workshops, 2009. CLUSTER'09. IEEE International Conference on},
3883 pages={1--8},
3884 issn={1552-5244},
3885 year={2009},
3886 organization={IEEE}
3887}
3888
3889@book{von1992active,
3890 title={{Active messages: a mechanism for integrated communication and computation}},
3891 author={Von Eicken, T. and Culler, D.E. and Goldstein, S.C. and Schauser, K.E.},
3892 volume={20},
3893 number={2},
3894 isbn={0897915097},
3895 issn={0163-5964},
3896 year={1992},
3897 publisher={ACM}
3877}3898}
sys/doc/CURRY/sc11.tex+32−36
@@ -12,7 +12,9 @@ · 11 unmodified lines
12\author{Ronald G. Minnich%12\author{Ronald G. Minnich%
13\thanks{\protect\includegraphics[height=0.3in]{thunderchicken}%13\thanks{\protect\includegraphics[height=0.3in]{thunderchicken}%
14}%14}%
15\thanks{Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear Security Administration under contract DE­AC04­94AL85000. SAND- 2009-5156C.} and John Floren and Jim Mckie15\thanks{Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear Security Administration under contract DE­AC04­94AL85000. SAND- 2009-5156C.}
16and John Floren\thanks{Sandia National Labs} and
17and Eric Van Hensberge\thanks{IBM} and Jim Mckie
16\thanks{Bell Laboratories, Murray Hill, NJ, USA }18\thanks{Bell Laboratories, Murray Hill, NJ, USA }
17 and Charles Forsyth19 and Charles Forsyth
18\thanks{Vita Nuova, Ldt.} and Roger Pearce\thanks{Lawrence Livermore National Laboratory}20\thanks{Vita Nuova, Ldt.} and Roger Pearce\thanks{Lawrence Livermore National Laboratory}
@@ -27,7 +29,7 @@ · 8 unmodified lines
27\subsection*{Abstract}29\subsection*{Abstract}
28This paper explores the use of operating systems modifications, which we call {\em specializations}, as a technique for improving IO throughput in High Performance Computing (HPC) systems. 30This paper explores the use of operating systems modifications, which we call {\em specializations}, as a technique for improving IO throughput in High Performance Computing (HPC) systems.
29These specializations are the software analog of the specializations implemented in chips such as the Power PC 4xx series used in the Blue Gene supercomputer. A 31These specializations are the software analog of the specializations implemented in chips such as the Power PC 4xx series used in the Blue Gene supercomputer. A
30specialization adds functionality that is not needed in a general purpose product, and that yet is essential to the correct operation of a special purpose product. It has little use 32specialization adds functionality that is not needed in a general purpose product, yet is essential to the correct operation of a special purpose product. It has little use
31outside the HPC domain; its presence is the difference between success and failure in the HPC domain. 33outside the HPC domain; its presence is the difference between success and failure in the HPC domain.
32 34
33In the Blue Gene hardware, a significant fraction of the floor plan is dedicated to special purpose subsystems. Conversely, our specializations are very small and simple, but have a dramatic impact on performance. 35In the Blue Gene hardware, a significant fraction of the floor plan is dedicated to special purpose subsystems. Conversely, our specializations are very small and simple, but have a dramatic impact on performance.
@@ -36,15 +38,15 @@ They include: · 2 unmodified lines
36\item Support for process-private system calls and currying for devices that require it38\item Support for process-private system calls and currying for devices that require it
37\item A bypass path in the system call that implements low latency access to a network driver39\item A bypass path in the system call that implements low latency access to a network driver
38\item A hybrid process model in which certain distinguished processes share the heap (bss) segment with virtual-equal-physical addressing, allowing common memory addresses in programs, the kernel, and interrupt handlers40\item A hybrid process model in which certain distinguished processes share the heap (bss) segment with virtual-equal-physical addressing, allowing common memory addresses in programs, the kernel, and interrupt handlers
39\item Support for {\em active messages} and {\em one sided messaging} in the interrupt handler of a network driver41\item Support for {\em active messages} and {\em one-sided messaging} in the interrupt handler of a network driver
40\end{itemize}42\end{itemize}
41 43
42We have implemented and measured these changes using the IBM Blue Gene supercomputers, running under the Plan~9 research operating system. 44We have implemented and measured these changes using IBM Blue Gene supercomputers running under the Plan~9 research operating system.
43In this paper we describe the implementations and the results, and how they compare with current state of the art programming models on these machines. 45In this paper we describe the implementations and the results, and how they compare with current state of the art programming models on these machines.
44 46
45\section{Introduction}47\section{Introduction}
46Communications performance may be the single most critical determinant of overall performance on High Performance Computing (HPC) systems. Of the top 10 systems on the Top 500 list, 70\% use a proprietary interconnect. Proprietary interconnects compose 5.8\% of the Top 500, but the machines they are used in comprise over 30\% of the total compute power on that list. 48Communications performance may be the single most critical determinant of overall performance on High Performance Computing (HPC) systems. Of the top 10 systems on the Top 500 list, 70\% use a proprietary interconnect. Proprietary interconnects compose 5.8\% of the Top 500, but the machines they are used in comprise over 30\% of the total compute power on that list.
47As the Blue Gene/P shows, a supercomputer with a low-performance 850 Mhz. CPUs can thrive if given a high performance network. The reverse is not true: very high performance processors on a low-performance network will not do very well at all on traditional HPC tasks. On the Top 500, the first 49As the Blue Gene/P shows, a supercomputer with low performance 850 Mhz. CPUs can thrive if given a high performance network. The reverse is not true: very high performance processors on a low performance network will not do very well at all on traditional HPC tasks. On the Top 500, the first
48mention of Ethernet occurs at slot 155, with a large but not very high performance Ethernet-connect cluster. 50mention of Ethernet occurs at slot 155, with a large but not very high performance Ethernet-connect cluster.
49 51
50Even the most cursory cost estimates show that on the Top 10 systems, the cost of the interconnect consumes a large fraction of total; 50\% is not unusual. The networks are carefully engineered to support applications at minimal overhead, at a scale of 10s of thousands of processors. 52Even the most cursory cost estimates show that on the Top 10 systems, the cost of the interconnect consumes a large fraction of total; 50\% is not unusual. The networks are carefully engineered to support applications at minimal overhead, at a scale of 10s of thousands of processors.
@@ -54,9 +56,9 @@ drops by a factor of 3 at least. The latency of the Torus network on the Blue Ge · 3 unmodified lines
54If Linux is used, we quickly find that it is possible to convert a sixty million dollar, special-purpose Blue Gene network to little better than an Ethernet. 56If Linux is used, we quickly find that it is possible to convert a sixty million dollar, special-purpose Blue Gene network to little better than an Ethernet.
55 57
56General purpose operating systems have too much overhead attached to the movement of data, even those as efficient as Linux. 58General purpose operating systems have too much overhead attached to the movement of data, even those as efficient as Linux.
57For this reason, for the past two decades, HPC systems have used a technique known as "OS bypass", which in the simplest terms means the device driver is part of the application, not the OS. 59For this reason, for the past two decades, HPC systems have used a technique known as ``OS bypass'', which in the simplest terms means the device driver is part of the application, not the OS.
58The use of "OS Bypass" is not without problems. If the network interface does not support virtualization, i.e. if a single network interface can only be used as a single network interface, OS Bypass essentially turns60The use of "OS Bypass" is not without problems. If the network interface does not support virtualization, i.e. if a single network interface can only be used as a single network interface, OS Bypass essentially turns
59the HPC system into single-user machine. Multiple processes on a single node can not even share the interface. If, on the other hand, the network interface does support virtual instances, the cost can be very high: 61the HPC system into a single-user machine. Multiple processes on a single node can not even share the interface. If, on the other hand, the network interface does support virtual instances, the cost can be very high:
60Infiniband interfaces, for example, run at about 15 watts, or 50\% more power than the full Blue Gene/P node chip. 62Infiniband interfaces, for example, run at about 15 watts, or 50\% more power than the full Blue Gene/P node chip.
61 63
62HPC designers are thus left with two unpalatable choices: design HPC systems as single-user devices, because the network is single-user; or, create virtualizing network interfaces, increasing power, heat dissipation, complexity, and cost. 64HPC designers are thus left with two unpalatable choices: design HPC systems as single-user devices, because the network is single-user; or, create virtualizing network interfaces, increasing power, heat dissipation, complexity, and cost.
@@ -72,7 +74,9 @@ Finally, we discuss performance and future work. · 9 unmodified lines
72\subsection{Blue Gene and its operating systems}74\subsection{Blue Gene and its operating systems}
73The IBM Blue Gene\cite{DBLP:journals/ibmrd/GaraBCCCGHHHKLOSTV05} series of supercomputers, among the fastest in the world, are also unique in that they are purpose built from the chip to the system level. In contrast to other systems which use a standard off-the-shelf CPU placed on a motherboard and connected to network chips, IBM has embedded network functionality on the CPU as shown in Figure \ref{bglchip}. These CPUs are then packaged into boards which consist of little more than DRAM and a connector, and from there to full systems.The result is a greatly simplified system which, in turn, is extremely reliable; the BG/L system at Lawrence Livermore National Lab, with 128,000 CPUs, has an average uptime of 10 days. The term uptime in this case means that after 10 days, {\em everything} is still working; any failure of any subsystem, down to a single DRAM cell, counts as an interrupt.75The IBM Blue Gene\cite{DBLP:journals/ibmrd/GaraBCCCGHHHKLOSTV05} series of supercomputers, among the fastest in the world, are also unique in that they are purpose built from the chip to the system level. In contrast to other systems which use a standard off-the-shelf CPU placed on a motherboard and connected to network chips, IBM has embedded network functionality on the CPU as shown in Figure \ref{bglchip}. These CPUs are then packaged into boards which consist of little more than DRAM and a connector, and from there to full systems.The result is a greatly simplified system which, in turn, is extremely reliable; the BG/L system at Lawrence Livermore National Lab, with 128,000 CPUs, has an average uptime of 10 days. The term uptime in this case means that after 10 days, {\em everything} is still working; any failure of any subsystem, down to a single DRAM cell, counts as an interrupt.
74\begin{figure}76\begin{figure}
77\center{
75\includegraphics[width=.3\textwidth]{bglchip.eps} 78\includegraphics[width=.3\textwidth]{bglchip.eps}
79}
76\caption{\label{bglchip}Blue Gene/L CPU showing dedicated network hardware (Torus, Tree, Eth, and JTAG). Note that on most CPUs the Eth block is not connected.}80\caption{\label{bglchip}Blue Gene/L CPU showing dedicated network hardware (Torus, Tree, Eth, and JTAG). Note that on most CPUs the Eth block is not connected.}
77\end{figure}81\end{figure}
78 82
@@ -86,7 +90,8 @@ compute nodes. For further detail the reader is referred to \cite{plan9bgp}. · 7 unmodified lines
86Currently, Blue Gene systems run two different kernels. The I/O nodes run Linux. The compute nodes run a lightweight kernel, the Compute Node Kernel or CNK. The CNK does not support file I/O directly; instead, system calls are packaged and forwarded to the I/O node. Experimentation with running Linux on the compute nodes is ongoing. 90Currently, Blue Gene systems run two different kernels. The I/O nodes run Linux. The compute nodes run a lightweight kernel, the Compute Node Kernel or CNK. The CNK does not support file I/O directly; instead, system calls are packaged and forwarded to the I/O node. Experimentation with running Linux on the compute nodes is ongoing.
87 91
88\subsection{Plan~9}92\subsection{Plan~9}
89Plan~9\cite{Plan9} is a distributed operating system developed at Bell Labs. In Plan~9, the only components hardwired into the kernel are those which are absolutely necessary for basic operations (drivers); other components, which can be on the same or other computer, are run outside the kernel (servers). Drivers include hardware controllers, process management, and network protocol stacks. Servers include traditional functions such as file systems and nontraditional functions such as window managers and Grid management tools. Drivers and servers can be transparently intermixed and their location is irrelevant; a server can be reimplemented as a driver with little if any code changing (the TCP/IP stack was originally a server but was moved into the kernel as a driver). For the purposes of this paper, one can consider Plan~9 to be a Unix-like operating 93Plan~9\cite{Plan9} is a distributed operating system developed at Bell Labs. In Plan~9, the only components hardwired into the kernel are those which are absolutely necessary for basic operations (drivers); other components, which can be on the same or other computer, are run outside the kernel (servers). Drivers include hardware controllers, process management, and network protocol stacks. Servers include traditional functions such as file systems and nontraditional functions such as window managers and Grid management tools. Drivers and servers can be transparently intermixed and their locations are
94irrelevant; a server can be reimplemented as a driver with little if any code modification (the TCP/IP stack was originally a server but was moved into the kernel as a driver). For the purposes of this paper, one can consider Plan~9 to be a Unix-like operating
90system with a more compact code base than Unix systems, since a great deal of functionality is provided by user-level services, not kernel services. As mentioned, all file servers are external to the kernel; even the 95system with a more compact code base than Unix systems, since a great deal of functionality is provided by user-level services, not kernel services. As mentioned, all file servers are external to the kernel; even the
91RAMdisk 96RAMdisk
92device is implemented with a user-level process. 97device is implemented with a user-level process.
@@ -108,7 +113,7 @@ We show a simplified version of the normal path in Figure \ref{ospath}, and an O · 15 unmodified lines
108\end{figure}113\end{figure}
109The kernel driver is disabled, or, in some cases, removed; the functions of the driver are replaced by 114The kernel driver is disabled, or, in some cases, removed; the functions of the driver are replaced by
110an application or library. 115an application or library.
111All HPC systems in the "Top 50"\cite{top500}, and in fact most HPC systems in the Top 500, use OS bypass. Applications can not 116All HPC systems in the ``Top 50'', and in fact most HPC systems in the Top 500, use OS bypass. Applications can not
112achieve the needed performance if the operating system is involved in data movement for networking. 117achieve the needed performance if the operating system is involved in data movement for networking.
113 118
114OS Bypass is the network equivalent of what systems such as X Windows do for graphics. 119OS Bypass is the network equivalent of what systems such as X Windows do for graphics.
@@ -118,10 +123,10 @@ lowest possible level of hardware manipulation, requiring · 3 unmodified lines
118application libraries to replicate much of the operating systems123application libraries to replicate much of the operating systems
119capabilities in networking. 124capabilities in networking.
120 125
121HPC network software performance is frequently characterized in terms of "bits to the wire" (BTW) and "ping-pong latency". 126HPC network software performance is frequently characterized in terms of ``bits to the wire'' (BTW) and ``ping-pong latency''.
122Bits to The Wire is a measure of how long it takes, 127Bits to the wire is a measure of how long it takes
123from the time an application initiates128from the time an application initiates
124network I/O, for the bits to appear on the physical wire. Ping-pong latency 129network I/O for the bits to appear on the physical wire. Ping-pong latency
125is time it take a program to send a very small packet (ideally, one bit) from 130is time it take a program to send a very small packet (ideally, one bit) from
126one node to another, and get a response (usually also a bit). 131one node to another, and get a response (usually also a bit).
127These numbers are important as they greatly impact the performance of collectives (such as a global sum), 132These numbers are important as they greatly impact the performance of collectives (such as a global sum),
@@ -137,10 +142,10 @@ A problem with OS bypass is that the HPC network becomes a single-user device. B · 9 unmodified lines
137owns the network, that network becomes unusable to any other program or to the kernel. This exclusivity requires, in turn, that all142owns the network, that network becomes unusable to any other program or to the kernel. This exclusivity requires, in turn, that all
138HPC systems be provisioned with several networks, increasing cost and decreasing reliability. While the reduction in reliability is not obvious, one must consider 143HPC systems be provisioned with several networks, increasing cost and decreasing reliability. While the reduction in reliability is not obvious, one must consider
139that the two networks are not redundant; they are both needed for the application144that the two networks are not redundant; they are both needed for the application
140to run. A failure in either network aborts the application. Additional hardware can make the system less reliable. 145to run. A failure in either network aborts the application.
141 146
142Our work on Plan~9 for HPC has been to move the communications back into the kernel. The motivation 147Our work on Plan~9 for HPC has been to move the communications back into the kernel. The motivation
143for this work follows on measurements of the amount of code that has been written over the years for OS Bypass layers that recreates the functions of an operating system; 148for this work follows on measurements of the amount of code that has been written over the years for OS Bypass layers that recreates the functions of an operating system
144and the difficulty the systems have in making correct decisions about concurrrency, allocation, physical to virtual mappings, and other 149and the difficulty the systems have in making correct decisions about concurrrency, allocation, physical to virtual mappings, and other
145areas that are easy to do in a kernel and very hard to do in a library. As a result the libraries tend to be large and complex: the IBM Deep Computing Messaging Facility for Blue Gene, which is used to support150areas that are easy to do in a kernel and very hard to do in a library. As a result the libraries tend to be large and complex: the IBM Deep Computing Messaging Facility for Blue Gene, which is used to support
146higher-level libraries such as MPI, is 81,000 lines, as compared to 64,000 lines for the entire Plan~9 kernel for BG/P (as measured by David Wheeler's sloccount). 151higher-level libraries such as MPI, is 81,000 lines, as compared to 64,000 lines for the entire Plan~9 kernel for BG/P (as measured by David Wheeler's sloccount).
@@ -152,19 +157,11 @@ MPI libraries\footnote{MPI libraries are typically much larger than the Plan~9 k · 5 unmodified lines
152link in the DCMF. Any program which wishes to use the HPC network must be written as an MPI 157link in the DCMF. Any program which wishes to use the HPC network must be written as an MPI
153application. Not all applications can be written as MPI applications. Applications writers must recast their 158application. Not all applications can be written as MPI applications. Applications writers must recast their
154programs as MPI programs, even when that is not appropriate, because it is not practical 159programs as MPI programs, even when that is not appropriate, because it is not practical
155to reimplement the entire user-mode driver stack 160to reimplement the entire user-mode driver stack.
156Shells are not MPI applications; it makes161Shells are not MPI applications; it makes
157no sense whatsoever to turn the shell into an MPI application, as it has uses outside of MPI, such 162no sense whatsoever to turn the shell into an MPI application, as it has uses outside of MPI, such
158as starting MPI applications! As we showed above, making the networks available as real devices can be very useful. 163as starting MPI applications! As we showed above, making the networks available as real devices can be very useful.
159 164
160%Making network resources available as kernel-based files
161%makes them more accessible to all programs. Seperating the
162%implementation from the usage reduces the chance that simple application bugs will lock up the network.
163%Interrupts, errors, resources conflicts, and sharing can be managed by the kernel. That is why it
164%is there in the first place. But if these benefits come at too high a cost in performance, then we will have to give up
165%on using the kernel devices and forfeit this elegant model. The reason to use OS bypass is the cost of asking the kernel to
166%perform network I/O.
167
168One might think that the drivers, in order to equal the performance of OS bypass, need to impose a very 165One might think that the drivers, in order to equal the performance of OS bypass, need to impose a very
169low overhead -- in fact, no overhead at all: how can a code path that goes through the kernel possibly equal an166low overhead -- in fact, no overhead at all: how can a code path that goes through the kernel possibly equal an
170inlined write to a register? The overhead of a user level library can in fact be very high. As mentioned, the DCMF library is larger than Plan~9; the 167inlined write to a register? The overhead of a user level library can in fact be very high. As mentioned, the DCMF library is larger than Plan~9; the
@@ -204,7 +201,7 @@ used in the context of virtual machines. Device virtualization requires hardwar · 33 unmodified lines
204the addition of a so-called iommu\cite{iommu}. 201the addition of a so-called iommu\cite{iommu}.
205 202
206An older idea is to dynamically generate code as it is needed. For example, the code to read a certain file can 203An older idea is to dynamically generate code as it is needed. For example, the code to read a certain file can
207be generated on the fly, bypassing the layers of software stack. One implementaiton of this idea 204be generated on the fly, bypassing the layers of software stack. One implementation of this idea
208is found in Synthesis\cite{synthesis}. While the approach is intriguing, 205is found in Synthesis\cite{synthesis}. While the approach is intriguing,
209it has not proven to be practical, and the system itself was not widely used. 206it has not proven to be practical, and the system itself was not widely used.
210 207
@@ -227,7 +224,7 @@ adds a great deal of complexity, which results in bugs and security holes that a · 16 unmodified lines
227devices have taken on many of the attributes of an operating system, with threading, cache- and page-aligned resource allocation, 224devices have taken on many of the attributes of an operating system, with threading, cache- and page-aligned resource allocation,
228and failure and interrupt management. Multiple applications using multiple virtual network interfaces end up doing the same work, with the same225and failure and interrupt management. Multiple applications using multiple virtual network interfaces end up doing the same work, with the same
229libraries, resulting in increased memory cost, higher power consumption, and a general waste of resources all around. In the end, the applications 226libraries, resulting in increased memory cost, higher power consumption, and a general waste of resources all around. In the end, the applications
230can not do as good a job as the kernel, as they are not running in priveleged mode. Applications and libraries do not have access to227can not do as good a job as the kernel, as they are not running in privileged mode. Applications and libraries do not have access to
231virtual to physical page mappings, for example, and as a result they can not optimize memory layout as the kernel code. 228virtual to physical page mappings, for example, and as a result they can not optimize memory layout as the kernel code.
232 229
233\section{Our Approach}230\section{Our Approach}
@@ -256,12 +253,12 @@ In most cases, the steps outside the actual I/O itself are not expensive relativ · 22 unmodified lines
256sending packets over an Ethernet, or writing a disk, the fd and address validation are insignificant, a few microseconds at most. The picture changes completely with a slow processor (as the PowerPC 450 is) and a fast network, as we have on Blue Gene. Then, the overhead of setting up the arguments alone can dominate the overall time. A global barrier operaion across 65536 nodes can be done in 125 nanoseconds 253sending packets over an Ethernet, or writing a disk, the fd and address validation are insignificant, a few microseconds at most. The picture changes completely with a slow processor (as the PowerPC 450 is) and a fast network, as we have on Blue Gene. Then, the overhead of setting up the arguments alone can dominate the overall time. A global barrier operaion across 65536 nodes can be done in 125 nanoseconds
257on Blue Gene; that is 106 instructions. On these measurements, the cost of I/O is made in 1.2-nanosecond increments, and every one counts. 254on Blue Gene; that is 106 instructions. On these measurements, the cost of I/O is made in 1.2-nanosecond increments, and every one counts.
258 255
259As can be seen above, there is a lot of repeated work for each system call. It is reasonable to ask just how much the arguments vary for each write system call. How much of this work is unnecesary because we are validating the same parameters, over and over? 256As can be seen above, there is a lot of repeated work for each system call. It is reasonable to ask just how much the arguments vary for each write system call. How much of this work is unnecesary because we are validating the same parameters over and over?
260We instrumented the Plan~9 kernel and monitored 257We instrumented the Plan~9 kernel and monitored
261applications using a trace device\cite{iwp9:tracedevice}. We measured all the I/O performed by all processes over 258applications using a trace device\cite{iwp9:tracedevice}. We measured all the I/O performed by all processes over
262a 30 minute interval. We learned that, in general, programs read and write a small 259a 30 minute interval. We learned that, in general, programs read and write a small
263set of files over and over, from a very small set of virtual addresses, with a very limited and small range of sizes. This result makes intuitive sense: consider programs on Unix which use stdio, for example: file I/O is performed 260set of files over and over, from a very small set of virtual addresses, with a very limited and small range of sizes. This result makes intuitive sense: consider programs on Unix which use stdio, for example: file I/O is performed
264to an internal buffer which does not change, and the buffer size is usually limited to a page size or smaller. Other I/O addresses are almost always from the stack (i.e. an auto variable). Our measurements confirmat this intuition, at least for Plan~9. 261to an internal buffer which does not change, and the buffer size is usually limited to a page size or smaller. Other I/O addresses are almost always from the stack (i.e. an auto variable). Our measurements confirm this intuition, at least for Plan~9.
265 262
266We learned that the bulk of the time for basic device I/O with very small write sizes -- the type of operation common to collective operations -- was taken up in two functions: the one that validated an open file descriptor, and the one that validated an I/O address. 263We learned that the bulk of the time for basic device I/O with very small write sizes -- the type of operation common to collective operations -- was taken up in two functions: the one that validated an open file descriptor, and the one that validated an I/O address.
267The measurements indicate that we could benefit from caching active file descriptors and virtual address ranges in each process structure. Caching virtual to real translation information for just 32 address ranges would eliminate all page table walks for almost all process I/O. Caching just 8 file descriptors would eliminate almost all file descriptor validation operations. Of course, this caching would not cover some extreme cases (Apache), but it would cover the most common. 264The measurements indicate that we could benefit from caching active file descriptors and virtual address ranges in each process structure. Caching virtual to real translation information for just 32 address ranges would eliminate all page table walks for almost all process I/O. Caching just 8 file descriptors would eliminate almost all file descriptor validation operations. Of course, this caching would not cover some extreme cases (Apache), but it would cover the most common.
@@ -301,7 +298,7 @@ We will first digress into the nature of Curry functions, describe our changes t · 33 unmodified lines
301performance improvements we have seen. 298performance improvements we have seen.
302 299
303\subsection{Currying}300\subsection{Currying}
304The technique we are using is well known in mathematical circles, and is called currying. 301The technique we are using, Currying, is well known in mathematical circles.
305We will illustrate it by an example. 302We will illustrate it by an example.
306 303
307Given a function of two variables, $ f\left( x, y\right) = y/x$, 304Given a function of two variables, $ f\left( x, y\right) = y/x$,
@@ -309,7 +306,7 @@ one may create a new function, $g\left( x\right)$, · 1 unmodified line
309if $y$ is known, such that $g\left( x\right) = f\left( x, y\right)$. 306if $y$ is known, such that $g\left( x\right) = f\left( x, y\right)$.
310For example, if y is known to be 2, the function g might be $g\left( x\right) = f\left( x, 2\right)$. 307For example, if y is known to be 2, the function g might be $g\left( x\right) = f\left( x, 2\right)$.
311 308
312We are interested in applying this idea to two key system calls: read and write. Each takes a 309We were interested in applying this idea to two key system calls: read and write. Each takes a
313file descriptor, a pointer, a length, and an offset. 310file descriptor, a pointer, a length, and an offset.
314 311
315The application of currying was obvious: given a program which is calling a kernel function read or write function: $ f\left( fd, address, size\right) $, with 312The application of currying was obvious: given a program which is calling a kernel function read or write function: $ f\left( fd, address, size\right) $, with
@@ -396,7 +393,7 @@ When a system call interrupt is generated, the kernel typically checks if the sy · 80 unmodified lines
396The modifications described in the previous section can be considered as general purpose, in the sense 393The modifications described in the previous section can be considered as general purpose, in the sense
397that any device can be extended to take advantage of them. We have even created Curried pipes. 394that any device can be extended to take advantage of them. We have even created Curried pipes.
398 395
399In this section we consider specializations that are very specific to the Blue Gene Torus. These specializations extend the kernel in non-general ways, to accomodate an interface that is key to the performance of the machine. The extensions are inspired on Active Messages, and tailored to the needs of a graph application. 396In this section we consider specializations that are very specific to the Blue Gene Torus. These specializations extend the kernel in non-general ways, to accomodate an interface that is key to the performance of the machine. The extensions are inspired by Active Messages\cite{von1992active}, and tailored to the needs of a graph application.
400 397
401\subsubsection{The Graph Application: motivating intrusive changes}398\subsubsection{The Graph Application: motivating intrusive changes}
402 399
@@ -417,17 +414,17 @@ one machine. Such an intrusive change makes sense when the stringent requirement · 14 unmodified lines
417performance must be accomodated. 414performance must be accomodated.
418 415
419The receive side data management is more complex. Data transfer is performed in an interrupt 416The receive side data management is more complex. Data transfer is performed in an interrupt
420handler in the kernel, requiring a mapping between user space memory ring and kernel interrupt address space. 417handler in the kernel, requiring a mapping between the user space memory ring and kernel interrupt address space.
421The traditional Linux approach to sharing buffers between kernel and user space is via pinning. Pinning is a complicated 418The traditional Linux approach to sharing buffers between kernel and user space is via pinning. Pinning is a complicated
422operation which consumes a great deal of code -- there are almost as many lines of code to support 419operation which consumes a great deal of code -- there are almost as many lines of code to support
423pinning in Linux as there are in our entire kernel. 420pinning in Linux as there are in our entire kernel.
424In our non-traditional approach, the physical and virtual addresses are the same, and are in addition backed by a 421In our non-traditional approach, the physical and virtual addresses are the same, and are in addition backed by a
425256 Mbyte page table entry (TLB in PowerPC terms). 422256 Mbyte page table entry (TLB in PowerPC terms).
426We call this address area the "P==V" space. In our kernel, it is used to back the so-called "BSS", or heap, area, of a program. It is implicitly423We call this address area the "P=V" space. In our kernel, it is used to back the so-called "BSS", or heap, area, of a program. It is implicitly
427shared: any references to memory in this part of the virtual address space are backed by the same memory. 424shared: any references to memory in this part of the virtual address space are backed by the same memory.
428 425
429Only a few processes, and usually only one, need to use the P==V space. 426Only a few processes, and usually only one, need to use the P=V space.
430Our kernel limits the use of the P==V space to application processes which are compiled for the427Our kernel limits the use of the P=V space to application processes which are compiled for the
431IBM Blue Gene "compute node kernel". These428IBM Blue Gene "compute node kernel". These
432processes are run using an emulation environment\cite{plan9bgp}, and are set up with the P=V 429processes are run using an emulation environment\cite{plan9bgp}, and are set up with the P=V
433space as their heap segment. Standard runtime software such as malloc runs quite normally with this 430space as their heap segment. Standard runtime software such as malloc runs quite normally with this
@@ -449,7 +446,6 @@ struct AmRing { · 15 unmodified lines
449\end{verbatim}446\end{verbatim}
450\caption{\label{ring}Shared memory ring for receive packets.}447\caption{\label{ring}Shared memory ring for receive packets.}
451\end{figure}448\end{figure}
452
453The base is simply a pointer to the base of memory, which consists of a block of 256-byte Torus packets. 449The base is simply a pointer to the base of memory, which consists of a block of 256-byte Torus packets.
454The size and logN are different descriptions of the size, provided in each form for convenience;450The size and logN are different descriptions of the size, provided in each form for convenience;
455 the size must be 256 bytes or more, and always a power of 2. Prod451 the size must be 256 bytes or more, and always a power of 2. Prod
@@ -503,7 +499,7 @@ functionality is moved into the network interface itself, as in Infiniband inter · 47 unmodified lines
503Frequently, the performance of OS bypass is cited without taking into account the high overhead of these user-level operating systems, and the problems inherent in creating layers of redundant functions between the operating system and programs. 499Frequently, the performance of OS bypass is cited without taking into account the high overhead of these user-level operating systems, and the problems inherent in creating layers of redundant functions between the operating system and programs.
504 500
505This paper shows an alternative to the false choice of slow operating systems paths or fast user-level operating systems paths. It is possible to use a general-purpose operating system for I/O and still achieve high performance. While we are not yet equalling the user-level MPI libraries, we are coming from behind, as the user-level libraries and associated network hardware have benefited from 20 years of co-design. 501This paper shows an alternative to the false choice of slow operating systems paths or fast user-level operating systems paths. It is possible to use a general-purpose operating system for I/O and still achieve high performance. While we are not yet equalling the user-level MPI libraries, we are coming from behind, as the user-level libraries and associated network hardware have benefited from 20 years of co-design.
506We wonder what would be possible were the operating system and the hardware designed together, with high performance IO in mind. 502We wonder what would be possible were the operating system and the hardware designed together, with high performance I/O in mind.
507 503
508\section{Acknowledgements}504\section{Acknowledgements}
509This work is support by the DOE Office of Advanced Scientific Computing Research. IBM has provided support from 2006 to the present. This research used resources of the Argonne Leadership Computing Facility505This work is support by the DOE Office of Advanced Scientific Computing Research. IBM has provided support from 2006 to the present. This research used resources of the Argonne Leadership Computing Facility
sys/doc/CURRY/standard.ps+1−1
@@ -1,6 +1,6 @@
1%!PS-Adobe-3.01%!PS-Adobe-3.0
2%%Creator: groff version 1.212%%Creator: groff version 1.21
3%%CreationDate: Thu Apr 14 15:33:36 20113%%CreationDate: Thu Apr 14 17:11:54 2011
4%%DocumentNeededResources: font Times-Roman4%%DocumentNeededResources: font Times-Roman
5%%DocumentSuppliedResources: procset grops 1.21 05%%DocumentSuppliedResources: procset grops 1.21 0
6%%Pages: 16%%Pages: 1