[portals4] r2299 committed - Solves race condition with unlinking ME but still receiving PTL_OK for...

0 views
Skip to first unread message

port...@googlecode.com

unread,
Apr 20, 2015, 11:12:59 AM4/20/15
to portals4...@googlegroups.com
Revision: 2299
Author: regra...@gmail.com
Date: Mon Apr 20 15:12:44 2015 UTC
Log: Solves race condition with unlinking ME but still receiving
PTL_OK for a put while ME is being unlinked. Also a fix for 0-byte PtlPuts
from page aligned buffers.

* Thanks to Antonio P. and Ken R. from ANL for these patches


https://code.google.com/p/portals4/source/detail?r=2299

Modified:
/trunk/src/ib/ptl_mr.c
/trunk/src/ib/ptl_tgt.c

=======================================
--- /trunk/src/ib/ptl_mr.c Mon Oct 20 22:39:57 2014 UTC
+++ /trunk/src/ib/ptl_mr.c Mon Apr 20 15:12:44 2015 UTC
@@ -173,7 +173,7 @@
#if WITH_ZERO_MRS
//Fix for Qlogic InfiniPath and recent MOFED versions, that does not
accept a NULL value for an ibv_mr_reg
//REG 2014
- if ((start == NULL) && ((int)length == 0)) {
+ if ((start == NULL || (int)start % getpagesize() == 0) && ((int)length
== 0)) {
uint64_t junk_value;
start = &junk_value;
end = start;
=======================================
--- /trunk/src/ib/ptl_tgt.c Thu Jan 29 17:02:38 2015 UTC
+++ /trunk/src/ib/ptl_tgt.c Mon Apr 20 15:12:44 2015 UTC
@@ -694,6 +694,11 @@
WARN();
return STATE_TGT_DROP;
}
+
+ /* mark as busy to avoid races */
+ if (buf->le->ptl_list == PTL_PRIORITY_LIST && buf->me &&
+ buf->me->options & PTL_ME_USE_ONCE)
+ atomic_set(&buf->me->busy, 1);

if (buf->le->ptl_list == PTL_OVERFLOW_LIST) {
if (!(buf->le->options & PTL_ME_UNEXPECTED_HDR_DISABLE)) {
Reply all
Reply to author
Forward
0 new messages