diff options
author | harti <harti@FreeBSD.org> | 2003-07-22 12:46:30 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-07-22 12:46:30 +0000 |
commit | ef0c913256e9dc1649f9a1717272d7ac66142e52 (patch) | |
tree | fe0192056d1d484956a504da31f19e63d36c82b2 | |
parent | 94d1a5de21a31c87cea17a35bf16a2e3665dfbf3 (diff) | |
download | FreeBSD-src-ef0c913256e9dc1649f9a1717272d7ac66142e52.zip FreeBSD-src-ef0c913256e9dc1649f9a1717272d7ac66142e52.tar.gz |
Remove the zone limits for all the zones used in the ATM code.
These were a left over from when the private memory pools were
converted to use uma zones. The limit of UMA zones, however,
works differently. When a zone is limited to only one or two pages
than, on multi-cpu systems, processes can get stuck on the zonelimit,
because all remaining free items are in caches of other CPUs.
Also add rudimentary error handling in some places (panic) when a zone
cannot be created.
-rw-r--r-- | sys/netatm/atm_cm.c | 6 | ||||
-rw-r--r-- | sys/netatm/atm_socket.c | 1 | ||||
-rw-r--r-- | sys/netatm/atm_subr.c | 2 | ||||
-rw-r--r-- | sys/netatm/ipatm/ipatm_load.c | 2 | ||||
-rw-r--r-- | sys/netatm/sigpvc/sigpvc_if.c | 3 | ||||
-rw-r--r-- | sys/netatm/spans/spans_arp.c | 3 | ||||
-rw-r--r-- | sys/netatm/spans/spans_cls.c | 3 | ||||
-rw-r--r-- | sys/netatm/spans/spans_if.c | 6 | ||||
-rw-r--r-- | sys/netatm/uni/sscf_uni.c | 2 | ||||
-rw-r--r-- | sys/netatm/uni/sscop.c | 1 | ||||
-rw-r--r-- | sys/netatm/uni/uniarp.c | 1 | ||||
-rw-r--r-- | sys/netatm/uni/uniip.c | 1 | ||||
-rw-r--r-- | sys/netatm/uni/unisig_if.c | 4 |
13 files changed, 14 insertions, 21 deletions
diff --git a/sys/netatm/atm_cm.c b/sys/netatm/atm_cm.c index aeb32ca..733c045 100644 --- a/sys/netatm/atm_cm.c +++ b/sys/netatm/atm_cm.c @@ -105,11 +105,13 @@ atm_cm_init(void) atm_connection_zone = uma_zcreate("atm connection", sizeof(Atm_connection), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - uma_zone_set_max(atm_connection_zone, 100); + if (atm_connection_zone == NULL) + panic("atm_connection_zone"); atm_connvc_zone = uma_zcreate("atm connvc", sizeof(Atm_connvc), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - uma_zone_set_max(atm_connvc_zone, 100); + if (atm_connvc_zone == NULL) + panic("atm_connvc_zone"); } /* diff --git a/sys/netatm/atm_socket.c b/sys/netatm/atm_socket.c index 333c7d6..34b9d09 100644 --- a/sys/netatm/atm_socket.c +++ b/sys/netatm/atm_socket.c @@ -78,7 +78,6 @@ atm_sock_init(void) NULL, NULL, UMA_ALIGN_PTR, 0); if (atm_pcb_zone == NULL) panic("atm_sock_init: unable to initialize atm_pcb_zone"); - uma_zone_set_max(atm_pcb_zone, 100); } /* diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c index 901de8f..4e72a03 100644 --- a/sys/netatm/atm_subr.c +++ b/sys/netatm/atm_subr.c @@ -114,13 +114,11 @@ atm_initialize() UMA_ALIGN_PTR, 0); if (atm_attributes_zone == NULL) panic("atm_initialize: unable to create attributes zone"); - uma_zone_set_max(atm_attributes_zone, 100); atm_stackq_zone = uma_zcreate("atm stackq", sizeof(struct stackq_entry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); if (atm_stackq_zone == NULL) panic("atm_initialize: unable to create stackq zone"); - uma_zone_set_max(atm_stackq_zone, 10); atm_intrq.ifq_maxlen = ATM_INTRQ_MAX; mtx_init(&atm_intrq.ifq_mtx, "atm_inq", NULL, MTX_DEF); diff --git a/sys/netatm/ipatm/ipatm_load.c b/sys/netatm/ipatm/ipatm_load.c index 3cab0c5a..be9560c 100644 --- a/sys/netatm/ipatm/ipatm_load.c +++ b/sys/netatm/ipatm/ipatm_load.c @@ -402,13 +402,11 @@ ipatm_start() NULL, NULL, NULL, UMA_ALIGN_PTR, 0); if (ipatm_vc_zone == NULL) panic("ipatm_start: unable to create ipatm_vc_zone"); - uma_zone_set_max(ipatm_vc_zone, 100); ipatm_nif_zone = uma_zcreate("ipatm nif", sizeof(struct ip_nif), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); if (ipatm_nif_zone == NULL) panic("ipatm_start: unable to create ipatm_nif_zone"); - uma_zone_set_max(ipatm_nif_zone, 52); /* * Register ourselves as a network convergence module diff --git a/sys/netatm/sigpvc/sigpvc_if.c b/sys/netatm/sigpvc/sigpvc_if.c index 9de14cb..dbcc215 100644 --- a/sys/netatm/sigpvc/sigpvc_if.c +++ b/sys/netatm/sigpvc/sigpvc_if.c @@ -145,7 +145,8 @@ sigpvc_start() sigpvc_vc_zone = uma_zcreate("sigpvc vc", sizeof(struct sigpvc_vccb), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - uma_zone_set_max(sigpvc_vc_zone, 50); + if (sigpvc_vc_zone == NULL) + return (ENOMEM); /* * Register ourselves with system diff --git a/sys/netatm/spans/spans_arp.c b/sys/netatm/spans/spans_arp.c index d8ff78b..9e8666c 100644 --- a/sys/netatm/spans/spans_arp.c +++ b/sys/netatm/spans/spans_arp.c @@ -365,7 +365,8 @@ spansarp_start() spansarp_zone = uma_zcreate("spansarp", sizeof(struct spansarp), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - uma_zone_set_max(spansarp_zone, 100); + if (spansarp_zone == NULL) + panic("spansarp_zone"); } /* diff --git a/sys/netatm/spans/spans_cls.c b/sys/netatm/spans/spans_cls.c index bfd6c24..c135b33 100644 --- a/sys/netatm/spans/spans_cls.c +++ b/sys/netatm/spans/spans_cls.c @@ -250,7 +250,8 @@ spanscls_start() spanscls_zone = uma_zcreate("spanscls", sizeof(struct spanscls), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - uma_zone_set_max(spanscls_zone, 100); + if (spanscls_zone == NULL) + panic("spanscls_zone"); /* * Fill in union fields diff --git a/sys/netatm/spans/spans_if.c b/sys/netatm/spans/spans_if.c index 3ea781c..b0ae569 100644 --- a/sys/netatm/spans/spans_if.c +++ b/sys/netatm/spans/spans_if.c @@ -126,11 +126,13 @@ spans_start() spans_vc_zone = uma_zcreate("spans vc", sizeof(struct spans_vccb), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - uma_zone_set_max(spans_vc_zone, 50); + if (spans_vc_zone == NULL) + panic("spans_vc_zone"); spans_msg_zone = uma_zcreate("spans msg", sizeof(spans_msg), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - uma_zone_set_max(spans_msg_zone, 50); + if (spans_msg_zone == NULL) + panic("spans_msg_zone"); /* * Allocate protocol definition structure diff --git a/sys/netatm/uni/sscf_uni.c b/sys/netatm/uni/sscf_uni.c index dc51e72..47ed863 100644 --- a/sys/netatm/uni/sscf_uni.c +++ b/sys/netatm/uni/sscf_uni.c @@ -117,8 +117,6 @@ sscf_uni_start() if (sscf_uni_zone == NULL) panic("sscf_uni_start: uma_zcreate"); - uma_zone_set_max(sscf_uni_zone, 100); - /* * Register stack service */ diff --git a/sys/netatm/uni/sscop.c b/sys/netatm/uni/sscop.c index 5d0426b..cc424be 100644 --- a/sys/netatm/uni/sscop.c +++ b/sys/netatm/uni/sscop.c @@ -152,7 +152,6 @@ sscop_start() NULL, NULL, UMA_ALIGN_PTR, 0); if (sscop_zone == NULL) panic("sscop_start: uma_zcreate"); - uma_zone_set_max(sscop_zone, 100); /* * Register stack service diff --git a/sys/netatm/uni/uniarp.c b/sys/netatm/uni/uniarp.c index 9a3ea78..a34c31e 100644 --- a/sys/netatm/uni/uniarp.c +++ b/sys/netatm/uni/uniarp.c @@ -126,7 +126,6 @@ uniarp_start() NULL, NULL, UMA_ALIGN_PTR, 0); if (uniarp_zone == NULL) panic("uniarp_start: uma_zcreate"); - uma_zone_set_max(uniarp_zone, 200); /* * Register our endpoint diff --git a/sys/netatm/uni/uniip.c b/sys/netatm/uni/uniip.c index 60f02b2..1e07d75 100644 --- a/sys/netatm/uni/uniip.c +++ b/sys/netatm/uni/uniip.c @@ -105,7 +105,6 @@ uniip_start() NULL, NULL, UMA_ALIGN_PTR, 0); if (uniip_zone == NULL) panic("uniip_start: uma_zcreate"); - uma_zone_set_max(uniip_zone, 100); /* * Tell arp to initialize stuff diff --git a/sys/netatm/uni/unisig_if.c b/sys/netatm/uni/unisig_if.c index 6005932b..9853b8a 100644 --- a/sys/netatm/uni/unisig_if.c +++ b/sys/netatm/uni/unisig_if.c @@ -169,10 +169,6 @@ unisig_start() if (unisig_ie_zone == NULL) panic("unisig_start: uma_zcreate failed to create ie zone"); - uma_zone_set_max(unisig_vc_zone, 50); - uma_zone_set_max(unisig_msg_zone, 50); - uma_zone_set_max(unisig_ie_zone, 50); - /* * Register ourselves with system */ |