SMP - asyn send SMP safe

- we must not deliver messages from/to unstable address spaces.
  In such a case, we must postpone the delivery. To make sute
  that a process which is expecting an asynchronous message does
  not starve, we must remember that we skipped delivery of some
  messages and we must try to deliver again once the source
  address space is stable again.
This commit is contained in:
Tomas Hruby
2011-10-25 18:32:30 +00:00
committed by Tomas Hruby
parent 0bb56e0e04
commit 758d788bbe
4 changed files with 127 additions and 25 deletions

View File

@@ -160,6 +160,13 @@ PUBLIC int do_vmctl(struct proc * caller, message * m_ptr)
*/
RTS_UNSET(p, RTS_VMINHIBIT);
#ifdef CONFIG_SMP
if (p->p_misc_flags & MF_SENDA_VM_MISS) {
struct priv *privp;
p->p_misc_flags &= ~MF_SENDA_VM_MISS;
privp = priv(p);
try_deliver_senda(p, (asynmsg_t *) privp->s_asyntab,
privp->s_asynsize);
}
/*
* We don't know whether kernel has the changed mapping
* installed to access userspace memory. And if so, on what CPU.