mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Increase response queue size to avoid starvation, add a counter
to track it when it does occur.
This commit is contained in:
parent
a1a8ef9125
commit
489ca05be7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=206109
@ -139,7 +139,7 @@ enum {
|
||||
|
||||
#define FL_Q_SIZE 4096
|
||||
#define JUMBO_Q_SIZE 1024
|
||||
#define RSPQ_Q_SIZE 1024
|
||||
#define RSPQ_Q_SIZE 2048
|
||||
#define TX_ETH_Q_SIZE 1024
|
||||
#define TX_OFLD_Q_SIZE 1024
|
||||
#define TX_CTRL_Q_SIZE 256
|
||||
@ -179,6 +179,7 @@ struct sge_rspq {
|
||||
uint32_t offload_bundles;
|
||||
uint32_t pure_rsps;
|
||||
uint32_t unhandled_irqs;
|
||||
uint32_t starved;
|
||||
|
||||
bus_addr_t phys_addr;
|
||||
bus_dma_tag_t desc_tag;
|
||||
|
@ -2398,25 +2398,33 @@ cxgb_tick_handler(void *arg, int count)
|
||||
if (p->rev == T3_REV_B2 && p->nports < 4 && sc->open_device_map)
|
||||
check_t3b2_mac(sc);
|
||||
|
||||
cause = t3_read_reg(sc, A_SG_INT_CAUSE);
|
||||
reset = 0;
|
||||
if (cause & F_FLEMPTY) {
|
||||
cause = t3_read_reg(sc, A_SG_INT_CAUSE) & (F_RSPQSTARVE | F_FLEMPTY);
|
||||
if (cause) {
|
||||
struct sge_qset *qs = &sc->sge.qs[0];
|
||||
uint32_t mask, v;
|
||||
|
||||
i = 0;
|
||||
reset |= F_FLEMPTY;
|
||||
v = t3_read_reg(sc, A_SG_RSPQ_FL_STATUS) & ~0xff00;
|
||||
|
||||
cause = (t3_read_reg(sc, A_SG_RSPQ_FL_STATUS) >>
|
||||
S_FL0EMPTY) & 0xffff;
|
||||
while (cause) {
|
||||
qs->fl[i].empty += (cause & 1);
|
||||
if (i)
|
||||
qs++;
|
||||
i ^= 1;
|
||||
cause >>= 1;
|
||||
mask = 1;
|
||||
for (i = 0; i < SGE_QSETS; i++) {
|
||||
if (v & mask)
|
||||
qs[i].rspq.starved++;
|
||||
mask <<= 1;
|
||||
}
|
||||
|
||||
mask <<= SGE_QSETS; /* skip RSPQXDISABLED */
|
||||
|
||||
for (i = 0; i < SGE_QSETS * 2; i++) {
|
||||
if (v & mask) {
|
||||
qs[i / 2].fl[i % 2].empty++;
|
||||
}
|
||||
mask <<= 1;
|
||||
}
|
||||
|
||||
/* clear */
|
||||
t3_write_reg(sc, A_SG_RSPQ_FL_STATUS, v);
|
||||
t3_write_reg(sc, A_SG_INT_CAUSE, cause);
|
||||
}
|
||||
t3_write_reg(sc, A_SG_INT_CAUSE, reset);
|
||||
|
||||
for (i = 0; i < sc->params.nports; i++) {
|
||||
struct port_info *pi = &sc->port[i];
|
||||
|
@ -3586,6 +3586,9 @@ t3_add_configured_sysctls(adapter_t *sc)
|
||||
SYSCTL_ADD_UINT(ctx, rspqpoidlist, OID_AUTO, "credits",
|
||||
CTLFLAG_RD, &qs->rspq.credits,
|
||||
0, "#credits");
|
||||
SYSCTL_ADD_UINT(ctx, rspqpoidlist, OID_AUTO, "starved",
|
||||
CTLFLAG_RD, &qs->rspq.starved,
|
||||
0, "#times starved");
|
||||
SYSCTL_ADD_XLONG(ctx, rspqpoidlist, OID_AUTO, "phys_addr",
|
||||
CTLFLAG_RD, &qs->rspq.phys_addr,
|
||||
"physical_address_of the queue");
|
||||
|
Loading…
Reference in New Issue
Block a user