From owner-freebsd-smp Sat Dec 14 10:00:18 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA21397 for smp-outgoing; Sat, 14 Dec 1996 10:00:18 -0800 (PST) Received: from uruk.org (root@faustus.dev.com [198.145.95.253]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id KAA21390 for ; Sat, 14 Dec 1996 10:00:14 -0800 (PST) Received: from uruk.org [127.0.0.1] (erich) by uruk.org with esmtp (Exim 0.53 #1) id E0vYzLc-0004xo-00; Sat, 14 Dec 1996 11:02:08 -0800 To: haertel@ichips.intel.com cc: smp@freebsd.org, dg@root.com Subject: Re: some questions concerning TLB shootdowns in FreeBSD In-reply-to: Your message of "Sat, 14 Dec 1996 09:25:51 PST." <9612141725.AA57406@pdxcs078.intel.com> Date: Sat, 14 Dec 1996 11:02:08 -0800 From: Erich Boleyn Message-Id: Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk haertel@ichips.intel.com (Mike Haertel) writes: > >I'm still digesting it, I am almost worried that we might (shudder!) > >be forced into doing an IPI to stop all the cpu's *before* the > >current cpu changes the page tables, then letting them do the tlb > >flush and letting them proceed. If this actually is a real problem > >this means a much bigger code impact. > > You must do precisely this. > > The x86 architecture includes some complex instructions that > reference the same memory locations more than once--read-modify-write > sequences are the most obvious example. For various reasons, > there is no guarantee that the TLB entries associated with those > memory locations are locked in the TLB, and so they might be > thrashed out due to other activity while those complex instructions > are executing. If, in the meantime, some other processor > has manipulated the associated PTE in any way that lowers privilege > or changes the mapping, this processor could get a page fault > in a *non restartable* way, since it would see the mapping and/or > privilege changing under foot, but have already committed to > finishing the instruction (since the privilege checks are > normally only done at the beginning of the instruction). Urk! Thanks for clarifying this. I'm curious as to why this hasn't been a problem on Linux-SMP ... -- Erich Stefan Boleyn \_ E-mail (preferred): Mad Genius wanna-be, CyberMuffin \__ (finger me for other stats) Web: http://www.uruk.org/~erich/ Motto: "I'll live forever or die trying"