svn commit: r255672 - in head/sys: amd64/linux32 compat/linux conf i386/linux kern modules/linux sys
mjguzik at gmail.com
Fri May 2 18:56:59 UTC 2014
On Fri, May 02, 2014 at 10:37:05PM +0400, Chagin Dmitry wrote:
> On Wed, Sep 18, 2013 at 08:46:48PM +0200, Mateusz Guzik wrote:
> > On Wed, Sep 18, 2013 at 05:56:04PM +0000, Roman Divacky wrote:
> > > Author: rdivacky
> > > Date: Wed Sep 18 17:56:04 2013
> > > New Revision: 255672
> > > URL: http://svnweb.freebsd.org/changeset/base/255672
> > >
> > > Log:
> > > Implement epoll support in Linuxulator. This is a tiny wrapper around kqueue
> > > to implement epoll subset of functionality. The kqueue user data are 32bit
> > > on i386 which is not enough for epoll user data so this patch overrides
> > > kqueue fileops to maintain enough space in struct file.
> > >
> > > Initial patch developed by me in 2007 and then extended and finished
> > > by Yuri Victorovich.
> > >
> I'm strongly dislike a hacking kqueue file ops. I would prefer more
> generic mechanism.
> Maybe we need a emulator file ops in struct file, or a per proc list of
> such files. Any ideas?
Not sure what you mean.
I don't see any acceptable way around modifying kqueue. kqueue syscall will
install fd with kqops in your table, but you don't want that.
You want fd with epoll op. What's more, with epoll_create1 you want
to be able to set O_CLOEXEC atomically.
Thus, you need to either duplicate kqueue initialization code (but why?)
or modify it so that it supports both interfaces, which to some extent
was done in this patch.
Mateusz Guzik <mjguzik gmail.com>
More information about the svn-src-head