Date: Thu, 15 May 2014 14:23:36 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r266127 - projects/numa/sys/vm Message-ID: <201405151423.s4FENa6T018429@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <vm/_vm_domain.h> #include <sys/bitset.h> +#include <vm/_vm_domain.h> + #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 <sys/_mutex.h> #include <sys/_rwlock.h> -#include <vm/_vm_radix.h> #include <vm/_vm_domain.h> +#include <vm/_vm_radix.h> /* * 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405151423.s4FENa6T018429>