summaryrefslogtreecommitdiffstats
path: root/src/kernel
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2019-03-14 23:51:12 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-03-17 13:23:00 -0500
commit5588cf81b95d9a940040d16e995e07738c8af0d4 (patch)
tree375b994c46d86bfdfb4936ce5ad857736c8e6f0d /src/kernel
parent63622494a0f352826fa4fca70149c5bcaa8c15d4 (diff)
downloadtalos-hostboot-5588cf81b95d9a940040d16e995e07738c8af0d4.tar.gz
talos-hostboot-5588cf81b95d9a940040d16e995e07738c8af0d4.zip
Fix bug where task migrates away from pinned CPU unexpectedly
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>
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/msghandler.C5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/kernel/msghandler.C b/src/kernel/msghandler.C
index 8e7244d2b..200f9c028 100644
--- a/src/kernel/msghandler.C
+++ b/src/kernel/msghandler.C
@@ -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);
OpenPOWER on IntegriCloud