[PATCH] Add cleanup routines.

2014-04-11 Thread Hannes Weisbach
Dynamically loaded library handles are saved in a list and dlclosed() on exit. The list of struct ibv_driver *, as well as the global struct ibv_device ** list are free()d. Signed-off-by: Hannes Weisbach hannes_weisb...@gmx.net --- src/device.c | 10 ++ src/init.c | 51

[PATCH] Clean index map on exit

2014-04-11 Thread Hannes Weisbach
This patch adds the function idm_free() to free all entries of an index map. A call to this function is added in the ucma_cleanup destructor. The ucma_idm struct index_map is cleaned. Signed-off-by: Hannes Weisbach hannes_weisb...@gmx.net --- src/cma.c | 1 + src/indexer.c | 8 src

Re: [PATCH] Add cleanup routines.

2014-04-11 Thread Hannes Weisbach
Am 11.04.2014 um 19:00 schrieb Yann Droneaud ydrone...@opteya.com: Hi, Thanks for your quick reply. Please adds some explanation, in particular the purpose of the changes. Your commit message only explain how, but you should also explain why. Ok. In C, empty prototype declare a function

Re: [PATCH] Clean index map on exit

2014-04-11 Thread Hannes Weisbach
Is the array always full ? No, but it has to be zero-initialized and free(NULL) is fine. idm_set() does: if (!idm-array[idx_array_index(index)]) { if (idm_grow(idm, index) 0) (idm_grow does calloc().) So I concluded unused entries have to be zero already and I don't put a

Re: RDMA read does not update local memory

2014-02-13 Thread Hannes Weisbach
() on pinned memory/I/O memory should fail, i.e. return EINVAL, EIO or ENOMEM (I didn’t test what happens when you call madvise(MADV_DONTNEED) on I/O mem.) . RDMA actions on madvise()’d memory should fail. Best regards, Hannes Weisbach-- To unsubscribe from this list: send the line unsubscribe linux

Re: RDMA read does not update local memory

2014-01-31 Thread Hannes Weisbach
Am 30.01.2014 um 22:36 schrieb Anuj Kalia anujkaliai...@gmail.com: Hannes, Have you tried marking the memory that is being read as volatile“? Thanks for the suggestion, but I don’t think that this solves the problem, because when I do: memset(…); rdma_post_read(…); /* wait */ memcmp(…);

Re: RDMA read does not update local memory

2014-01-31 Thread Hannes Weisbach
Am 31.01.2014 um 15:26 schrieb Anuj Kalia anujkaliai...@gmail.com: Are you sure that the compiler knows that post_send() has side effects? No, thats why I tested with the mentioned memcmpv. I examined the emitted code with objdump and the compiler issued the mov instructions to read the bytes

RDMA read does not update local memory

2014-01-30 Thread Hannes Weisbach
the work completion reports IBV_SUCCESS. I hope you can give me some hints on how to proceed. I apologize if my problem description was too brief; please ask for details if I left important information out. Best regards, Hannes Weisbach-- To unsubscribe from this list: send the line unsubscribe linux-rdma

non-const pointer void * addr in rdma_reg_* and rdma_post_[send|write]

2013-11-27 Thread Hannes Weisbach
think this should be made explicit by using the type const void * for addr. In case you agree, I would volunteer to make the necessary changes. Best regards, Hannes Weisbach-- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org