Skip to content

Commit

Permalink
Fix bug where task migrates away from pinned CPU unexpectedly
Browse files Browse the repository at this point in the history
This commit fixes a bug wherein, if a task was pinned and then migrated to
master, a page fault to load any instructions after the migrate but before the
unpin, could cause the task to migrate away unexpectedly, causing a range of
symptoms such as not being able to find the master core.

Change-Id: I596f67d678f7641bb51ab9a9a3ae2b3ab65ae9b9
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/73390
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matthew Raybuck <matthew.raybuck@ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Nick Bofferding authored and dcrowell77 committed Mar 17, 2019
1 parent 6362249 commit 5588cf8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/kernel/msghandler.C
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ int MessageHandler::recvMessage(msg_t* i_msg)
{
// Successful response, resume task.

if (!restored_task) // Immediately execute first deferred task.
// Immediately execute first deferred task unless it is pinned,
// in which case it must go back onto the queue of the CPU it's
// pinned to (and may take slightly longer to dispatch)
if (!restored_task && !deferred_task->affinity_pinned)
{
restored_task = true;
TaskManager::setCurrentTask(deferred_task);
Expand Down

0 comments on commit 5588cf8

Please sign in to comment.