Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys change tablefull() to accept one more parameter - option...
details: https://anonhg.NetBSD.org/src/rev/14c6886bc444
branches: trunk
changeset: 494255:14c6886bc444
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Tue Jul 04 15:33:28 2000 +0000
description:
change tablefull() to accept one more parameter - optional hint
use that to inform about way to raise current limit when we reach maximum
number of processes, descriptors or vnodes
XXX hopefully I catched all users of tablefull()
diffstat:
sys/kern/kern_descrip.c | 4 ++--
sys/kern/kern_fork.c | 4 ++--
sys/kern/subr_prf.c | 11 +++++++----
sys/kern/vfs_subr.c | 4 ++--
sys/sys/systm.h | 4 ++--
5 files changed, 15 insertions(+), 12 deletions(-)
diffs (98 lines):
diff -r 48d154835e2d -r 14c6886bc444 sys/kern/kern_descrip.c
--- a/sys/kern/kern_descrip.c Tue Jul 04 14:58:36 2000 +0000
+++ b/sys/kern/kern_descrip.c Tue Jul 04 15:33:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_descrip.c,v 1.68 2000/06/27 17:41:16 mrg Exp $ */
+/* $NetBSD: kern_descrip.c,v 1.69 2000/07/04 15:33:31 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -691,7 +691,7 @@
if ((error = fdalloc(p, 0, &i)) != 0)
return (error);
if (nfiles >= maxfiles) {
- tablefull("file");
+ tablefull("file", "increase kern.maxfiles or MAXFILES");
return (ENFILE);
}
/*
diff -r 48d154835e2d -r 14c6886bc444 sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c Tue Jul 04 14:58:36 2000 +0000
+++ b/sys/kern/kern_fork.c Tue Jul 04 15:33:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_fork.c,v 1.68 2000/06/27 17:41:20 mrg Exp $ */
+/* $NetBSD: kern_fork.c,v 1.69 2000/07/04 15:33:30 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -139,7 +139,7 @@
uid = p1->p_cred->p_ruid;
if (__predict_false((nprocs >= maxproc - 1 && uid != 0) ||
nprocs >= maxproc)) {
- tablefull("proc");
+ tablefull("proc", "increase kern.maxproc or NPROC");
return (EAGAIN);
}
diff -r 48d154835e2d -r 14c6886bc444 sys/kern/subr_prf.c
--- a/sys/kern/subr_prf.c Tue Jul 04 14:58:36 2000 +0000
+++ b/sys/kern/subr_prf.c Tue Jul 04 15:33:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_prf.c,v 1.74 2000/06/10 18:44:44 sommerfeld Exp $ */
+/* $NetBSD: subr_prf.c,v 1.75 2000/07/04 15:33:31 jdolecek Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@@ -167,10 +167,13 @@
*/
void
-tablefull(tab)
- const char *tab;
+tablefull(tab, hint)
+ const char *tab, *hint;
{
- log(LOG_ERR, "%s: table is full\n", tab);
+ if (hint)
+ log(LOG_ERR, "%s: table is full - %s\n", tab, hint);
+ else
+ log(LOG_ERR, "%s: table is full\n", tab);
}
/*
diff -r 48d154835e2d -r 14c6886bc444 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c Tue Jul 04 14:58:36 2000 +0000
+++ b/sys/kern/vfs_subr.c Tue Jul 04 15:33:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_subr.c,v 1.131 2000/06/27 23:52:18 fvdl Exp $ */
+/* $NetBSD: vfs_subr.c,v 1.132 2000/07/04 15:33:32 jdolecek Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -490,7 +490,7 @@
simple_unlock(&vnode_free_list_slock);
if (mp && error != EDEADLK)
vfs_unbusy(mp);
- tablefull("vnode");
+ tablefull("vnode", "increase kern.maxvnodes or NVNODE");
*vpp = 0;
return (ENFILE);
}
diff -r 48d154835e2d -r 14c6886bc444 sys/sys/systm.h
--- a/sys/sys/systm.h Tue Jul 04 14:58:36 2000 +0000
+++ b/sys/sys/systm.h Tue Jul 04 15:33:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: systm.h,v 1.111 2000/06/10 18:44:45 sommerfeld Exp $ */
+/* $NetBSD: systm.h,v 1.112 2000/07/04 15:33:28 jdolecek Exp $ */
/*-
* Copyright (c) 1982, 1988, 1991, 1993
@@ -199,7 +199,7 @@
int humanize_number __P((char *, size_t, u_int64_t, const char *, int));
int format_bytes __P((char *, size_t, u_int64_t));
-void tablefull __P((const char *));
+void tablefull __P((const char *, const char *));
int kcopy __P((const void *, void *, size_t));
Home |
Main Index |
Thread Index |
Old Index