-
Notifications
You must be signed in to change notification settings - Fork 53
Modifies converse schedeuler to prioritize NodeGroup messages #3676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f436743
800aa6b
ed823ff
62b0569
028cb95
7b3b414
df3e677
0f31dd0
5f3e5b2
7342221
f39d307
22fdc83
83e904f
f3eb123
bc5f37c
3b0ebbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1657,6 +1657,8 @@ void CsdSchedulerState_new(CsdSchedulerState_t *s) | |
#if CMK_NODE_QUEUE_AVAILABLE | ||
s->nodeQ=CsvAccess(CsdNodeQueue); | ||
s->nodeLock=CsvAccess(CsdNodeQueueLock); | ||
s->nodeGrpFreq=4; | ||
s->iter = 0; | ||
#endif | ||
#if CMK_GRID_QUEUE_AVAILABLE | ||
s->gridQ=CpvAccess(CsdGridQueue); | ||
|
@@ -1720,29 +1722,39 @@ void CsdSchedulerState_new(CsdSchedulerState_t *s) | |
*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The long expository comment preceeding the CsdNextMessage definition should be updated to match the new behavior, and any other behavior that it doesn't describe, such as csdLocalMax querying the PE onnode FIFO (localQ) and scheduler queues first. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even better, break up the exposition so that the explanations are adjacent to the code they are intended to describe. |
||
void *CsdNextMessage(CsdSchedulerState_t *s) { | ||
void *msg; | ||
if((*(s->localCounter))-- >0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new code should be below the localCounter branch, right above the CmiGetNonLocal() call. The default CsdLocalMax is 0 so normally it won't matter, but if the user says to prioritize local messages then they should come first. |
||
{ | ||
/* This avoids a race condition with migration detected by megatest*/ | ||
msg=CdsFifo_Dequeue(s->localQ); | ||
if (msg!=NULL) | ||
{ | ||
|
||
if ((*(s->localCounter))-- > 0) { | ||
/* This avoids a race condition with migration detected by megatest*/ | ||
msg = CdsFifo_Dequeue(s->localQ); | ||
if (msg != NULL) { | ||
#if CMI_QD | ||
CpvAccess(cQdState)->mProcessed++; | ||
CpvAccess(cQdState)->mProcessed++; | ||
#endif | ||
return msg; | ||
} | ||
CqsDequeue(s->schedQ,(void **)&msg); | ||
if (msg!=NULL) return msg; | ||
} | ||
|
||
return msg; | ||
} | ||
CqsDequeue(s->schedQ, (void**)&msg); | ||
if (msg != NULL) | ||
return msg; | ||
} | ||
|
||
#if CMK_NODE_QUEUE_AVAILABLE | ||
s->iter++; | ||
// we use nodeGrpFreq == 0 to mean | ||
// don't check NodeQ with high priority | ||
if (s->nodeGrpFreq && (0 == (s->iter % s->nodeGrpFreq))) { | ||
msg = CmiGetNonLocalNodeQ(); | ||
if (NULL != msg) return msg; | ||
} | ||
#endif | ||
|
||
*(s->localCounter)=CsdLocalMax; | ||
if ( NULL!=(msg=CmiGetNonLocal()) || | ||
if ( NULL!=(msg=CmiGetNonLocal()) || | ||
NULL!=(msg=CdsFifo_Dequeue(s->localQ)) ) { | ||
#if CMI_QD | ||
CpvAccess(cQdState)->mProcessed++; | ||
CpvAccess(cQdState)->mProcessed++; | ||
#endif | ||
return msg; | ||
} | ||
return msg; | ||
} | ||
#if CMK_GRID_QUEUE_AVAILABLE | ||
/*#warning "CsdNextMessage: CMK_GRID_QUEUE_AVAILABLE" */ | ||
CqsDequeue (s->gridQ, (void **) &msg); | ||
|
Uh oh!
There was an error while loading. Please reload this page.