[ofa-general] performance to call ibv_poll_cq() vs. call select() on completion channel
Tang, Changqing
changquing.tang at hp.com
Wed Sep 2 15:17:37 PDT 2009
> >
> > 1. call select() on completion channel with zero
> timeout and return 0.
> > 2. call ibv_poll_cq() directly and return 0.
> >
> > Question:
> >
> > Which way has lower overhead ?
> ibv_poll_cq
> > We know select() has to switch to kernel mode, does ibv_poll_cq()
> > switch to kernel mode and may cause a context switch ?
> >
> No - it's pure user space function
But I just check the source code, ibv_poll_cq() is actually ibv_cmd_poll_cq(),
and ibv_cmd_poll_cq() calls write() system call on the IB device.
Doesn't this write() system call switch to kernel mode and possiblely casuse
a context switch ?
--CQ
>
> Tziporet
More information about the general
mailing list