Comments (4)
Hello,
The following summarizes the logic behind message management life cycle
One way messages are one directional messages where message is sent from sender side to receiver side. Responses are not allowed:
On the sender side:
-
sending message: xio_send_msg
-
message completion: on_ow_msg_send_complete - at this stage it safe to release message resources.
On the receiver side:
-
receiving message callback: on_msg
-
release message resources: xio_release_msg – should be done after message buffers are no longer needed.
-
Sending response: Not allowed
Request/response are one bidirectional messages where message is sent from sender side to receiver side. Receiver must send response to sender:
On the sender side:
-
sending request: xio_send_request
-
request completion: Not available
-
receiving response callback: on_msg
-
release response resources: xio_release_response - should be done after response buffers are no longer needed.
On the receiver side:
-
receiving request callback: on_msg
-
sending response: xio_send_response
-
response completion: on_msg_send_complete – at this stage it safe to release response resources.
If you need more clarification do not hesitate to contact me
Eyal
From: reyoung [mailto:[email protected]]
Sent: Tuesday, April 14, 2015 8:24 AM
To: accelio/accelio
Subject: [accelio] When could I free the request message? (#15)
When I use one way xio_send_msg api, I can free the message by on_ow_msg_send_complete callback. I can free response message by on_msg_send_complete callback. But how to free the request message which is already sent to other side?
Do I need free request message by myself?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/15.
from accelio.
I invoke xio_send_request and the message is dynamic malloced. Is it my responsibility to free this message when response arrived(or on_msg callback, when message type is XIO_MESSAGE_TYPE_RESPONSE)? Or Will xio_release_response will free the request message in library?
from accelio.
Accelio does not release your buffer. it your responsibility to release them. Accelio only release its own resources
Some notes:
-
Do not allocate on runtime – you may suffer low performance. You can use Accelio mem pool facility to pre allocate buffers and recycle the buffers after they are no longer needed without the need to reallocate
-
Please note that you should register the buffer via xio_reg_mr – failing to do so, will cause copy of your buffer to internal buffers. (do not register memory on fast path – as you may suffer low performance)
-
Before “free” of the buffer, you should call xio_dereg_mr to release memory.
Eyal
From: reyoung [mailto:[email protected]]
Sent: Tuesday, April 14, 2015 8:57 AM
To: accelio/accelio
Cc: Eyal Salomon
Subject: Re: [accelio] When could I free the request message? (#15)
I invoke xio_send_request and the message is dynamic malloced. Is it my responsibility to free this message when response arrived(or on_msg callback, when message type is XIO_MESSAGE_TYPE_RESPONSE)? Or Will xio_release_response will free the request message in library?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-92619560.
from accelio.
OK. Thank you very much.
from accelio.
Related Issues (20)
- Question about accelio RPC HOT 3
- Flush error in trace log HOT 1
- memory leak without mr HOT 2
- Slow RDMA req/rsp performance even than TCP HOT 1
- Benchmark failure over RDMA
- Thread stuck in busy loop when RDMA is being used
- compile accelio error in centos6.5 HOT 5
- can accelio be used with a framework like wangle HOT 1
- testing hello_test and not respond
- Keepalive isn't always triggered HOT 8
- hello word Concurrent test error
- (sheepdog) mempool is empty for 12587576 bytes HOT 2
- Peer Direct Support HOT 1
- Huge latency noticed of RDMA session_established for multi-process HOT 4
- SIGSEGV on hello_test HOT 1
- failed to build kmod with MLNX_OFED 4.0-2.0.0.1 driver HOT 1
- Is accelio abandoned? HOT 15
- xio_context_stop_loop sometimes failed to stop loop HOT 11
- kernel built failed as conflict with ofed-3.4
- Is accelio.org website still alive? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from accelio.