From owner-svn-src-all@FreeBSD.ORG Wed May 8 03:21:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 023FCA7A; Wed, 8 May 2013 03:21:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) by mx1.freebsd.org (Postfix) with ESMTP id 06BD4122; Wed, 8 May 2013 03:21:07 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id h11so4759171wiv.2 for ; Tue, 07 May 2013 20:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=3lIliZfZRZ1aCSDsklnavQDAKIL0SD17rl1GJJym7j0=; b=lvMJLDtpLGYKY3HH3MrxvDtsOLKZXHmYO935biO5G1oTEWtYJDu4LmXSHFj8p4q5YG VolP/+kAw9q37IopOks3toKl3UfUoIV/TkFTrBDWG15eO0a2USSgUhme3MgmKH1Fbh4o ZilBnrbpVeuLOIZCvp2bKDTsTfh+MQu7sylKQ2dHBw2IOtbBCsqM3PbZKKHiU5q4w5Ja Z4UODZodSZLuxritjSTcliOjucoxOHDguFvkahC09RqJYPar9J8sZty47MwQ9obs/k1E p3AK4+OpJbeNnFa3Mm6dUOpFA5AOTjSM3FdRsIgubMh+FIAn3UOrtYiB2o2hSgghX0DH PiGQ== MIME-Version: 1.0 X-Received: by 10.180.212.3 with SMTP id ng3mr7121136wic.22.1367983267074; Tue, 07 May 2013 20:21:07 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.58.138 with HTTP; Tue, 7 May 2013 20:21:06 -0700 (PDT) In-Reply-To: <201305072246.r47MkPUH009225@svn.freebsd.org> References: <201305072246.r47MkPUH009225@svn.freebsd.org> Date: Tue, 7 May 2013 20:21:06 -0700 X-Google-Sender-Auth: AzRZkmcToH8LzffEL6O6c1l7F5c Message-ID: Subject: Re: svn commit: r250338 - in head/sys: amd64/include arm/include conf i386/include ia64/include mips/include powerpc/include sparc64/include vm x86/acpica From: Adrian Chadd To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 May 2013 03:21:09 -0000 Hi, This broke a fresh buildworld for me. sys/vm/vm_phys.c still references VM_NDOMAIN. Thanks, Adrian On 7 May 2013 15:46, Attilio Rao wrote: > Author: attilio > Date: Tue May 7 22:46:24 2013 > New Revision: 250338 > URL: http://svnweb.freebsd.org/changeset/base/250338 > > Log: > Rename VM_NDOMAIN into MAXMEMDOM and move it into machine/param.h in > order to match the MAXCPU concept. The change should also be useful > for consolidation and consistency. > > Sponsored by: EMC / Isilon storage division > Obtained from: jeff > Reviewed by: alc > > Modified: > head/sys/amd64/include/param.h > head/sys/amd64/include/vmparam.h > head/sys/arm/include/param.h > head/sys/arm/include/vmparam.h > head/sys/conf/NOTES > head/sys/conf/options > head/sys/i386/include/param.h > head/sys/i386/include/vmparam.h > head/sys/ia64/include/param.h > head/sys/ia64/include/vmparam.h > head/sys/mips/include/param.h > head/sys/mips/include/vmparam.h > head/sys/powerpc/include/param.h > head/sys/powerpc/include/vmparam.h > head/sys/sparc64/include/param.h > head/sys/sparc64/include/vmparam.h > head/sys/vm/vm_phys.c > head/sys/x86/acpica/srat.c > > Modified: head/sys/amd64/include/param.h > ============================================================================== > --- head/sys/amd64/include/param.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/amd64/include/param.h Tue May 7 22:46:24 2013 (r250338) > @@ -71,6 +71,10 @@ > #define MAXCPU 1 > #endif > > +#ifndef MAXMEMDOM > +#define MAXMEMDOM 1 > +#endif > + > #define ALIGNBYTES _ALIGNBYTES > #define ALIGN(p) _ALIGN(p) > /* > > Modified: head/sys/amd64/include/vmparam.h > ============================================================================== > --- head/sys/amd64/include/vmparam.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/amd64/include/vmparam.h Tue May 7 22:46:24 2013 (r250338) > @@ -121,13 +121,6 @@ > #define VM_NFREEORDER 13 > > /* > - * Only one memory domain. > - */ > -#ifndef VM_NDOMAIN > -#define VM_NDOMAIN 1 > -#endif > - > -/* > * Enable superpage reservations: 1 level. > */ > #ifndef VM_NRESERVLEVEL > > Modified: head/sys/arm/include/param.h > ============================================================================== > --- head/sys/arm/include/param.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/arm/include/param.h Tue May 7 22:46:24 2013 (r250338) > @@ -80,6 +80,10 @@ > #define MAXCPU 1 > #endif /* SMP || KLD_MODULE */ > > +#ifndef MAXMEMDOM > +#define MAXMEMDOM 1 > +#endif > + > #define ALIGNBYTES _ALIGNBYTES > #define ALIGN(p) _ALIGN(p) > /* > > Modified: head/sys/arm/include/vmparam.h > ============================================================================== > --- head/sys/arm/include/vmparam.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/arm/include/vmparam.h Tue May 7 22:46:24 2013 (r250338) > @@ -109,13 +109,6 @@ > #define VM_NFREEORDER 9 > > /* > - * Only one memory domain. > - */ > -#ifndef VM_NDOMAIN > -#define VM_NDOMAIN 1 > -#endif > - > -/* > * Disable superpage reservations. > */ > #ifndef VM_NRESERVLEVEL > > Modified: head/sys/conf/NOTES > ============================================================================== > --- head/sys/conf/NOTES Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/conf/NOTES Tue May 7 22:46:24 2013 (r250338) > @@ -224,6 +224,10 @@ options SMP # Symmetric MultiProcesso > # A default value should be already present, for every architecture. > options MAXCPU=32 > > +# MAXMEMDOM defines the maximum number of memory domains that can boot in the > +# system. A default value should already be defined by every architecture. > +options MAXMEMDOM=1 > + > # ADAPTIVE_MUTEXES changes the behavior of blocking mutexes to spin > # if the thread that currently owns the mutex is executing on another > # CPU. This behavior is enabled by default, so this option can be used > > Modified: head/sys/conf/options > ============================================================================== > --- head/sys/conf/options Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/conf/options Tue May 7 22:46:24 2013 (r250338) > @@ -568,6 +568,7 @@ DIAGNOSTIC opt_global.h > INVARIANT_SUPPORT opt_global.h > INVARIANTS opt_global.h > MAXCPU opt_global.h > +MAXMEMDOM opt_global.h > MAXPHYS opt_global.h > MCLSHIFT opt_global.h > MUTEX_DEBUG opt_global.h > @@ -584,7 +585,6 @@ VFS_BIO_DEBUG opt_global.h > VM_KMEM_SIZE opt_vm.h > VM_KMEM_SIZE_SCALE opt_vm.h > VM_KMEM_SIZE_MAX opt_vm.h > -VM_NDOMAIN opt_vm.h > VM_NRESERVLEVEL opt_vm.h > VM_LEVEL_0_ORDER opt_vm.h > NO_SWAPPING opt_vm.h > > Modified: head/sys/i386/include/param.h > ============================================================================== > --- head/sys/i386/include/param.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/i386/include/param.h Tue May 7 22:46:24 2013 (r250338) > @@ -64,6 +64,10 @@ > #define MAXCPU 1 > #endif /* SMP || KLD_MODULE */ > > +#ifndef MAXMEMDOM > +#define MAXMEMDOM 1 > +#endif > + > #define ALIGNBYTES _ALIGNBYTES > #define ALIGN(p) _ALIGN(p) > /* > > Modified: head/sys/i386/include/vmparam.h > ============================================================================== > --- head/sys/i386/include/vmparam.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/i386/include/vmparam.h Tue May 7 22:46:24 2013 (r250338) > @@ -107,13 +107,6 @@ > #endif > > /* > - * Only one memory domain. > - */ > -#ifndef VM_NDOMAIN > -#define VM_NDOMAIN 1 > -#endif > - > -/* > * Enable superpage reservations: 1 level. > */ > #ifndef VM_NRESERVLEVEL > > Modified: head/sys/ia64/include/param.h > ============================================================================== > --- head/sys/ia64/include/param.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/ia64/include/param.h Tue May 7 22:46:24 2013 (r250338) > @@ -69,6 +69,10 @@ > #define MAXCPU 1 > #endif > > +#ifndef MAXMEMDOM > +#define MAXMEMDOM 1 > +#endif > + > #define ALIGNBYTES _ALIGNBYTES > #define ALIGN(p) _ALIGN(p) > /* > > Modified: head/sys/ia64/include/vmparam.h > ============================================================================== > --- head/sys/ia64/include/vmparam.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/ia64/include/vmparam.h Tue May 7 22:46:24 2013 (r250338) > @@ -103,13 +103,6 @@ > #define VM_NFREEORDER 16 > > /* > - * Only one memory domain. > - */ > -#ifndef VM_NDOMAIN > -#define VM_NDOMAIN 1 > -#endif > - > -/* > * Disable superpage reservations. > */ > #ifndef VM_NRESERVLEVEL > > Modified: head/sys/mips/include/param.h > ============================================================================== > --- head/sys/mips/include/param.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/mips/include/param.h Tue May 7 22:46:24 2013 (r250338) > @@ -101,6 +101,10 @@ > #define MAXCPU 1 > #endif > > +#ifndef MAXMEMDOM > +#define MAXMEMDOM 1 > +#endif > + > /* > * Round p (pointer or byte index) up to a correctly-aligned value for all > * data types (int, long, ...). The result is u_int and must be cast to > > Modified: head/sys/mips/include/vmparam.h > ============================================================================== > --- head/sys/mips/include/vmparam.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/mips/include/vmparam.h Tue May 7 22:46:24 2013 (r250338) > @@ -101,13 +101,6 @@ > #endif > > /* > - * Only one memory domain. > - */ > -#ifndef VM_NDOMAIN > -#define VM_NDOMAIN 1 > -#endif > - > -/* > * Disable superpage reservations. (not sure if this is right > * I copied it from ARM) > */ > > Modified: head/sys/powerpc/include/param.h > ============================================================================== > --- head/sys/powerpc/include/param.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/powerpc/include/param.h Tue May 7 22:46:24 2013 (r250338) > @@ -75,6 +75,10 @@ > #define MAXCPU 1 > #endif /* SMP || KLD_MODULE */ > > +#ifndef MAXMEMDOM > +#define MAXMEMDOM 1 > +#endif > + > #define ALIGNBYTES _ALIGNBYTES > #define ALIGN(p) _ALIGN(p) > /* > > Modified: head/sys/powerpc/include/vmparam.h > ============================================================================== > --- head/sys/powerpc/include/vmparam.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/powerpc/include/vmparam.h Tue May 7 22:46:24 2013 (r250338) > @@ -163,13 +163,6 @@ struct pmap_physseg { > #define VM_NFREEORDER 11 > > /* > - * Only one memory domain. > - */ > -#ifndef VM_NDOMAIN > -#define VM_NDOMAIN 1 > -#endif > - > -/* > * Disable superpage reservations. > */ > #ifndef VM_NRESERVLEVEL > > Modified: head/sys/sparc64/include/param.h > ============================================================================== > --- head/sys/sparc64/include/param.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/sparc64/include/param.h Tue May 7 22:46:24 2013 (r250338) > @@ -57,6 +57,10 @@ > #define MAXCPU 1 > #endif /* SMP || KLD_MODULE */ > > +#ifndef MAXMEMDOM > +#define MAXMEMDOM 1 > +#endif > + > #define INT_SHIFT 2 > #define PTR_SHIFT 3 > > > Modified: head/sys/sparc64/include/vmparam.h > ============================================================================== > --- head/sys/sparc64/include/vmparam.h Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/sparc64/include/vmparam.h Tue May 7 22:46:24 2013 (r250338) > @@ -106,13 +106,6 @@ > #define VM_NFREEORDER 12 > > /* > - * Only one memory domain. > - */ > -#ifndef VM_NDOMAIN > -#define VM_NDOMAIN 1 > -#endif > - > -/* > * Enable superpage reservations: 1 level. > */ > #ifndef VM_NRESERVLEVEL > > Modified: head/sys/vm/vm_phys.c > ============================================================================== > --- head/sys/vm/vm_phys.c Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/vm/vm_phys.c Tue May 7 22:46:24 2013 (r250338) > @@ -63,11 +63,11 @@ __FBSDID("$FreeBSD$"); > #include > > /* > - * VM_FREELIST_DEFAULT is split into VM_NDOMAIN lists, one for each > + * VM_FREELIST_DEFAULT is split into MAXMEMDOM lists, one for each > * domain. These extra lists are stored at the end of the regular > * free lists starting with VM_NFREELIST. > */ > -#define VM_RAW_NFREELIST (VM_NFREELIST + VM_NDOMAIN - 1) > +#define VM_RAW_NFREELIST (VM_NFREELIST + MAXMEMDOM - 1) > > struct vm_freelist { > struct pglist pl; > @@ -100,7 +100,7 @@ MALLOC_DEFINE(M_FICT_PAGES, "", ""); > static struct vm_freelist > vm_phys_free_queues[VM_RAW_NFREELIST][VM_NFREEPOOL][VM_NFREEORDER]; > static struct vm_freelist > -(*vm_phys_lookup_lists[VM_NDOMAIN][VM_RAW_NFREELIST])[VM_NFREEPOOL][VM_NFREEORDER]; > +(*vm_phys_lookup_lists[MAXMEMDOM][VM_RAW_NFREELIST])[VM_NFREEPOOL][VM_NFREEORDER]; > > static int vm_nfreelists = VM_FREELIST_DEFAULT + 1; > > @@ -116,7 +116,7 @@ static int sysctl_vm_phys_segs(SYSCTL_HA > SYSCTL_OID(_vm, OID_AUTO, phys_segs, CTLTYPE_STRING | CTLFLAG_RD, > NULL, 0, sysctl_vm_phys_segs, "A", "Phys Seg Info"); > > -#if VM_NDOMAIN > 1 > +#if MAXMEMDOM > 1 > static int sysctl_vm_phys_lookup_lists(SYSCTL_HANDLER_ARGS); > SYSCTL_OID(_vm, OID_AUTO, phys_lookup_lists, CTLTYPE_STRING | CTLFLAG_RD, > NULL, 0, sysctl_vm_phys_lookup_lists, "A", "Phys Lookup Lists"); > @@ -200,7 +200,7 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS) > return (error); > } > > -#if VM_NDOMAIN > 1 > +#if MAXMEMDOM > 1 > /* > * Outputs the set of free list lookup lists. > */ > @@ -255,7 +255,7 @@ _vm_phys_create_seg(vm_paddr_t start, vm > #else > seg->first_page = PHYS_TO_VM_PAGE(start); > #endif > -#if VM_NDOMAIN > 1 > +#if MAXMEMDOM > 1 > if (flind == VM_FREELIST_DEFAULT && domain != 0) { > flind = VM_NFREELIST + (domain - 1); > if (flind >= vm_nfreelists) > @@ -302,7 +302,7 @@ vm_phys_init(void) > { > struct vm_freelist *fl; > int flind, i, oind, pind; > -#if VM_NDOMAIN > 1 > +#if MAXMEMDOM > 1 > int ndomains, j; > #endif > > @@ -347,7 +347,7 @@ vm_phys_init(void) > TAILQ_INIT(&fl[oind].pl); > } > } > -#if VM_NDOMAIN > 1 > +#if MAXMEMDOM > 1 > /* > * Build a free list lookup list for each domain. All of the > * memory domain lists are inserted at the VM_FREELIST_DEFAULT > @@ -444,7 +444,7 @@ vm_phys_alloc_pages(int pool, int order) > KASSERT(order < VM_NFREEORDER, > ("vm_phys_alloc_pages: order %d is out of range", order)); > > -#if VM_NDOMAIN > 1 > +#if MAXMEMDOM > 1 > domain = PCPU_GET(domain); > #else > domain = 0; > @@ -925,7 +925,7 @@ vm_phys_alloc_contig(u_long npages, vm_p > int domain, flind, oind, order, pind; > > mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); > -#if VM_NDOMAIN > 1 > +#if MAXMEMDOM > 1 > domain = PCPU_GET(domain); > #else > domain = 0; > > Modified: head/sys/x86/acpica/srat.c > ============================================================================== > --- head/sys/x86/acpica/srat.c Tue May 7 22:05:57 2013 (r250337) > +++ head/sys/x86/acpica/srat.c Tue May 7 22:46:24 2013 (r250338) > @@ -28,8 +28,6 @@ > #include > __FBSDID("$FreeBSD$"); > > -#include "opt_vm.h" > - > #include > #include > #include > @@ -47,7 +45,7 @@ __FBSDID("$FreeBSD$"); > > #include > > -#if VM_NDOMAIN > 1 > +#if MAXMEMDOM > 1 > struct cpu_info { > int enabled:1; > int has_memory:1; > @@ -265,7 +263,7 @@ renumber_domains(void) > domains[j] = domains[j - 1]; > domains[slot] = mem_info[i].domain; > ndomain++; > - if (ndomain > VM_NDOMAIN) { > + if (ndomain > MAXMEMDOM) { > printf("SRAT: Too many memory domains\n"); > return (EFBIG); > } > @@ -362,4 +360,4 @@ srat_set_cpus(void *dummy) > } > } > SYSINIT(srat_set_cpus, SI_SUB_CPU, SI_ORDER_ANY, srat_set_cpus, NULL); > -#endif /* VM_NDOMAIN > 1 */ > +#endif /* MAXMEMDOM > 1 */