> No, there is no mmap. Like this:
 > 
 > u64 my_counter = 0;
 > 
 > ibv_set_mmu_counter(verbs, &my_counter);
 > [..]
 > while (my_counter != last_my_counter) {
 >     last_my_counter = my_counter;
 >     ibv_get_mmu_notifications(verbs, ...);   // <- I am a memory barrier as 
 > well
 > }
 > 
 > The kernel 'syscall' ibv_set_mmu_counter would bind the given verbs to
 > the 8 byte counter you specified without having to the mmap thing. As
 > I understand it this is what perfevents does.

I was trying to look at how perf events handles this, and AFAICT it
looks like kernel/perf_event.c just supports mmap().  Can you expand on
what you meant here?

(I was trying to figure out how one would handle the case where
userspace gives us a counter in highmem -- doing kmap_atomic() seems to
be to only option but then I'm not sure if I want to deal with that...)
-- 
Roland Dreier <rola...@cisco.com> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to