Skip to content

Commit 2f83732

Browse files
committed
[scheduler] Downgrade missing thread to warning for get/set affinity mask.
1 parent 51c4672 commit 2f83732

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/scheduler.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,9 @@ class Scheduler : public GlobAlloc, public Callee {
560560
futex_lock(&schedLock);
561561
uint32_t gid = getGid(pid, tid);
562562
if(gidMap.find(gid) == gidMap.end()) {
563-
panic("Scheduler::getMask(): can't find thread info pid=%d, tid=%d", pid, tid);
563+
warn("Scheduler::getMask(): can't find thread info pid=%d, tid=%d", pid, tid);
564+
mask.resize(zinfo->numCores, true);
565+
return mask;
564566
}
565567
ThreadInfo* th = gidMap[gid];
566568
mask = th->mask;
@@ -572,7 +574,8 @@ class Scheduler : public GlobAlloc, public Callee {
572574
futex_lock(&schedLock);
573575
uint32_t gid = getGid(pid, tid);
574576
if(gidMap.find(gid) == gidMap.end()) {
575-
panic("Scheduler::updateMask(): can't find thread info pid=%d, tid=%d", pid, tid);
577+
warn("Scheduler::updateMask(): can't find thread info pid=%d, tid=%d", pid, tid);
578+
return;
576579
}
577580
ThreadInfo* th = gidMap[gid];
578581
//info("Scheduler::updateMask(): update thread mask pid=%d, tid=%d", pid, tid);

0 commit comments

Comments
 (0)