Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 27 Aug 2002 17:14:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 27 Aug 2002 17:14:18 -0400 Received: from quark.didntduck.org ([216.43.55.190]:45073 "EHLO quark.didntduck.org") by vger.kernel.org with ESMTP id ; Tue, 27 Aug 2002 17:14:17 -0400 Message-ID: <3D6BEC8A.5030905@didntduck.org> Date: Tue, 27 Aug 2002 17:18:02 -0400 From: Brian Gerst User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Linus Torvalds CC: Hugh Dickins , Dave Jones , Marc Dietrich , linux-kernel@vger.kernel.org Subject: Re: [PATCH] M386 flush_one_tlb invlpg References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1392 Lines: 39 Linus Torvalds wrote: > On Tue, 27 Aug 2002, Hugh Dickins wrote: > >>I just sent the 2.4.20-pre4 asm-i386/pgtable.h patch to Marcelo: >>here's patch against 2.5.31 or current BK: please apply. > > > This test is senseless, in my opinion: > > >>+ if (cpu_has_pge) \ >>+ __flush_tlb_single(addr); \ > > > The test _should_ be for something like > > if (cpu_has_invlpg) > __flush_tlb_single(addr); > > since we want to use the invlpg instruction regardless of any PGE issues > if it is available. > > There's another issue, which is the fact that I do not believe that invlpg > is even guaranteed to invalidate a G page at all - although obviously all > current CPU's seem to work that way. However, I don't see that documented > anywhere. P4 System Programming Guide, Section 10.9: The INVLPG instruction invalidates the TLB for a specific page. This instruction is the most efficient in cases where software only needs to invalidate a specific page, because it improves performance over invalidating the whole TLB. This instruction is not affected by the state of the G flag in a page-directory or page-table entry. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/