224,16 → 224,16 |
kern_printf("(GS:Act %d)",p); |
#endif |
|
TRACER_LOGEVENT(FTrace_EVT_server_active,0,(unsigned int)b); |
TRACER_LOGEVENT(FTrace_EVT_server_active,proc_table[p].context,(unsigned int)b); |
|
if (b->vtimer!=NIL) { |
kern_event_delete(b->vtimer); |
TIMESPEC_ASSIGN(acttime, &b->vtimer_istant); |
//TIMESPEC_ASSIGN(acttime, &b->vtimer_istant); |
} |
b->vtimer=NIL; |
//SUBTIMESPEC(&b->dline, acttime, &t2); |
//if (/* 1 */ TIMESPEC_A_LT_B(&b->dline, acttime) || |
// /* 2 */ TIMESPEC_A_GT_B(&t3, &t2) ) { |
SUBTIMESPEC(&b->dline, acttime, &t2); |
if (/* 1 */ TIMESPEC_A_LT_B(&b->dline, acttime) || |
/* 2 */ TIMESPEC_A_GT_B(&t3, &t2) ) { |
if (b->negotiation) { |
lev->negotiation_in_progress--; |
b->negotiation=0; |
251,7 → 251,7 |
ADDUSEC2TIMESPEC(b->D, &b->dline); |
b->avail = b->Q; |
b->last_reclaiming = 0; |
//} |
} |
|
if (b->flags==GRUBSTAR_RECLAIMING) |
if (lev->Uf < lev->U) lev->Uf += b->Ub; |
289,12 → 289,15 |
|
// recalculate the new effective last reclaiming |
mul32div32to32(tx,(lev->U - lev->Uf),lev->U,b->last_reclaiming); |
b->avail -= tx; |
//b->avail -= tx; |
b->avail -= (tx-b->last_reclaiming); |
|
#ifdef GRUBSTAR_DEBUG |
kern_printf("(GS:Cap p%d av=%d tx=%d lr=%d)", p, b->avail,(int)tx, (int)lev->b[lev->tb[p]].last_reclaiming); |
#endif |
// kern_printf("(U %d, Uf %d)", lev->U, lev->Uf); |
|
|
if (b->avail <= 0) { |
TRACER_LOGEVENT(FTrace_EVT_server_exhaust,0,(unsigned int)(b)); |
b->flags = GRUBSTAR_NOACTIVE; |