Mon Jul 19 19:13:33 2021 UTC ()
Mention caution changing the defaults.


(christos)
diff -r1.697 -r1.698 src/sys/sys/param.h

cvs diff -r1.697 -r1.698 src/sys/sys/param.h (expand / switch to unified diff)

--- src/sys/sys/param.h 2021/06/29 21:03:37 1.697
+++ src/sys/sys/param.h 2021/07/19 19:13:33 1.698
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: param.h,v 1.697 2021/06/29 21:03:37 pgoyette Exp $ */ 1/* $NetBSD: param.h,v 1.698 2021/07/19 19:13:33 christos Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1982, 1986, 1989, 1993 4 * Copyright (c) 1982, 1986, 1989, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * (c) UNIX System Laboratories, Inc. 6 * (c) UNIX System Laboratories, Inc.
7 * All or some portions of this file are derived from material licensed 7 * All or some portions of this file are derived from material licensed
8 * to the University of California by American Telephone and Telegraph 8 * to the University of California by American Telephone and Telegraph
9 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 9 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
10 * the permission of UNIX System Laboratories, Inc. 10 * the permission of UNIX System Laboratories, Inc.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -190,33 +190,39 @@ @@ -190,33 +190,39 @@
190 190
191/* pages ("clicks") to disk blocks */ 191/* pages ("clicks") to disk blocks */
192#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) 192#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
193#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT)) 193#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
194 194
195/* bytes to pages */ 195/* bytes to pages */
196#define ctob(x) ((x) << PGSHIFT) 196#define ctob(x) ((x) << PGSHIFT)
197#define btoc(x) (((x) + PGOFSET) >> PGSHIFT) 197#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
198 198
199/* bytes to disk blocks */ 199/* bytes to disk blocks */
200#define dbtob(x) ((x) << DEV_BSHIFT) 200#define dbtob(x) ((x) << DEV_BSHIFT)
201#define btodb(x) ((x) >> DEV_BSHIFT) 201#define btodb(x) ((x) >> DEV_BSHIFT)
202 202
203/* Coherency unit: assumed cache line size. See also MIN_LWP_ALIGNMENT. */ 203/*
 204 * Coherency unit: assumed cache line size. See also MIN_LWP_ALIGNMENT.
 205 * The MD code depends on the current values of these constants. Don't
 206 * change them without coordinating.
 207 */
204#ifndef COHERENCY_UNIT 208#ifndef COHERENCY_UNIT
205#define COHERENCY_UNIT 64 209#define COHERENCY_UNIT 64
206#endif 210#endif
207#ifndef CACHE_LINE_SIZE 211#ifndef CACHE_LINE_SIZE
208#define CACHE_LINE_SIZE 64 212#define CACHE_LINE_SIZE 64
209#endif 213#endif
 214
 215
210#ifndef MAXCPUS 216#ifndef MAXCPUS
211#define MAXCPUS 32 217#define MAXCPUS 32
212#endif 218#endif
213#ifndef MAX_LWP_PER_PROC 219#ifndef MAX_LWP_PER_PROC
214#define MAX_LWP_PER_PROC 8000 220#define MAX_LWP_PER_PROC 8000
215#endif 221#endif
216 222
217/* 223/*
218 * Stack macros. On most architectures, the stack grows down, 224 * Stack macros. On most architectures, the stack grows down,
219 * towards lower addresses; it is the rare architecture where 225 * towards lower addresses; it is the rare architecture where
220 * it grows up, towards higher addresses. 226 * it grows up, towards higher addresses.
221 * 227 *
222 * STACK_GROW and STACK_SHRINK adjust a stack pointer by some 228 * STACK_GROW and STACK_SHRINK adjust a stack pointer by some