From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>, linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Miklos Szeredi <mszeredi@suse.cz>,
Juri Lelli <juri.lelli@gmail.com>, Zach Brown <zab@zabbo.net>,
David Drysdale <drysdale@google.com>,
Kees Cook <keescook@chromium.org>,
Alexei Starovoitov <ast@plumgrid.com>,
David Herrmann <dh.herrmann@gmail.com>,
Dario Faggioli <raistlin@linux.it>, Theodore Ts'o <tytso@mit.edu>,
Peter Zijlstra <peterz@infradead.org>,
Vivek Goyal <vgoyal@redhat.com>,
Mike Frysinger <vapier@gentoo.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Oleg Nesterov <oleg@redhat.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Fabian Frederick <fabf@skynet.be>,
Josh Triplett <josh@joshtriplett.o>
Subject: Re: [RESEND PATCH 2/3] epoll: Add implementation for epoll_pwait1
Date: Thu, 08 Jan 2015 12:10:51 +0100 [thread overview]
Message-ID: <54AE65BB.1020707@redhat.com> (raw)
In-Reply-To: <1420708563-21743-3-git-send-email-famz@redhat.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>, linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Miklos Szeredi <mszeredi@suse.cz>,
Juri Lelli <juri.lelli@gmail.com>, Zach Brown <zab@zabbo.net>,
David Drysdale <drysdale@google.com>,
Kees Cook <keescook@chromium.org>,
Alexei Starovoitov <ast@plumgrid.com>,
David Herrmann <dh.herrmann@gmail.com>,
Dario Faggioli <raistlin@linux.it>,
"Theodore Ts'o" <tytso@mit.edu>,
Peter Zijlstra <peterz@infradead.org>,
Vivek Goyal <vgoyal@redhat.com>,
Mike Frysinger <vapier@gentoo.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Oleg Nesterov <oleg@redhat.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Fabian Frederick <fabf@skynet.be>,
Josh Triplett <josh@joshtriplett.o
Subject: Re: [RESEND PATCH 2/3] epoll: Add implementation for epoll_pwait1
Date: Thu, 08 Jan 2015 12:10:51 +0100 [thread overview]
Message-ID: <54AE65BB.1020707@redhat.com> (raw)
In-Reply-To: <1420708563-21743-3-git-send-email-famz@redhat.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>, linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Miklos Szeredi <mszeredi@suse.cz>,
Juri Lelli <juri.lelli@gmail.com>, Zach Brown <zab@zabbo.net>,
David Drysdale <drysdale@google.com>,
Kees Cook <keescook@chromium.org>,
Alexei Starovoitov <ast@plumgrid.com>,
David Herrmann <dh.herrmann@gmail.com>,
Dario Faggioli <raistlin@linux.it>,
"Theodore Ts'o" <tytso@mit.edu>,
Peter Zijlstra <peterz@infradead.org>,
Vivek Goyal <vgoyal@redhat.com>,
Mike Frysinger <vapier@gentoo.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Oleg Nesterov <oleg@redhat.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Fabian Frederick <fabf@skynet.be>,
Josh Triplett <josh@joshtriplett.org>,
"David S. Miller" <davem@davemloft.net>,
linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [RESEND PATCH 2/3] epoll: Add implementation for epoll_pwait1
Date: Thu, 08 Jan 2015 12:10:51 +0100 [thread overview]
Message-ID: <54AE65BB.1020707@redhat.com> (raw)
In-Reply-To: <1420708563-21743-3-git-send-email-famz@redhat.com>
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
next prev parent reply other threads:[~2015-01-08 11:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 9:16 [RESEND PATCH 0/3] epoll: Add epoll_pwait1 syscall Fam Zheng
2015-01-08 9:16 ` Fam Zheng
2015-01-08 9:16 ` [RESEND PATCH 1/3] epoll: Extract epoll_wait_do and epoll_pwait_do Fam Zheng
2015-01-08 9:16 ` Fam Zheng
2015-01-08 9:16 ` [RESEND PATCH 2/3] epoll: Add implementation for epoll_pwait1 Fam Zheng
2015-01-08 9:16 ` Fam Zheng
2015-01-08 11:10 ` Paolo Bonzini [this message]
2015-01-08 11:10 ` Paolo Bonzini
2015-01-08 11:10 ` Paolo Bonzini
[not found] ` <54AE65BB.1020707-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-01-08 11:48 ` Michael Kerrisk (man-pages)
2015-01-08 11:48 ` Michael Kerrisk (man-pages)
2015-01-08 11:48 ` Michael Kerrisk (man-pages)
2015-01-08 9:16 ` [RESEND PATCH 3/3] x86: hook up epoll_pwait1 syscall Fam Zheng
2015-01-08 9:16 ` Fam Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54AE65BB.1020707@redhat.com \
--to=pbonzini@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=ast@plumgrid.com \
--cc=dh.herrmann@gmail.com \
--cc=drysdale@google.com \
--cc=fabf@skynet.be \
--cc=famz@redhat.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=josh@joshtriplett.o \
--cc=juri.lelli@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=mszeredi@suse.cz \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=raistlin@linux.it \
--cc=tglx@linutronix.de \
--cc=tytso@mit.edu \
--cc=vapier@gentoo.org \
--cc=vgoyal@redhat.com \
--cc=viro@zeniv.linux.org.uk \
--cc=x86@kernel.org \
--cc=zab@zabbo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.