| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: uvm_pdpolicy_clock.c,v 1.28 2019/12/31 22:42:51 ad Exp $ */ | | 1 | /* $NetBSD: uvm_pdpolicy_clock.c,v 1.29 2020/01/01 01:18:34 mlelstv Exp $ */ |
2 | /* NetBSD: uvm_pdaemon.c,v 1.72 2006/01/05 10:47:33 yamt Exp $ */ | | 2 | /* NetBSD: uvm_pdaemon.c,v 1.72 2006/01/05 10:47:33 yamt Exp $ */ |
3 | | | 3 | |
4 | /*- | | 4 | /*- |
5 | * Copyright (c) 2019 The NetBSD Foundation, Inc. | | 5 | * Copyright (c) 2019 The NetBSD Foundation, Inc. |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * This code is derived from software contributed to The NetBSD Foundation | | 8 | * This code is derived from software contributed to The NetBSD Foundation |
9 | * by Andrew Doran. | | 9 | * by Andrew Doran. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -88,33 +88,34 @@ | | | @@ -88,33 +88,34 @@ |
88 | * Pittsburgh PA 15213-3890 | | 88 | * Pittsburgh PA 15213-3890 |
89 | * | | 89 | * |
90 | * any improvements or extensions that they make and grant Carnegie the | | 90 | * any improvements or extensions that they make and grant Carnegie the |
91 | * rights to redistribute these changes. | | 91 | * rights to redistribute these changes. |
92 | */ | | 92 | */ |
93 | | | 93 | |
94 | #if defined(PDSIM) | | 94 | #if defined(PDSIM) |
95 | | | 95 | |
96 | #include "pdsim.h" | | 96 | #include "pdsim.h" |
97 | | | 97 | |
98 | #else /* defined(PDSIM) */ | | 98 | #else /* defined(PDSIM) */ |
99 | | | 99 | |
100 | #include <sys/cdefs.h> | | 100 | #include <sys/cdefs.h> |
101 | __KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clock.c,v 1.28 2019/12/31 22:42:51 ad Exp $"); | | 101 | __KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clock.c,v 1.29 2020/01/01 01:18:34 mlelstv Exp $"); |
102 | | | 102 | |
103 | #include <sys/param.h> | | 103 | #include <sys/param.h> |
104 | #include <sys/proc.h> | | 104 | #include <sys/proc.h> |
105 | #include <sys/systm.h> | | 105 | #include <sys/systm.h> |
106 | #include <sys/kernel.h> | | 106 | #include <sys/kernel.h> |
107 | #include <sys/kmem.h> | | 107 | #include <sys/kmem.h> |
| | | 108 | #include <sys/atomic.h> |
108 | | | 109 | |
109 | #include <uvm/uvm.h> | | 110 | #include <uvm/uvm.h> |
110 | #include <uvm/uvm_pdpolicy.h> | | 111 | #include <uvm/uvm_pdpolicy.h> |
111 | #include <uvm/uvm_pdpolicy_impl.h> | | 112 | #include <uvm/uvm_pdpolicy_impl.h> |
112 | #include <uvm/uvm_stat.h> | | 113 | #include <uvm/uvm_stat.h> |
113 | | | 114 | |
114 | #endif /* defined(PDSIM) */ | | 115 | #endif /* defined(PDSIM) */ |
115 | | | 116 | |
116 | /* | | 117 | /* |
117 | * per-CPU queue of pending page status changes. 128 entries makes for a | | 118 | * per-CPU queue of pending page status changes. 128 entries makes for a |
118 | * 1kB queue on _LP64 and has been found to be a reasonable compromise that | | 119 | * 1kB queue on _LP64 and has been found to be a reasonable compromise that |
119 | * keeps lock contention events and wait times low, while not using too much | | 120 | * keeps lock contention events and wait times low, while not using too much |
120 | * memory nor allowing global state to fall too far behind. | | 121 | * memory nor allowing global state to fall too far behind. |