From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,45b50f14dadfce5b X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,45b50f14dadfce5b X-Google-Attributes: gid1164f8,public X-Google-Thread: 110292,45b50f14dadfce5b X-Google-Attributes: gid110292,public From: "Andy \"Krazy\" Glew" Subject: Re: Final kick at the "Merced Guessing Game" Date: 1997/10/05 Message-ID: <3437F16A.C21B0159@cs.wisc.edu>#1/1 X-Deja-AN: 278071605 References: <3431A2DB.4273@EasyInternet.net> <01bcd02b$58e67280$0200000a@kld_mcs> <613p2b$g1r$1@lyra.csx.cam.ac.uk> <6157jp$at5$1@lyra.csx.cam.ac.uk> To: Nick Maclaren Organization: Computer Sciences Department, University of Wisconsin-Madison - and Intel Microcomputer Research Labs Reply-To: glew@cs.wisc.edu Newsgroups: comp.sys.intel,comp.arch,comp.sys.dec > I am, unfortunately, not joking when I say that there are critical paths > in the X Windowing System etc. that need that sort of optimisation for > efficiency. And remember that the address calculations will, in general, > need both addition and multiplication units. Most foully, the paths can > run ahead at different rates, and you STILL have to get interruption > and recovery right :-( Actually, precise interrupts seem to be a solved problem. There is some residual advantage to imprecise interrupts and exceptions, as in Alpha, but it mainly relates to buffer sizes. Further applications of the exception hierarchy (see the earlier thread on out-of-order retirement) narrow it further, and, in fact, seem to surpass exposed imprecise interrupts. > Naturally, I could be wrong, but I understood the Pentium XXX designs to > include only very limited speculative execution facilities. If I am > wrong, I am pretty certain of the following: Depends on what you mean by limited: The Pentium Pro and Pentium II have a ReOrder Buffer of 40 instructions, a load buffer of 16 (?), and a store buffer of 12. The reservation station size is 20. Thus, 20 instructions can be waiting to execute at any time. At least an additional 20 may have executed, and be waiting for the oldest to execute. In addition, there are many more pipestages of instructions in the process of being fetched. There is no limit on how many predicted branches may be speculated past. I.e. every entry in the reorder buffer, and all the instructions in earlier pipestages, may be correctly predicted branches. Cache misses can be performed speculatively: L1 I and D, L2. TLB misses can be performed speculatively. Stores are not performed speculatively. Nor are accesses to memory mapped I/O and ordinary I/O spaces. Is this "significant" speculative execution? I think that it is under any reasonable definition of significant. It is not, of course, eager execution. What's left is increasing the size of buffers, and tuning the algorithms to be more efficient of resources. The only significant restrictions on speculative execution are (1) I/O not being done speculatively - which, by the way, I think can now be done away with. (2) The single Instruction Pointer (Program Counter) for instruction fetch. and maybe (3) The Pentium Pro family's mispredicted branch recovery is not so efficient. If code is divided into segments between mispredicted branches, P6 can only have one such segment under execution at any time (mo9dulo a limited amount of overlap). This wasn't a limitation in our pipeline because the latencies worked out right, and it should be obvious how it can be fixed. > 1) Interrupt handling has been broken again (though this is getting > be an Intel tradition, and they have got it codified in standards). Depends. The APIC did break some interrupt code, but this was an APIC(Advanced Programmable Interrupt Controller) issue, introduced in the i486 generation and standardized in the Pentium (P54C) generation. Not an issue with the dynamic execution model of the P6 (out-of-order, speculative). > 2) EITHER Intel have reinvented the "Model 91 pipe-line drain" > instruction under another name OR I could write a valid C program that > would execute incorrectly. Nope. "Serializing instructions" do exist. But almost nobody uses them. I don't think that you can write a valid uniprocessor C program that will break.