From: Eric Wong <normalperson@yhbt.net>
To: Nathaniel Yazdani <n1ght.4nd.d4y@gmail.com>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH for-next 2/4] epoll: epoll() syscall declaration
Date: Tue, 25 Feb 2014 10:30:14 +0000 [thread overview]
Message-ID: <20140225103013.GB9963@dcvr.yhbt.net> (raw)
In-Reply-To: <CAJ3m7BrjXvCOD_JpBHO7-ZuHFycr=GCrBiW2S1gfN4Ms-9h-Hw@mail.gmail.com>
Nathaniel Yazdani <n1ght.4nd.d4y@gmail.com> wrote:
> On Sun, Feb 23, 2014 at 9:32 PM, Eric Wong <normalperson@yhbt.net> wrote:
> > Nathaniel Yazdani <n1ght.4nd.d4y@gmail.com> wrote:
> >> +asmlinkage long sys_epoll(int ep, struct epoll __user *in,
> >> + unsigned int inc, struct epoll __user *out,
> >> + unsigned int outc, int timeout);
> >
> > I can understand using the new struct for 'in', but 'out' could just be
> > "struct epoll_event *" like sys_epoll_wait, right?
> >
> >> asmlinkage long sys_epoll_wait(int epfd, struct epoll_event __user *events,
>
> Yeah and I went back and forth on that, it just seemed to me that the
> inconsistency could be confusing to others... maybe instead of defining a new
> struct to begin with it might make me sense to just have an 'infd' array of file
> descriptors in addition to an 'in' array of epoll_event struct
> (obviously the length
> of these would be identical).
I don't think a separate array for in is a good idea, too error prone
and you lose locality.
For output, some users either end up allocating more memory/retrieve
fewer items with the larger struct for *out.
next prev parent reply other threads:[~2014-02-25 10:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 1:42 [RFC PATCH for-next 0/4] epoll: combined control/wait syscall Nathaniel Yazdani
2014-02-24 1:42 ` [RFC PATCH for-next 1/4] epoll: struct epoll userspace definiton Nathaniel Yazdani
2014-02-24 5:29 ` Eric Wong
[not found] ` <CAJ3m7Bq1y+MLn=HFY3AADnVc2HK31+WANahiYLUcdBw=hh_2pg@mail.gmail.com>
[not found] ` <20140225101527.GA9963@dcvr.yhbt.net>
2014-02-26 0:13 ` Nathaniel Yazdani
2014-02-24 1:42 ` [RFC PATCH for-next 2/4] epoll: epoll() syscall declaration Nathaniel Yazdani
2014-02-24 5:32 ` Eric Wong
2014-02-24 5:44 ` Nathaniel Yazdani
2014-02-25 10:30 ` Eric Wong [this message]
2014-02-25 23:44 ` Nathaniel Yazdani
2014-02-24 1:42 ` [RFC PATCH for-next 3/4] epoll: struct epoll support Nathaniel Yazdani
2014-02-24 18:59 ` Jonathan Corbet
2014-02-24 19:24 ` Nathaniel Yazdani
2014-02-24 1:42 ` [RFC PATCH for-next 4/4] epoll: epoll() syscall definition Nathaniel Yazdani
2014-02-25 10:21 ` Eric Wong
2014-02-25 23:46 ` Nathaniel Yazdani
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=20140225103013.GB9963@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=n1ght.4nd.d4y@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®