From owner-cvs-all@FreeBSD.ORG Tue Nov 2 09:09:34 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2599316A4D1 for ; Tue, 2 Nov 2004 09:09:34 +0000 (GMT) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 183A943D55 for ; Tue, 2 Nov 2004 09:09:33 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 74733 invoked from network); 2 Nov 2004 09:06:02 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.54]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 2 Nov 2004 09:06:02 -0000 Message-ID: <41874ED1.662A02@freebsd.org> Date: Tue, 02 Nov 2004 10:09:37 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: John Baldwin References: <200410291910.i9TJAlNf089795@repoman.freebsd.org> <200410291549.17355.jhb@FreeBSD.org> <20041029174131.A6530@odysseus.silby.com> <200411011434.28141.jhb@FreeBSD.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: Alan Cox cc: cvs-src@FreeBSD.org cc: Mike Silbersack cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 pmap.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2004 09:09:34 -0000 John Baldwin wrote: > > That's very easy, it's just critical_enter/exit() without the > cpu_critical_*(). As mentioned in the SMP "design doc", the cpu_critical_*() > are only needed for spin mutexes that are used in both top-half and > bottom-half code (where ithreads are top-half, but "fast" interrupts and the > code that schedules ithreads are bottom-half). I've thought about shoving > cpu_critical_*() off into another API that spin mutexes would use, but that > not all critical sections would use, this would give us critical sections > that don't block interrupts, but just block preempting. For idle page > zeroing though, I'm not sure we really want to use even a cheap critical > section since it would still defer an ithread from running, and ithreads are > more important than idle page zeroing. > > Note that you can easily pin the current thread to its current CPU via > sched_pin/unpin() and that that works across preemptions. Does this involve any mutexes or so? This is very interesting for a couple of cases in the network stack which uses a lot of heavy-weight mutexes at the moment. -- Andre