From owner-svn-src-projects@FreeBSD.ORG Thu May 15 14:23:37 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48616C0E; Thu, 15 May 2014 14:23:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 295C42D67; Thu, 15 May 2014 14:23:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FENbrX018436; Thu, 15 May 2014 14:23:37 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FENa6T018429; Thu, 15 May 2014 14:23:36 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201405151423.s4FENa6T018429@svn.freebsd.org> From: Attilio Rao Date: Thu, 15 May 2014 14:23:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r266127 - projects/numa/sys/vm X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 14:23:37 -0000 Author: attilio Date: Thu May 15 14:23:36 2014 New Revision: 266127 URL: http://svnweb.freebsd.org/changeset/base/266127 Log: Fix style bugs: o Remove added white lines and add trimmed ones o Fix description of functions o Sort headers o Use consistently MAXMEMDOM > 1 Modified: projects/numa/sys/vm/vm_domain.h projects/numa/sys/vm/vm_object.c projects/numa/sys/vm/vm_object.h projects/numa/sys/vm/vm_phys.h Modified: projects/numa/sys/vm/vm_domain.h ============================================================================== --- projects/numa/sys/vm/vm_domain.h Thu May 15 14:20:27 2014 (r266126) +++ projects/numa/sys/vm/vm_domain.h Thu May 15 14:23:36 2014 (r266127) @@ -29,9 +29,10 @@ #ifndef _VM_DOMAIN_H_ #define _VM_DOMAIN_H_ -#include #include +#include + #define VM_DOMAIN_CLR(n, p) BIT_CLR(VM_DOMAIN_SETSIZE, n, p) #define VM_DOMAIN_COPY(f, t) BIT_COPY(VM_DOMAIN_SETSIZE, f, t) #define VM_DOMAIN_ISSET(n, p) BIT_ISSET(VM_DOMAIN_SETSIZE, n, p) Modified: projects/numa/sys/vm/vm_object.c ============================================================================== --- projects/numa/sys/vm/vm_object.c Thu May 15 14:20:27 2014 (r266126) +++ projects/numa/sys/vm/vm_object.c Thu May 15 14:23:36 2014 (r266127) @@ -258,6 +258,7 @@ _vm_object_allocate(objtype_t type, vm_p #if VM_NRESERVLEVEL > 0 LIST_INIT(&object->rvq); #endif + mtx_lock(&vm_object_list_mtx); TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); mtx_unlock(&vm_object_list_mtx); @@ -1257,7 +1258,7 @@ vm_object_shadow( result->pg_color = (source->pg_color + OFF_TO_IDX(*offset)) & ((1 << (VM_NFREEORDER - 1)) - 1); #endif -#if MAXMEMDOM > 0 +#if MAXMEMDOM > 1 result->selector = source->selector; #endif VM_OBJECT_WUNLOCK(source); @@ -1301,7 +1302,7 @@ vm_object_split(vm_map_entry_t entry) * into a swap object. */ new_object = vm_object_allocate(OBJT_DEFAULT, size); -#if MAXMEMDOM > 0 +#if MAXMEMDOM > 1 new_object->selector = orig_object->selector; #endif Modified: projects/numa/sys/vm/vm_object.h ============================================================================== --- projects/numa/sys/vm/vm_object.h Thu May 15 14:20:27 2014 (r266126) +++ projects/numa/sys/vm/vm_object.h Thu May 15 14:23:36 2014 (r266127) @@ -72,8 +72,8 @@ #include #include -#include #include +#include /* * Types defined: @@ -294,7 +294,6 @@ void vm_object_shadow (vm_object_t *, vm void vm_object_split(vm_map_entry_t); boolean_t vm_object_sync(vm_object_t, vm_ooffset_t, vm_size_t, boolean_t, boolean_t); - #endif /* _KERNEL */ #endif /* _VM_OBJECT_ */ Modified: projects/numa/sys/vm/vm_phys.h ============================================================================== --- projects/numa/sys/vm/vm_phys.h Thu May 15 14:20:27 2014 (r266126) +++ projects/numa/sys/vm/vm_phys.h Thu May 15 14:23:36 2014 (r266127) @@ -107,6 +107,11 @@ vm_phys_domain(vm_page_t m) #endif } +/* + * vm_page_domain: + * + * Return the memory domain structure the page belongs to. + */ static inline struct vm_domain * vm_page_domain(vm_page_t m) {