Date: Fri, 2 May 2014 20:56:52 +0200 From: Mateusz Guzik <mjguzik@gmail.com> To: Chagin Dmitry <dchagin@freebsd.org> Cc: svn-src-head@freebsd.org, yuri@rawbw.com, Roman Divacky <rdivacky@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r255672 - in head/sys: amd64/linux32 compat/linux conf i386/linux kern modules/linux sys Message-ID: <20140502185652.GA28158@dft-labs.eu> In-Reply-To: <20140502183705.GA10245@dchagin.static.corbina.net> References: <201309181756.r8IHu4qV052882@svn.freebsd.org> <20130918184648.GA31748@dft-labs.eu> <20140502183705.GA10245@dchagin.static.corbina.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140502185652.GA28158>