From owner-freebsd-emulation@FreeBSD.ORG Sun Mar 18 09:29:21 2007 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B23A16A403 for ; Sun, 18 Mar 2007 09:29:21 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.176.14]) by mx1.freebsd.org (Postfix) with ESMTP id F3ECF13C44B for ; Sun, 18 Mar 2007 09:29:20 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.8/8.13.7) with ESMTP id l2I9TJGZ072063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 18 Mar 2007 10:29:19 +0100 (CET) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.8/8.13.3/Submit) id l2I9TJUF072062 for emulation@freebsd.org; Sun, 18 Mar 2007 10:29:19 +0100 (CET) Date: Sun, 18 Mar 2007 10:29:19 +0100 From: Divacky Roman To: emulation@freebsd.org Message-ID: <20070318092919.GA71937@stud.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Scanned-By: MIMEDefang 2.57 on 147.229.176.14 Cc: Subject: SoC proposal, preliminary text X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2007 09:29:21 -0000 Hi, I am going to apply for this year's SoC, here's my proposal. please share your opinions on the text and on the work you'd like me to do (based on what I write in the proposal). thnx! Google's summer of code proposal Personal Name: Roman Divacky Address: Boreticka 9, Brno - Vinohrady, Czech republic Birth: May 25th, 1983 email: xdivac02@stud.fit.vutbr.cz Project Title: Update the Linuxulator Synopsis: Finish updating of the linux emulation layer to the Linux kernel as of 2.6.16 Benefits: Ability to run modern linux programs under this emulation, ability to switch to newer Fedora Core base systems in ports. Details: During last year linux emulation layer in FreeBSD has been updated to match linux 2.6.16 but there are still some rough edges preventing FreeBSD to switch to defaulting to 2.6 linux emulation. Most notably FreeBSD futex implementation is suboptimal and we lack epoll/inotify mechanism. Plus there are missing some minor syscalls that can prevent some applications from working (this demand is driven by user reports). Technical plan details: First I would finish the *at set of syscalls because those are required for 2.6.16 kernels and we have reports that applications are using them. This should be quite easy as I have most of the code done. Next part would be to scrutinize the current futex implementation and fixing it to make it work with the testing program. Some other patches should be incorporated (some of them are already written some are just ideas) hopefully resulting in fully working futexes. This is essential for the 2.6 emulation as we have failure reports now. The last thing is epoll/inotify interface which seems to be required by Linux-JDK so its considered important. 1) *at set of syscalls - this is done by splitting already existing syscall to foo_common() and foo() and adding fooat() where foo() is a plan wrapper around foo_common() and fooat() is wrapper with parameters modified by (already implemented) linux_at() function. 2) fixing futexes - currently we have futexes mostly working for all operations but FUTEX_WAKE_OP which seems to be broken under contestion. Also requeuing seems suspicious. The fixing work here would involve reviewing some already existing patches (changing the way requeuing is done) and pushing them upstream (to the FreeBSD and possibly NetBSD as well) and then investigate why the FUTEX_WAKE_OP doesnt work under contestion and make the best effort to fix it. Finally I'd like to review the locking of futexes as it already uses Giant to lock things. 3) epoll/inotify - epoll is a mechanism extending classic poll interface to be O(1). inotify is a mechanism that enables the listener to be notified about various event in the kernel linked to file system (open/close, change of attributes etc.). FreeBSD implements kqueue which serves similar purposes as epoll and inotify combined so it should be possible to implement epoll/inotify interface using kqueue. The epoll/inotify mechanism can monitor more events than kqueue so we might need to extend kqueue to include those events or don't support those. 4) other syscalls and bug fixes - the development of the Linuxulator is largely driven by its user community so I guess during the work people might come up with some requests for some specific syscalls to be implemented as already have happened in past. Also I expect to fix many bugs in the process as happened last year. Deliverables: o epoll/inotify implemented o fully working futex implementation o *at syscalls implemented o some other minor syscalls, depending on user testing and demand o as many bugs fixed as possible Project schedule: I am already working on the Linuxulator so first I'd finish the *at set of syscalls, then focus on fixing the futexes and finally work on epoll/inotify. In the meantime user community will be testing the Linuxulator so based on their feedback I might work on some other problems. I can start working in June (after exams) and I can work daily because I have no other duties during the summer. Bio: I am a student at Brno University of Technology, studying 5th year, aged 24. I have got BS degree here and currently finishing my MSc degree. I am a contributor to the FreeBSD project, my main area of interest is the Linux emulation layer. Last year I successfully applied for the Summer of Code and worked on improving Linuxulator to upgrade it to Linux 2.6 which ended successfully and the code got committed to the main source repository. After the Summer of Code ended I continued working on the project and during all that work I gained a lot of experience which I think makes me suitable for this year's work.