lkml.org 
[lkml]   [2015]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND PATCH 2/3] epoll: Add implementation for epoll_pwait1


On 08/01/2015 10:16, Fam Zheng wrote:
> Unlike ppoll(2), which accepts a timespec argument "timeout_ts" to
> specify the timeout, epoll_wait(2) and epoll_pwait(2) expect a
> microsecond timeout in int type.
>
> This is an obstacle for applications in switching from ppoll to epoll,
> if they want nanosecond resolution in their event loops.
>
> Therefore, adding this variation of epoll wait interface, giving user an
> option with *both* advantages, is a reasonable move: there could be
> constantly scalable performance polling many fds, while having a
> nanosecond timeout precision (assuming it has properly set up timer
> slack with prctl(2)).
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> fs/eventpoll.c | 24 ++++++++++++++++++++++++
> include/linux/syscalls.h | 4 ++++
> kernel/sys_ni.c | 3 +++
> 3 files changed, 31 insertions(+)

As mentioned by Miklos in the non-resent version, please add a flags
argument. Invalid flags should return -EINVAL.

In fact, we could already use the flags argument to specify an absolute
timeout, which is a nice thing to have for QEMU too.

Paolo


\
 
 \ /
  Last update: 2015-01-08 12:21    [W:0.064 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site