From owner-freebsd-current@FreeBSD.ORG Tue Jul 25 12:54:55 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F4E316A4DD; Tue, 25 Jul 2006 12:54:55 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2952943D4C; Tue, 25 Jul 2006 12:54:55 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 7E5955D44; Tue, 25 Jul 2006 08:54:54 -0400 (EDT) X-Virus-Scanned: amavisd-new at codefab.com Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iqH3fHn2vw0Y; Tue, 25 Jul 2006 08:54:53 -0400 (EDT) Received: from [192.168.1.251] (pool-68-161-117-245.ny325.east.verizon.net [68.161.117.245]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id BC9565CB5; Tue, 25 Jul 2006 08:54:52 -0400 (EDT) Message-ID: <44C61492.6020808@mac.com> Date: Tue, 25 Jul 2006 08:54:42 -0400 From: Chuck Swiger User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: "Michael C. Wu" References: <44C5BBB4.8080102@freebsd.org> In-Reply-To: <44C5BBB4.8080102@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: amd64 page fault situation X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2006 12:54:55 -0000 Michael C. Wu wrote: > Suppose that there is an op code on amd64 that calls for a 64bit word. > This word crosses a page boundary. i.e. The first byte or 2 of the word > is on the last part of the page, and the second part of the word > is on the next page. > > Do we just have a TLB miss or page miss? If the second part of the opcode is in a page which is resident in physical RAM & present in the TLB, neither. Otherwise the system will query the TLB, and if it doesn't find an entry, it will then scan the page tables. If the entry is found, the CPU will load that entry into the TLB and retry the instruction. If not, that becomes a page fault and the system will have to read in the requested frame of memory from secondary storage and retry the opcode... -- -Chuck