| version 1.118, 2006/05/14 21:15:12 |
version 1.119, 2006/05/25 14:27:28 |
| Line 127 EVCNT_ATTACH_STATIC(sosend_kvalimit); |
|
| Line 127 EVCNT_ATTACH_STATIC(sosend_kvalimit); |
|
| |
|
| #endif /* SOSEND_COUNTERS */ |
#endif /* SOSEND_COUNTERS */ |
| |
|
| void |
static struct callback_entry sokva_reclaimerentry; |
| soinit(void) |
|
| { |
|
| |
|
| /* Set the initial adjusted socket buffer size. */ |
|
| if (sb_max_set(sb_max)) |
|
| panic("bad initial sb_max value: %lu", sb_max); |
|
| |
|
| } |
|
| |
|
| #ifdef SOSEND_NO_LOAN |
#ifdef SOSEND_NO_LOAN |
| int use_sosend_loan = 0; |
int use_sosend_loan = 0; |
| Line 440 sosend_loan(struct socket *so, struct ui |
|
| Line 432 sosend_loan(struct socket *so, struct ui |
|
| return (space); |
return (space); |
| } |
} |
| |
|
| |
static int |
| |
sokva_reclaim_callback(struct callback_entry *ce, void *obj, void *arg) |
| |
{ |
| |
|
| |
KASSERT(ce == &sokva_reclaimerentry); |
| |
KASSERT(obj == NULL); |
| |
|
| |
sodopendfree(); |
| |
if (!vm_map_starved_p(kernel_map)) { |
| |
return CALLBACK_CHAIN_ABORT; |
| |
} |
| |
return CALLBACK_CHAIN_CONTINUE; |
| |
} |
| |
|
| |
void |
| |
soinit(void) |
| |
{ |
| |
|
| |
/* Set the initial adjusted socket buffer size. */ |
| |
if (sb_max_set(sb_max)) |
| |
panic("bad initial sb_max value: %lu", sb_max); |
| |
|
| |
callback_register(&vm_map_to_kernel(kernel_map)->vmk_reclaim_callback, |
| |
&sokva_reclaimerentry, NULL, sokva_reclaim_callback); |
| |
} |
| |
|
| /* |
/* |
| * Socket operation routines. |
* Socket operation routines. |
| * These routines are called by the routines in |
* These routines are called by the routines in |