From owner-svn-src-stable-8@FreeBSD.ORG Wed Mar 24 09:45:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70973106566B; Wed, 24 Mar 2010 09:45:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43ED28FC14; Wed, 24 Mar 2010 09:45:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2O9jINH057471; Wed, 24 Mar 2010 09:45:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2O9jI4j057468; Wed, 24 Mar 2010 09:45:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003240945.o2O9jI4j057468@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 24 Mar 2010 09:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205582 - in stable/8/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2010 09:45:18 -0000 Author: kib Date: Wed Mar 24 09:45:17 2010 New Revision: 205582 URL: http://svn.freebsd.org/changeset/base/205582 Log: MFC r204957: Fall back to wbinvd when region for CLFLUSH is >= 2MB. MFC r205334 (by avg): Fix a typo in a comment. Modified: stable/8/sys/amd64/amd64/pmap.c stable/8/sys/i386/i386/pmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/net/ (props changed) stable/8/sys/netinet/ipfw/ (props changed) Modified: stable/8/sys/amd64/amd64/pmap.c ============================================================================== --- stable/8/sys/amd64/amd64/pmap.c Wed Mar 24 09:27:12 2010 (r205581) +++ stable/8/sys/amd64/amd64/pmap.c Wed Mar 24 09:45:17 2010 (r205582) @@ -941,7 +941,8 @@ pmap_invalidate_cache_range(vm_offset_t if (cpu_feature & CPUID_SS) ; /* If "Self Snoop" is supported, do nothing. */ - else if (cpu_feature & CPUID_CLFSH) { + else if ((cpu_feature & CPUID_CLFSH) != 0 && + eva - sva < 2 * 1024 * 1024) { /* * Otherwise, do per-cache line flush. Use the mfence @@ -958,7 +959,8 @@ pmap_invalidate_cache_range(vm_offset_t /* * No targeted cache flush methods are supported by CPU, - * globally invalidate cache as a last resort. + * or the supplied range is bigger than 2MB. + * Globally invalidate cache. */ pmap_invalidate_cache(); } Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Wed Mar 24 09:27:12 2010 (r205581) +++ stable/8/sys/i386/i386/pmap.c Wed Mar 24 09:45:17 2010 (r205582) @@ -982,7 +982,8 @@ pmap_invalidate_cache_range(vm_offset_t if (cpu_feature & CPUID_SS) ; /* If "Self Snoop" is supported, do nothing. */ - else if (cpu_feature & CPUID_CLFSH) { + else if ((cpu_feature & CPUID_CLFSH) != 0 && + eva - sva < 2 * 1024 * 1024) { /* * Otherwise, do per-cache line flush. Use the mfence @@ -999,7 +1000,8 @@ pmap_invalidate_cache_range(vm_offset_t /* * No targeted cache flush methods are supported by CPU, - * globally invalidate cache as a last resort. + * or the supplied range is bigger than 2MB. + * Globally invalidate cache. */ pmap_invalidate_cache(); }