Romain Geissler
2013-04-15 07:48:05 UTC
Hi,
I am currently facing an issue when reading in a set of several posix
queues (let's say 2 different mqueues) from several processes. I
currently use epoll_wait to wait for an incoming message on either
queue on all listening processes, then mq_timedreceive to retrieve it
from the queue.
This is an issue when the number of reader process grows, as if I send
only one message on a queue, all processes are awaken when epoll_wait
returns, and all processes try to fetch the message. I would like to
fix this and wake up only one process when listening to several
queues, removing the useless user/kernel space switchs for the other
listening processes.
Is there any way to run a mq_receive/mq_timedreceive on several
queues, that would wake up only one process? Something more or less
like epoll, but that also fetches a message from the readable queues
before returning.
Thanks,
Romain
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
I am currently facing an issue when reading in a set of several posix
queues (let's say 2 different mqueues) from several processes. I
currently use epoll_wait to wait for an incoming message on either
queue on all listening processes, then mq_timedreceive to retrieve it
from the queue.
This is an issue when the number of reader process grows, as if I send
only one message on a queue, all processes are awaken when epoll_wait
returns, and all processes try to fetch the message. I would like to
fix this and wake up only one process when listening to several
queues, removing the useless user/kernel space switchs for the other
listening processes.
Is there any way to run a mq_receive/mq_timedreceive on several
queues, that would wake up only one process? Something more or less
like epoll, but that also fetches a message from the readable queues
before returning.
Thanks,
Romain
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html