From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id BFEF13F19C for ; Wed, 18 Sep 2002 19:54:44 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g8INsiw00683 for axp-list@listman.redhat.com; Wed, 18 Sep 2002 19:54:44 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id g8INsih00679 for ; Wed, 18 Sep 2002 19:54:44 -0400 Received: from evrtwa1-ar5-4-65-011-025.evrtwa1.dsl-verizon.net (evrtwa1-ar5-4-65-011-025.evrtwa1.dsl-verizon.net [4.65.11.25]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g8INbVi19168 for ; Wed, 18 Sep 2002 19:37:31 -0400 Received: (from rob@localhost) by evrtwa1-ar5-4-65-011-025.evrtwa1.dsl-verizon.net (8.11.6/8.11.6) id g8INsbG22713 for axp-list@redhat.com; Wed, 18 Sep 2002 16:54:37 -0700 Date: Wed, 18 Sep 2002 16:54:37 -0700 From: "Robert M. Riches Jr." Message-Id: <200209182354.g8INsbG22713@evrtwa1-ar5-4-65-011-025.evrtwa1.dsl-verizon.net> To: axp-list@redhat.com Subject: Re: Linux Super Page presentation in USA X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: > From: Uncle George > Date: Wed, 18 Sep 2002 19:37:28 -0400 > > Ok, so where & when does the majic come about? It would seem that a 42% > savings can always be achieved if one uses (multiples of ) 64k . AND I > would presume that the bean counters have already found this out. Based on what has been discussed here on the list, along with my 17 years of experience in processor design, it appears the benefit is through a reduction in TLB misses and therefore a reduction in the CPU time spent/wasted walking the page table to update the TLB. When making random-like access to a huge amount of data, many of the memory accesses will be to pages that haven't been accessed recently, which means that page table entry won't be in the TLB. This means the processor has to stop, walk the page tables, update the TLB with the needed page table entry, and then retry the instruction. (Historically, some processors have done the page walk in microcode, while a few have done it with hardware finite state machines. I don't know how the Alpha implementations have done it--perhaps in PAL code.) If you're using a huge data array and accessing it semi-randomly, many if not most data accesses will miss the TLB, which can slow down execution by several times, depending on the specifics of the processor implementation. By making each TLB entry count for 8 pages instead of 1, the probability of getting a TLB hit (rather than a TLB miss) for each data access does up. Thus, the amount of time spent or wasted in the page table walker will be reduced, which will speed up the execution of the intended program. Did that make sense, or was the above rambling unclear? :-) For a much more organized explanation of things related to TLBs and such, a good reference is pages 443-453 of the 2nd edition of Hennessy & Patterson's "Computer Architecture, a Quantative Approach". Robert Riches rm.riches@verizon.net