[Barrelfish-users] ipi_notify_alloc fail: FLOUNDER_ERR_TX_BUSY

Shi Jinghao (史经浩) jhshi at cs.hku.hk
Tue May 8 16:13:06 CEST 2012


Hi, I've modified the code accordingly. And now it works fine :-)

FYI, here is my patch.

diff -r 16a569af968d lib/barrelfish/arch/x86/ipi_notify.c
--- a/lib/barrelfish/arch/x86/ipi_notify.c Fri May 04 17:02:29 2012 +0800
+++ b/lib/barrelfish/arch/x86/ipi_notify.c Tue May 08 22:10:16 2012 +0800
@@ -48,6 +48,22 @@
     return SYS_ERR_OK;
 }

+static void ipi_alloc_notify_try_request(void* arg) {
+    struct ipi_notify* uc = arg;
+    struct monitor_binding* b = get_monitor_binding();
+
+    errval_t err = b->tx_vtbl.ipi_alloc_notify_request(b, NOP_CONT,
uc->ep, (uintptr_t)uc);
+
+    if (err_is_fail(err)) {
+        if (err_no(err) == FLOUNDER_ERR_TX_BUSY) {
+            b->register_send(b, b->waitset,
MKCONT(ipi_alloc_notify_try_request, uc));
+        }
+        else {
+            USER_PANIC("ipi_notify_alloc_db fail, err = %d\n", err);
+        }
+    }
+}
+
 /**
  * \brief Initialise a new IPI notify channel
  *
@@ -64,10 +80,7 @@
     // Initialize the rest
     uc->cont = cont;

-    struct monitor_binding *b = get_monitor_binding();
-
-    err = b->tx_vtbl.ipi_alloc_notify_request(b, NOP_CONT, uc->ep,
(uintptr_t)uc);
-    assert(err_is_ok(err));
+    ipi_alloc_notify_try_request(uc);

     return SYS_ERR_OK;
 }


On Mon, May 7, 2012 at 10:01 PM, Simon Peter <speter at inf.ethz.ch> wrote:

> Do you have any ideas about why the b->tx_vtbl_ipi_alloc_notify_**request
>> (line 69, file /lib/barrelfish/arch/x86/ipi_**notify.c) would fail with
>> TX_BUSY error? I saw a immediate assert on this result, does it mean the
>> request operation is not supposed to fail at all? If not, can I just
>> detect the TX_BUSY error and do a register_send to make it more robust?
>>
>
> You should be able to do that. It's probably just an overlooked case where
> we don't yet handle busy channels. Your suggested register_send() should do
> the trick.
>
> Simon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20120508/5fb60479/attachment.html 


More information about the Barrelfish-users mailing list