(no commit message)
[ikiwiki.git] / docs / developer / gsocprojectspage / index.mdwn
90c0b013 1[[!meta title="Google Summer of Code Project List"]]
4114eeff 2
3[[!toc levels=0]]
f57c228c 5Have a look at our SoC pages from [[2008|/docs/developer/GoogleSoC2008/]], [[2009|/docs/developer/gsoc2009/]], [[2010|/docs/developer/gsoc2010/]] and [[2011|/docs/developer/gsoc2011/]] to get an overview about prior year's projects.
4114eeff 6
7For more details on Google's Summer of Code: [Google's SoC page](http://socghop.appspot.com/)
f57c228c 9Alternate project links: [[Projects page|/docs/developer/ProjectsPage/]], [[Research Projects|/docs/developer/researchprojectspage/]]
4114eeff 11Note to prospective students: These project proposals are meant to be a first approximation; we're looking forward to your own suggestions (even for completely new directions) and will try to integrate your ideas to make the GSoC project more interesting to all parties. Even when a proposal is very specific about the goals that must be achieved and the path that should be taken, these are always negotiable. Keep in mind that we have tried to limit the proposals on this page to those that (based on our past experience) are appropriate for the GSoC program. This is by no means a comprehensive list, original ideas or proposals based on project ideas found on other pages are very welcome.
13Note to everyone else: These proposals are by no means Summer of Code specific, anyone is welcome and encouraged to adopt any of these projects at any time (just please let us know, or make a note on this page).
17* Prerequisites: knowledge that the student should have before starting the project. It may be possible to acquire the knowledge in the course of the project, but the estimated difficulty would increase substantially. On the bright side, you can expect to have a much deeper understanding of these fields (and gain some real-world experience) after you successfully complete the respective project.
18* Difficulty: Estimated difficulty of the project, taking into account the complexity of the task and the time constraints of the GSoC program.
19* Contact point: The person you should contact for any further information or clarifications. If the primary contact for a project does not respond in a reasonable amount of time (2-3 days), you should contact the appropriate DragonFly BSD mailing list, usually kernel@.
21#### Project ideas
d71f44d1 23---
25##### Port pf firewall changes from FreeBSD
27DragonFly's version of the pf firewall was brought in from OpenBSD 4.7. FreeBSD imported the pf from OpenBSD 4.8 and has significant enhanced the SMP performance of the firewall. Port the FreeBSD version of pf.
29Meta information:
31* Prerequisites: C, network programing
32* Difficulty: Moderate
33* Contact point: kernel@crater.dragonflybsd.org, #dragonfly irc channel
37##### Sync wireless infrastructure / drivers from FreeBSD
39Rui Paulo ported the wireless infrastructure and ath drivers to DragonFly from FreeBSD in recent history. A lot has changed in the intervening time, the infrastructure should be synchronized/updated to match the state-of-the-art in FreeBSD. At a minimum the drivers that currently work in DragonFly should be tested to ensure functionality and updates as well or improved.
41Meta information:
43* Prerequisites: C, x86 assembly, drivers
44* Difficulty: Moderate
45* Contact point: kernel@crater.dragonflybsd.org, #dragonfly irc channel
a4c1e9f4 49##### Implement GEM for the DragonFly kernel
51The Graphics Execution Manager is a memory management system dedicated
52to Intel graphics chipsets. Along with KMS, it is a requirement of
532010 and more recent Intel Xorg drivers.
55The dports third-party application collection already contains all the userland bits needed to use the new drivers, provided WITH_NEW_XORG and WITH_KMS options are used in make.conf
57Background GEM information:
59* http://en.wikipedia.org/wiki/Graphics_Execution_Manager
60* http://lwn.net/Articles/283798/
61* http://blog.ffwll.ch/2012/10/i915gem-crashcourse.html
316dbc40 62
63Some kernel work has already been done in this domain by FreeBSD and could probably be adapted:
65* https://wiki.freebsd.org/Intel_GPU
67Related work has also been done previously by David Shao during a 2010 GSoC project:
69* http://www.dragonflybsd.org/docs/developer/GEMdrmKMS/
70* https://github.com/davshao/dflygsocdrm
72The dflygsocdrm branch is kept up-to-date but sadly seems to only be working on i386 DragonFly systems, and with ~2010 era Intel chipsets.
74An experimental port of the FreeBSD i915/kms code is also available, albeit non-working due to the missing GEM support.
76Adding PAT (Page Attribute Table) support to the kernel seems to be a required first step:
78* http://lwn.net/Articles/278994/
80Meta information:
82* Prerequisites: C, x86 architecture and paging knowledge
83* Difficulty: Moderate to difficult
84* Contact point: kernel@crater.dragonflybsd.org, #dragonfly irc channel
b3634623 88##### Implement Linux compatibility for the x86_64 DragonFly kernel
89* Add a syscall table which translates Linux system calls to DragonFly ones
a6283272 90* Add support for ELF binary detection.
906b9635 92DragonFly/i386 supports the execution of 32 bit Linux binaries; it
93is only natural to implement the same kind of binary compatibility
94for 64-bit systems.
a6283272 95
906b9635 96Some of the other *BSD systems may already have implemented such a mechanism.
a6283272 97
98Meta information:
b3634623 100* Prerequisites: C, i386 and amd64 architecture knowledge
a6283272 101* Difficulty: Moderate to difficult
102* Contact point: kernel@crater.dragonflybsd.org
4114eeff 104---
01f0e620 106##### Sync DragonFly jail capability with FreeBSD jail capability
56852582 107* Implement sysctl -d security.jail.{param}> (see FreeBSD man 8 jail)
01f0e620 108* port libjail (jail(), jail_get(), jail_set(), jail_remove(), jail_attach() functions) and incorporate into base
109* remove jail(), jail_attach() functions from libC
110* update existing system jail tools: jail, jls, jexec to match FreeBSD functionality and to use libjail
51f0cdd6 112The DragonFly jails were updated from FreeBSD-4.8 capability to FreeBSD 5.1 capability in 2005. They haven't been improved on since. This goal of this project is to make DragonFly jails to be functionally identical to FreeBSD 9.x jail functionality such that software designed to work using modern FreeBSD jail functions will work on DragonFly without modification.
01f0e620 113
114Meta information:
116* Prerequisites: C, OS Internals
117* Difficulty: Moderate to difficult
118* Contact point: kernel@crater.dragonflybsd.org
4fcf3f2c 122##### Make allocation in the DragonFly kernel NUMA-aware
4114eeff 123
124* Parse related ACPI tables
125* NUMA-aware memory allocation
126* References:
127[ACPI SLIT parser](http://mail-index.netbsd.org/tech-kern/2009/11/23/msg006518.html)
128[ACPI SRAT parser](http://mail-index.netbsd.org/tech-kern/2009/11/23/msg006517.html)
129[NetBSD NUMA diff](http://www.netbsd.org/~cegger/numa2.diff)
130[NetBSD NUMA x86 diff](http://www.netbsd.org/~cegger/numa_x86.diff) (These patches now in NetBSD tree)
4fcf3f2c 132* This is a huge project, the initial GSoC portion of this project should focus only on creating infrastructure and proving out that infrastructure. The initial work should attempt to not create or enforce any specific allocation _policies_ based on the available NUMA information, simply provide that information in an easy to access and use fashion and create the possibility at various levels of implementing a future allocation policy. This could be initially proven out with simple dummy policies.
4114eeff 134Meta information:
136* Prerequisites: C, introductory computer architecture
a4c1e9f4 137* Difficulty: Easy-Hard
4114eeff 138* Contact point: kernel@crater.dragonflybsd.org
4114eeff 142##### Port valgrind to DragonFlyBSD
144Valgrind is a very useful tool on a system like DragonFly that's under heavy development. Since valgrind is very target specific, a student doing the port will have to get acquainted with many low level details of the system libraries and the user<->kernel interface (system calls, signal delivery, threading...). This is a project that should appeal to aspiring systems programmers. Ideally, we would want the port to be usable with vkernel processes, thus enabling complex checking of the core kernel code.
146The goal of this project is to port valgrind to the DragonFlyBSD platform so that at least the memcheck tool runs sufficiently well to be useful. This is in itself a challenging task. If time remains, the student should try to get at least a trivial valgrind tool to work on a vkernel process.
148Meta information:
150* Prerequisites: C, x86 assembly, low-level OS internals
151* Difficulty: Hard
152* Contact point: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
a4c1e9f4 156##### Make vkernels checkpointable
4114eeff 157
158* See checkpt(1).
159* Implement save and restore of segment registers so that threaded applications may be checkpointed. The segment registers support TLS. There are potential security concerns here.
160* Teach the checkpt system call how to checkpoint multiple vmspaces.
161* Add code to the vkernel which gets triggered upon reception of a SIGCKPT signal to dump/load e.g. the current state of network drivers.
162* This would allow us to save and restore or even migrate a complete DragonFly operating system running on the vkernel platform.
163This could be especially handy on laptops (if we'd get X11 operating in vkernels).
164* See also: http://www.dragonflybsd.org/docs/developer/CheckpointFeatures/
a4c1e9f4 165* A student made good progress on this in 2011, a future student could use her work as a foundation to stand on to complete the project: https://github.com/iriina/DragonFlyBSD/tree/test2.10.1
4114eeff 166
167Meta information:
169* Prerequisites: C, OS internals
170* Difficulty: Medium
171* Contact point: Michael Neumann <mneumann@ntecs.de>
172* References: [1](http://leaf.dragonflybsd.org/mailarchive/kernel/2007-02/msg00073.html) [2](http://leaf.dragonflybsd.org/mailarchive/users/2007-02/msg00034.html)
176##### HAMMER compression
178* Compress blocks as they get written to disk.
179* Only file data (rec_type == DATA) should be compressed, not meta-data.
180* the CRC should be that of the uncompressed data.
181* ideally you'd need to associate the uncompressed data with the buffer cache buffer somehow, so that decompression is only performed once.
182* compression could be turned on a per-file or per-pfs basis.
183* gzip compression would be just fine at first.
185Doing compression would require flagging the data record as being compressed and also require double-buffering since
186the buffer cache buffer associated with the uncompressed data might have holes in it and otherwise referenced by user
187programs and cannot serve as a buffer for in-place compression or decompression.
189The direct read / direct write mechanic would almost certainly have to be disabled for compressed buffers and the
190small-data zone would probably have to be used (the large-data zone is designed only for use with 16K or 64K buffers).
192Meta information:
194* Prerequisites: C, filesystem internals
195* Difficulty: Difficult
196* Contact point: Michael Neumann <mneumann@ntecs.de>
4114eeff 200##### Userland System V Shared Memory / Semaphore / Message Queue implementation
201* Implement some or all of these subsystems in their entirety, or as completely as possible in userland using a daemon, mmap and the DragonFly umtx_sleep(2)/umtx_wakeup(2) or other userland facilities.
202* Any security or other major hurdles to this approach that would likely have to be implemented in-kernel should be noted in the students application.
203* Test and benchmark the new facilities with heavy SysV consumers such as PostgreSQL
204* Identify performance tradeoffs made in the userland implementation versus the existing kernel implementation. If time permits identify and apply solutions to these tradeoffs so that the userland implementation performs on par with or better than the kernel implementation.
206Meta information:
208* Prerequisites: C, x86 assembly
209* Difficulty: Moderate
210* Contact point: Samuel J. Greear <sjg@thesjg.com>
214##### Port Hyper-V Linux Integration components to DragonFly
215* Microsoft released a dual BSD/GPL version of their para-virtualized drivers (SCSI and Networking) for Linux.
216* This work would require porting the Linux VMBus (Microsoft's equivlalent to XenBus) and the corresponding SCSI (StorVSC) and networking (NetVSC) drivers to DragonFly.
217* References: [Sources](http://www.microsoft.com/downloads/en/details.aspx?FamilyID=eee39325-898b-4522-9b4c-f4b5b9b64551) [Architecture Overview](http://port25.technet.com/archive/2009/07/22/introduction-to-the-linux-integration-components.aspx)
8e2bdf60 218
219Meta information:
221* Prerequisites: C, OS internals
222* Difficulty: Hard
223* Contact point: kernel@crater.dragonflybsd.org
8e2bdf60 224
8cb8502a 225---
227##### Implement more dm targets
228* Since we now have dm (device mapper) in DragonFly, it would be nice to make better use of it. Currently we have a relatively small number of useful targets (crypt, linear and striped).
229* Other targets should be implemented, in particular the mirror target would be of interest. Other ideas are welcome, too. Before applying for this please discuss the target of interest on the mailing list or with me directly.
c2cfaa23 230* There is a start of a journalled mirror target, if you want to attack soft mirroring; the problem is a lot more difficult than it seems at first, so talking on the mailing list or on IRC would be definitely worthwhile!
8cb8502a 231
232Meta information:
234* Prerequisites: C, OS internals
235* Difficulty: Medium
c2cfaa23 236* Contact point: kernel@crater.dragonflybsd.org , Alex Hornung <alexh@dragonflybsd.org>, Venkatesh Srinivas <vsrinivas@dragonflybsd.org>
8cb8502a 237
3a9e5de8 238---
240##### Implement a new unionfs
241* unionfs is a particularly useful pseudo-fs which allows to have an upper and a lower filesystem on a single mountpoint. The upper mountpoint is mostly transparent, so that the lower mountpoint is accessible.
3a9e5de8 242* A typical use case is mounting a tmpfs filesystem as the upper and a read-only FS as the lower mp. This way files can be edited transparently even on a RO filesystem without actually modifying it.
65d9da85 243* The current unionfs is completely broken as it relies on the whiteout VFS technique which is not supported by HAMMER. A new unionfs implementation should not rely on archaic methods such as whiteout.
3a9e5de8 244
245Meta information:
247* Prerequisites: C, OS internals, ideally some knowledge of the FreeBSD/DragonFly VFS
248* Difficulty: Medium
249* Contact point: kernel@crater.dragonflybsd.org
8e2bdf60 250
0c47d1e1 251---
253##### Improve compatibility of libdevattr with Linux' libudev
254* Our libdevattr has an API which is mostly compatible with Linux' libudev, but it is doubtful that any Linux application making use of libudev would run out of the box on DragonFly with libdevattr.
b515bc2d 255* The aim of this project is to identify the shortcomings of libdevattr and fix them so that some common libudev applications work with our libdevattr.
256* This might involve some kernel hacking to improve our kern_udev and definitely includes some grunt work of "tagging" subsystems with the kern_udev API.
257* Most of the work will be in userland, though, working on udevd and libdevattr.
0c47d1e1 258
259Meta information:
261* Prerequisites: C, familiarity with Linux' libudev would be a plus
262* Difficulty: Medium
263* Contact point: kernel@crater.dragonflybsd.org , Alex Hornung <alexh@dragonflybsd.org>
9792e675 267---
fc1a3138 269##### Implement further dsched disk scheduling policies (2011 Project: BFQ)
9792e675 270* dsched is a highly flexible disk scheduling framework which greatly minimizes the effort of writing disk scheduling policies.
271* Currently only dsched_fq, a fairly simple fair-queuing policy, and noop policies are implemented.
272* The aim of this project would be to implement at least another useful disk scheduling policy, preferably one that improves interactivity.
273* Other ideas are welcome.
1e4090b0 274* This is a great opportunity for CS students interested in scheduling problems to apply their theoretical knowledge.
9792e675 275
276Meta information:
278* Prerequisites: C, OS internals, familiarity with disk scheduling
279* Difficulty: Medium
280* Contact point: kernel@crater.dragonflybsd.org , Alex Hornung <alexh@dragonflybsd.org>
82d3efd3 282---
692141e4 284##### Implement hardware nested page table support for vkernels
82d3efd3 285* Various modern hardware supports virtualization extensions, including nested pagetables.
286* The DragonFly BSD vmspaces API, used to support vkernels, is effectively a software implementation of nested pagetables.
287* The goal of this project would be to add support for detection of the hardware features on AMD and Intel cpu's and alter the vmspace implementation to use hardware support when available.
289Meta information:
9792e675 290
82d3efd3 291* Prerequisites: C, x86 assembly, OS internals
292* Difficulty: Hard
293* Contact point: kernel@crater.dragonflybsd.org
8ff76619 295---
ec874e8b 297##### Access to ktr(4) buffers via shared memory
298Our event tracing system, ktr(4), records interesting events in per-cpu buffers that are printed out with ktrdump(8). Currently, ktrdump uses libkvm to access these buffers, which is suboptimal. One can allow a sufficiently-privileged userspace process to map those buffers read-only and access them directly. For bonus points, design an extensible, discoverable (think reflection) mechanism that provides fast access via shared memory to data structures that the kernel chooses to expose to userland.
300Meta information:
302* Prerequisites: C, OS internals
303* Difficulty: Medium
304* Contact point: kernel@crater.dragonflybsd.org, Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
9376443d 306---
a4c1e9f4 307
9376443d 308##### nmalloc (libc malloc) measurements and performance work
310nmalloc is our libc memory allocator it is a slab-like allocator; it recently had some work done to add per-thread caches, but there is much more work that could be done. A project on this might characterize fragmentation, try out a number of techniques to improve per-thread caching and reduce the number of total syscalls, and see if any are worth applying.
312Possible things to work on:
313(thread caches)
314* The per-thread caches are fixed-size; at larger object sizes (say 4K), this can result in a lot of memory tied up. Perhaps they should scale their max size inversely to the object size.
316* The per-thread caches are filled one-at-a-time from free(). Perhaps the per-thread caches should be burst-filled.
318* Perhaps the per-thread caches should age items out
320(slab zone allocation)
321* zone_alloc() currently burst-allocates slab zones with the zone magazine held across a spinlock.
323* zone_free() holds the zone magazine lock around bzero()ing a slab zone header
325* zone_free() madvise()s one slab at a time; it'd be nice to madvise() runs of contiguous slabs
327* zone_free() madvise()s very readily (for every slab freed). Perhaps it should only madvise slabs that are idle for some time
329* zone_free() burst-frees slabs. Its not clear whether this is a good idea.
332* currently allocations > either 4k or 8k are forced directly to mmap(); this means that idle memory from free slabs cannot be used to service those allocations and that we do no caching for allocations > than that size. this is almost certainly a mistake.
334* we could use a small (embeddable) data structure that allows:
3351. efficient coalescing of adjacent mmap space for madvise
3362. efficient queries for vmem_alloc() (w/ alignment!)
3373. compact and doesn't use any space in the zone header (dirty/cold!)
3384. allows traversal in address order to fight fragmentation
3395. keep two such data structures (one for dirty pages, one for cold pages)
342* These are just ideas; there are many more things possible and many of these things need a lot of measurement to evaluate them. It'd be interesting to see if any of these are appropriate for it.
345* http://www.usenix.org/event/usenix01/bonwick.html
347A description of the Sun Solaris work on which the DragonFly allocator is based; use this as an overview, but do not take it as gospel for how the DFly allocator works.
349* http://leaf.dragonflybsd.org/~vsrinivas/jemalloc-tech-talk.ogv (Jason Evans tech talk about jemalloc, 1/2011)
351jemalloc is FreeBSD's and Firefox's (and NetBSD and GNASH and ...)'s malloc; in this tech talk, Jason Evans reviews how jemalloc works, how it has changed recently, and how it avoid fragmentation.
353* http://endeavour.zapto.org/src/malloc-thesis.pdf (Ayelet Wasik's thesis 'Features of a Multi-Threaded Memory Allocator')
355This thesis is an excellent overview of many techniques to reduce contention and the effects these techniques have on fragmentation.
357* Prerequisites: C, a taste of data structures
358* Difficulty: moderate
359* Contact point: Venkatesh Srinivas <me@endeavour.zapto.org>
01b524ba 361---
4c7e21d4 363##### Make DragonFly multiboot capable
364Adjust the DragonFly kernel to be multiboot (the specification) capable. In addition, add necessary code to grub2 to understand our disklabel64 and anything else we need to be able to use grub2 to multiboot DragonFly without any chainloading involved.
366Meta information:
368* Prerequisites: C, OS internals
369* Difficulty: Easy/Moderate
370* Contact point: Alex Hornung <alexh@dragonflybsd.org>
103f9a35 372---
a4c1e9f4 373
103f9a35 374##### Extend dsched framework to support jails
375Extend/modify the dsched framework to take into account jails and etc. instead of always allocating a 'tdio'. This would allow different process groupings (such as all processes in a jail) to be scheduled together. A new jail-specific policy would have to be written to support this, or an existing policy modified.
377Meta information:
379* Prerequisites: C, OS internals
380* Difficulty: Moderate
381* Contact point: kernel@lists.dragonflybsd.org, Samuel J. Greear <sjg@thesjg.com>, Alex Hornung <alexh@dragonflybsd.org>
1a9c0407 383---
2a10524a 384
385##### Implement i386 32-bit ABI for x86_64 64-bit kernel
386* Add a 32-bit syscall table which translates 32-bit
387 system calls to 64-bit.
388* Add support for 32 bit compatibility mode operation
389 and ELF binary detection.
391The idea here is to support the execution of 32 bit DragonFly binaries in 64 bit DragonFly environments, something numerous other operating systems have done. Several things must be done to support this. First, the appropriate control bits must be set to execute in 32-bit compatibility mode while in usermode instead of 64-bit mode. Second, when a system call is made from 32-bit mode a translation layer is needed to translate the system call into the 64-bit requivalent within the kernel. Third, the signal handler and trampoline code needs to operate on the 32-bit signal frame. Fourth, the 32 and 64 bit ELF loaders both have to be in the kernel at the same time, which may require some messing around with procedure names and include files since originally the source was designed to be one or the other.
393There are several hundred system calls which translates to a great deal of 'grunt work' when it comes time to actually do all the translations.
a4c1e9f4 395In 2012 a GSoC made reasonable progress on this project, a future GSoC student could pick up where he left off: http://gitweb.dragonflybsd.org/~ivan/dragonfly.git/shortlog/refs/heads/32bit_api_dirty_2
2a10524a 397Meta information:
399* Prerequisites: C
400* Difficulty: Difficult (lots of moving parts, particularly the trapframes)
401* Contact point: dillon
2a10524a 403---
405##### Adapt pkgsrc to create a package system with dependency independence.
a4c1e9f4 406* Create a set of tools (even better if it can be used like a library) that modifies how the pkgsrc packages are installed, allowing for the ability to upgrade individual packages, without stopping applications that depend on said packages from working. One method of achieving this is detailed at http://www.dragonflybsd.org/goals/#packages but other methods may be possible. PC-BSD have written a tool called PBI Builder which modifies FreeBSD ports for their dependency independence PBI system, this could be used as a starting point for the DragonFly BSD tools. Any attempt at this should leave room in the implementation to potentially work with other build systems, such as dports.
2a10524a 407
408Meta information:
410* Prerequisites: C
411* Difficulty: ?
412* Contact point: kernel@crater.dragonflybsd.org
2a10524a 414---
8d0fe716 415
a4c1e9f4 416##### Ability to execute Mach-O (OS X) binaries
2bb9dcbe 417This is a project for a student with something to prove, executing a binary touches a huge number of moving parts of a modern kernel. This project would entail adding or porting support for Mach-O binaries to the DragonFly BSD kernel. It would also involve adding an additional system call vector, like the Linux vector used for linux binary emulation. This is quite a large and complicated task and any proposal will be expected to be well-researched to reflect that. The ability to execute non-GUI binaries that make use of shared libraries should be the minimum to which such a project should aspire. OpenDarwin is available as a reference or to port relevant code from.
419Meta information:
421* Prerequisites: C, OS internals, binary file formats
422* Difficulty: Hard
423* Contact point: Samuel J. Greear <sjg@thesjg.com>
2bb9dcbe 425---
45e67a9e 426
2ca36c15 427##### Installer rework
428Upgrade/partially rewrite the installer to be much simpler to maintain. As part of reworking the installer, several functions scattered around in other base utils should be factored out into libraries that both the installer and the util it comes from can use, e.g.:
45e67a9e 429
430* partitioning (both GPT and MBR) should be factored out into two libraries, that the fdisk and the gpt tools use, but the installer can make use of, too.
431* disklabel32/64 functionality
432* adduser (and other user/group management)
2ca36c15 434The updated installer should then make use of all these new libraries and other ones that are already available (libcryptsetup, libluks, liblvm, libtcplay) to offer more advanced features.
45e67a9e 435
437Meta information:
439* Prerequisites: C
440* Difficulty: Moderate
441* Contact point: kernel@lists.dragonflybsd.org, Alex Hornung <alexh@dragonflybsd.org>
45e67a9e 443
a4c1e9f4 445---
446 (please add)