From IXP2400/2800 Programming: The Complete Microengine Coding Guide

Overview

At this point, we have created a complete packet-processing application, but it s pretty slow. With the sample microengine assembly from Chapter 6, the microengine that processes packets is actually executing instructions for less than 10% of the time. The rest of the time is spent waiting for memory references, queue operations, and hashes. With the techniques described in this chapter, and the sample code on the CD, you can raise that utilization and increase packet throughput.

In this chapter, you ll learn how to make the packet-processing code run on multiple threads and multiple microengines. You get some performance benefit from these changes, but because you are still running with single-threaded receive code and single-threaded transmit code, the performance will not yet be as good as you might hope for. The higher performance will come in Chapter 11, when you add multithreaded receive and transmit code to this multi-threaded packet-processing code.

Two programming models exist for running the same series of packet-processing components on multiple threads. These programming models are called ordered thread execution and unordered thread execution. This chapter shows the unordered thread execution model of programming. In some previous Intel literature, the unordered thread execution model is called Pool of Threads. The models are exactly alike. In Chapter 3, we described the basics of both of these programming models. After reading this chapter and Chapter 9, you should understand these two models well enough to decide which model works best for your application.

Multiple Threads

The code in...

Copyright Intel Corporation 2003 under license agreement with Books24x7

Products & Services
Thread Rolling Dies
Thread rolling dies are used to cold-form external threads or splines by pressing a hardened die into a rotating workpiece. Thread rolling produces stronger threads than those machined with a cutting tool and is generally less expensive.
Pneumatic Fittings
Pneumatic fittings are parts used to connect sections of pipe, tube, and hose in pneumatic (pressurized gas) lines and systems.
Thread Rolling Machines
Thread rolling machines generate threads by displacing and flowing metal into a thread shape.
Thread Mills
Thread mills are rotating, multi-point tools that are used to produce internal or external threads. They resemble end mills or drill bits, and may be capable of producing multiple threads with a single cut. Thread mills area an alternative to thread cutting or thread forming.
Thread Chasers and Thread Restorers
Thread Chasers and Tread Restoring tools are used to re-form or re-cut threads

Topics of Interest

Overview In Chapter 7, we wrote code under the assumption that the code must be able to run on any number of microengines. This assumption is appropriate for most processing code, like that of...

In Chapter 7, you learned about one model for processing packets on multiple threads and multiple microengines called unordered thread execution. This chapter describes another programming model for...

Now that you have read all about using multiple threads to process packets, let s apply this knowledge to the receive and transmit tasks. In Chapter 5, we developed single-threaded receive and...

Overview The goal of this chapter is to convey the techniques available for intermicroengine programming. This will be done by completing the packet counting examples started in Chapter 5 and 6. By...

Overview The goal of this chapter is to extend the single-threaded concepts of the previous chapter to the multithreaded environment within a single-microengine. By the end of the chapter, you...