Module Name: src Committed By: ad Date: Sun Mar 15 21:06:30 UTC 2020
Modified Files: src/sys/uvm: uvm_physseg.c Log Message: uvm_physseg: cluster fields used during RB tree lookup for PHYS_TO_VM_PAGE(). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/uvm/uvm_physseg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_physseg.c diff -u src/sys/uvm/uvm_physseg.c:1.13 src/sys/uvm/uvm_physseg.c:1.14 --- src/sys/uvm/uvm_physseg.c:1.13 Sat Dec 21 14:41:44 2019 +++ src/sys/uvm/uvm_physseg.c Sun Mar 15 21:06:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_physseg.c,v 1.13 2019/12/21 14:41:44 ad Exp $ */ +/* $NetBSD: uvm_physseg.c,v 1.14 2020/03/15 21:06:30 ad Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -87,12 +87,15 @@ * uvm_physseg: describes one segment of physical memory */ struct uvm_physseg { + /* used during RB tree lookup for PHYS_TO_VM_PAGE(). */ struct rb_node rb_node; /* tree information */ paddr_t start; /* PF# of first page in segment */ paddr_t end; /* (PF# of last page in segment) + 1 */ + struct vm_page *pgs; /* vm_page structures (from start) */ + + /* less performance sensitive fields. */ paddr_t avail_start; /* PF# of first free page in segment */ paddr_t avail_end; /* (PF# of last free page in segment) +1 */ - struct vm_page *pgs; /* vm_page structures (from start) */ struct extent *ext; /* extent(9) structure to manage pgs[] */ int free_list; /* which free list they belong on */ u_int start_hint; /* start looking for free pages here */ @@ -121,9 +124,9 @@ struct vm_page *uvm_physseg_seg_alloc_fr struct uvm_physseg_graph { struct rb_tree rb_tree; /* Tree for entries */ int nentries; /* Number of entries */ -}; +} __aligned(COHERENCY_UNIT); -static struct uvm_physseg_graph uvm_physseg_graph; +static struct uvm_physseg_graph uvm_physseg_graph __read_mostly; /* * Note on kmem(9) allocator usage: