vm_phys.c (01d4e2149e5566e5d9394913dc9fb032da259e0b) | vm_phys.c (662e7fa8d9fb296379f594ebb6a7f231c1ea8a2f) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2002-2006 Rice University 5 * Copyright (c) 2007 Alan L. Cox <alc@cs.rice.edu> 6 * All rights reserved. 7 * 8 * This software was developed for the FreeBSD Project by Alan L. Cox, --- 32 unchanged lines hidden (view full) --- 41#include <sys/cdefs.h> 42__FBSDID("$FreeBSD$"); 43 44#include "opt_ddb.h" 45#include "opt_vm.h" 46 47#include <sys/param.h> 48#include <sys/systm.h> | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2002-2006 Rice University 5 * Copyright (c) 2007 Alan L. Cox <alc@cs.rice.edu> 6 * All rights reserved. 7 * 8 * This software was developed for the FreeBSD Project by Alan L. Cox, --- 32 unchanged lines hidden (view full) --- 41#include <sys/cdefs.h> 42__FBSDID("$FreeBSD$"); 43 44#include "opt_ddb.h" 45#include "opt_vm.h" 46 47#include <sys/param.h> 48#include <sys/systm.h> |
49#include <sys/domainset.h> |
|
49#include <sys/lock.h> 50#include <sys/kernel.h> 51#include <sys/malloc.h> 52#include <sys/mutex.h> 53#include <sys/proc.h> 54#include <sys/queue.h> 55#include <sys/rwlock.h> 56#include <sys/sbuf.h> --- 525 unchanged lines hidden (view full) --- 582 } 583 } 584 } 585 586 rw_init(&vm_phys_fictitious_reg_lock, "vmfctr"); 587} 588 589/* | 50#include <sys/lock.h> 51#include <sys/kernel.h> 52#include <sys/malloc.h> 53#include <sys/mutex.h> 54#include <sys/proc.h> 55#include <sys/queue.h> 56#include <sys/rwlock.h> 57#include <sys/sbuf.h> --- 525 unchanged lines hidden (view full) --- 583 } 584 } 585 } 586 587 rw_init(&vm_phys_fictitious_reg_lock, "vmfctr"); 588} 589 590/* |
591 * Register info about the NUMA topology of the system. 592 * 593 * Invoked by platform-dependent code prior to vm_phys_init(). 594 */ 595void 596vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, 597 int *locality) 598{ 599#ifdef NUMA 600 int i; 601 602 vm_ndomains = ndomains; 603 mem_affinity = affinity; 604 mem_locality = locality; 605 606 for (i = 0; i < vm_ndomains; i++) 607 DOMAINSET_SET(i, &all_domains); 608 609 domainset_init(); 610#else 611 (void)ndomains; 612 (void)affinity; 613 (void)locality; 614#endif 615} 616 617/* |
|
590 * Split a contiguous, power of two-sized set of physical pages. 591 * 592 * When this function is called by a page allocation function, the caller 593 * should request insertion at the head unless the order [order, oind) queues 594 * are known to be empty. The objective being to reduce the likelihood of 595 * long-term fragmentation by promoting contemporaneous allocation and 596 * (hopefully) deallocation. 597 */ --- 807 unchanged lines hidden --- | 618 * Split a contiguous, power of two-sized set of physical pages. 619 * 620 * When this function is called by a page allocation function, the caller 621 * should request insertion at the head unless the order [order, oind) queues 622 * are known to be empty. The objective being to reduce the likelihood of 623 * long-term fragmentation by promoting contemporaneous allocation and 624 * (hopefully) deallocation. 625 */ --- 807 unchanged lines hidden --- |