- remove bogus_imm counter

- disable pcpu cluster cache by default until reference counting is handled
  correctly for held clusters - can be re-enable by sysctl
This commit is contained in:
kmacy 2008-01-17 21:25:58 +00:00
parent e443f3b38c
commit 53e7eb64df
2 changed files with 26 additions and 22 deletions

View File

@ -73,13 +73,13 @@ __FBSDID("$FreeBSD$");
#endif
int txq_fills = 0;
static int bogus_imm = 0;
static int recycle_enable = 1;
extern int cxgb_txq_buf_ring_size;
int cxgb_cached_allocations;
int cxgb_cached;
int cxgb_ext_freed;
extern int cxgb_use_16k_clusters;
extern int cxgb_pcpu_cache_enable;
#define USE_GTS 0
@ -3202,9 +3202,9 @@ t3_add_attach_sysctls(adapter_t *sc)
CTLFLAG_RD, &txq_fills,
0, "#times txq overrun");
SYSCTL_ADD_INT(ctx, children, OID_AUTO,
"bogus_imm",
CTLFLAG_RD, &bogus_imm,
0, "#times a bogus immediate response was seen");
"pcpu_cache_enable",
CTLFLAG_RD, &cxgb_pcpu_cache_enable,
0, "#enable driver local pcpu caches");
SYSCTL_ADD_INT(ctx, children, OID_AUTO,
"cache_alloc",
CTLFLAG_RD, &cxgb_cached_allocations,

View File

@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$");
#endif
extern int cxgb_use_16k_clusters;
int cxgb_pcpu_cache_enable = 0;
struct buf_stack {
caddr_t *bs_stack;
@ -201,16 +202,18 @@ cxgb_cache_get(uma_zone_t zone)
{
caddr_t cl = NULL;
struct cxgb_cache_pcpu *ccp;
critical_enter();
ccp = &cxgb_caches->ccs_array[curcpu];
if (zone == zone_clust) {
cl = buf_stack_pop(&ccp->ccp_cluster_free);
} else if (zone == ccp->ccp_jumbo_zone) {
cl = buf_stack_pop(&ccp->ccp_jumbo_free);
}
critical_exit();
if (cxgb_pcpu_cache_enable) {
critical_enter();
ccp = &cxgb_caches->ccs_array[curcpu];
if (zone == zone_clust) {
cl = buf_stack_pop(&ccp->ccp_cluster_free);
} else if (zone == ccp->ccp_jumbo_zone) {
cl = buf_stack_pop(&ccp->ccp_jumbo_free);
}
critical_exit();
}
if (cl == NULL)
cl = uma_zalloc(zone, M_NOWAIT);
else
@ -224,15 +227,17 @@ cxgb_cache_put(uma_zone_t zone, void *cl)
{
struct cxgb_cache_pcpu *ccp;
int err = ENOSPC;
critical_enter();
ccp = &cxgb_caches->ccs_array[curcpu];
if (zone == zone_clust) {
err = buf_stack_push(&ccp->ccp_cluster_free, cl);
} else if (zone == ccp->ccp_jumbo_zone){
err = buf_stack_push(&ccp->ccp_jumbo_free, cl);
if (cxgb_pcpu_cache_enable) {
critical_enter();
ccp = &cxgb_caches->ccs_array[curcpu];
if (zone == zone_clust) {
err = buf_stack_push(&ccp->ccp_cluster_free, cl);
} else if (zone == ccp->ccp_jumbo_zone){
err = buf_stack_push(&ccp->ccp_jumbo_free, cl);
}
critical_exit();
}
critical_exit();
if (err)
uma_zfree(zone, cl);
@ -250,7 +255,6 @@ cxgb_cache_refill(void)
return;
restart:
critical_enter();
ccp = &cxgb_caches->ccs_array[curcpu];