SoC proposal, preliminary text

Divacky Roman xdivac02 at stud.fit.vutbr.cz
Sun Mar 18 09:29:21 UTC 2007


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 at 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.



More information about the freebsd-emulation mailing list