+GSoC Projects Page
[ikiwiki.git] / docs / developer / gsocprojectspage / index.mdwn
CommitLineData
4114eeff 1[[!meta title="Google Summer of Code 2010"]]
2
3[[!toc levels=0]]
4
5Have a look at our SoC pages from [[2008|docs/developer/GoogleSoC2008/]], [[2009|docs/developer/gsoc2009]] and [[2010|docs/developer/gsoc2010]] to get an overview about prior year's projects.
6
7For more details on Google's Summer of Code: [Google's SoC page](http://socghop.appspot.com/)
8
9Note 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.
10
11Note 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).
12
13Legend:
14
15* 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.
16* Difficulty: Estimated difficulty of the project, taking into account the complexity of the task and the time constraints of the GSoC program.
17* 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@.
18
19#### Project ideas
20
21##### VFS Quota System
22* Create a new kernel subsystem to manage quota's in a filesystem agnostic manner by interfacing with the kernel VFS layer.
23* Create filesystem-agnostic quota support tools for userland that obtain information in the same manner as eg: du(1) instead of parsing the filesystem internals directly as the existing quota tools do (see quotacheck(8), repquota(8), edquota(8), ...).
24* The quota file storage can be modeled after the existing UFS code that does the same, but should use the more general bytes, files and/or directories metrics instead of the somewhat UFS-specific blocks and inodes.
25
26Meta information:
27
28* Prerequisites: C, introductory filesystems internals
29* Difficulty: Moderate
30* Contact point: Samuel J. Greear <sjg@thesjg.com>
31
32---
33
34##### HAMMER Data dedup
35
36The HAMMER filesystem is very efficient in sharing data between its fine-grained
37snapshots, but when you copy (or otherwise duplicate) a file or directory tree, the data
38is no longer shared. This is suboptimal because then we make poor use of disk space
39and the same data gets cached multiple times wasting precious RAM space.
40
41The goal of this project is to add a data de-duplication mechanism to the HAMMER
42filesystem. A reasonable approach would be to detect potential data matches using
43CRCs during pruning runs. Then you could verify there is actual duplication of data
44(i.e. the match is not a false positive), collapse the B-Tree data reference and account for the additional reference in the allocation blockmap.
45
46BSD kernels cache data on a per-vnode basis, possibly investigate methods by which de-duplication could be extended into the vnode layer.
47
48Meta information:
49
50* Prerequisites: C, modern filesystem internals
51* Difficulty: Moderate
52* Contact point: dillon
53
54---
55
56##### Implement i386 32-bit ABI for x86_64 64-bit kernel
57* Add a 32-bit syscall table which translates 32-bit
58 system calls to 64-bit.
59* Add support for 32 bit compatibility mode operation
60 and ELF binary detection.
61
62The 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.
63
64There are several hundred system calls which translates to a great deal of 'grunt work' when it comes time to actually do all the translations.
65
66Meta information:
67
68* Prerequisites: C
69* Difficulty: Difficult (lots of moving parts, particularly the trapframes)
70* Contact point: dillon
71
72---
73
74##### Implement ARC algorithm extension for the vnode free list
75* Vnode recycling is LRU and can't efficiently handle data sets which
76 exceed the maxvnode limit. When the maxvnode limit is reached the kernel
77 starts throwing away cached vnodes along with their VM objects (and thus
78 all related cached file data).
79
80* What we would like to do is implement an ARC algorithm for the free
81 vnodes to determine which ones to throw away and potentially combine
82 this with further caching of the related VM object even after the vnode
83 is thrown away by associating it with a mount point and inode number,
84 until memory pressure forces all of its pages out.
85
86* For this project the student can choose to just implement the VM object
87 retention portion and not try to implement an ARC algorithm (which can
88 be considerably more complex).
89
90Meta information:
91
92* Prerequisites: C, OS internals
93* Difficulty: Modest without ARC (Very difficult with ARC)
94* Contact point: dillon
95
96---
97
98##### Implement swapoff
99* We have swapon to add swap space, we need a swapoff to
100 remove it.
101
102Meta information:
103
104* Prerequisites: C, elementary OS memory management
105* Difficulty: Modest
106* Contact point: dillon
107
108Status:
109
110* In-progress
111
112---
113
114##### Make DragonFly NUMA-aware
115
116* Parse related ACPI tables
117* NUMA-aware memory allocation
118* References:
119[ACPI SLIT parser](http://mail-index.netbsd.org/tech-kern/2009/11/23/msg006518.html)
120[ACPI SRAT parser](http://mail-index.netbsd.org/tech-kern/2009/11/23/msg006517.html)
121[NetBSD NUMA diff](http://www.netbsd.org/~cegger/numa2.diff)
122[NetBSD NUMA x86 diff](http://www.netbsd.org/~cegger/numa_x86.diff) (These patches now in NetBSD tree)
123
124Meta information:
125
126* Prerequisites: C, introductory computer architecture
127* Difficulty: Easy
128* Contact point: kernel@crater.dragonflybsd.org
129
130---
131
132
133##### Port valgrind to DragonFlyBSD
134
135Valgrind 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.
136
137The 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.
138
139Meta information:
140
141* Prerequisites: C, x86 assembly, low-level OS internals
142* Difficulty: Hard
143* Contact point: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
144
145---
146
147##### Adapt pkgsrc to create a package system with dependency independence.
148* Create a set of tools 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.
149
150Meta information:
151
152* Prerequisites: C
153* Difficulty: ?
154* Contact point: kernel@crater.dragonflybsd.org
155
156---
157
158##### Implement virtio drivers on DragonFly to speed up DragonFly as a KVM guest
159
160As virtualization is coming more and more and KVM will be a strong player in that field,
161we want DragonFly to have top-notch support for this virtualization platform. For this
162purpose, we'd like to have a virtio-based implementation of a paravirtualized disk and
163network driver. [virtio](http://www.ibm.com/developerworks/linux/library/l-virtio/index.html)
164is an abstraction to a ring buffer that is shared between the host and the guest. On top of this
165abstraction, one can build a variety of paravirtualized devices, as specified in
166[virtio-spec](http://ozlabs.org/~rusty/virtio-spec/virtio-spec-0.8.6.pdf).
167
168The goal of this project is to create a virtio-ring implementation and then to implement drivers
169for the network and block devices described in the specification linked to above. This is a great
170project for a student who wants to get experience writing (real-world, high-performance) device
171drivers without having to deal with the quirks of real hardware.
172
173Meta information:
174
175* Prerequisites: C, elementary OS internals
176* Difficulty: Easy
177* Contact point: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>, kernel@crater.dragonflybsd.org
178
179---
180
181##### Port PUFFS from FreeBSD/NetBSD
182
183* http://www.netbsd.org/docs/puffs/
184* This would make many userspace filesystems available to DragonFly, e.g. sshfs to mention only one.
185
186Meta information:
187
188* Prerequisites: C, elementary OS internals
189* Difficulty: Medium
190* Contact point: Michael Neumann <mneumann@ntecs.de>
191
192---
193
194##### Make vkernels checkpointable
195
196* See checkpt(1).
197* 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.
198* Teach the checkpt system call how to checkpoint multiple vmspaces.
199* 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.
200* This would allow us to save and restore or even migrate a complete DragonFly operating system running on the vkernel platform.
201This could be especially handy on laptops (if we'd get X11 operating in vkernels).
202* See also: http://www.dragonflybsd.org/docs/developer/CheckpointFeatures/
203
204Meta information:
205
206* Prerequisites: C, OS internals
207* Difficulty: Medium
208* Contact point: Michael Neumann <mneumann@ntecs.de>
209* References: [1](http://leaf.dragonflybsd.org/mailarchive/kernel/2007-02/msg00073.html) [2](http://leaf.dragonflybsd.org/mailarchive/users/2007-02/msg00034.html)
210
211---
212
213##### HAMMER compression
214
215* Compress blocks as they get written to disk.
216* Only file data (rec_type == DATA) should be compressed, not meta-data.
217* the CRC should be that of the uncompressed data.
218* ideally you'd need to associate the uncompressed data with the buffer cache buffer somehow, so that decompression is only performed once.
219* compression could be turned on a per-file or per-pfs basis.
220* gzip compression would be just fine at first.
221
222Doing compression would require flagging the data record as being compressed and also require double-buffering since
223the buffer cache buffer associated with the uncompressed data might have holes in it and otherwise referenced by user
224programs and cannot serve as a buffer for in-place compression or decompression.
225
226The direct read / direct write mechanic would almost certainly have to be disabled for compressed buffers and the
227small-data zone would probably have to be used (the large-data zone is designed only for use with 16K or 64K buffers).
228
229Meta information:
230
231* Prerequisites: C, filesystem internals
232* Difficulty: Difficult
233* Contact point: Michael Neumann <mneumann@ntecs.de>
234
235---
236
237
238##### Port usb4bsd
239* Port the whole usb4bsd stuff to DragonFly, as our own usb stack is too outdated.
240
241* The usb4bsd branch of hselasky (?) has several userland wrappers and quite good abstraction to simplify the porting.
242
243Meta information:
244
245* Prerequisites: C, OS internals
246* Difficulty: Moderate
247* Contact point: kernel@crater.dragonflybsd.org
248
249---
250
251##### Userland System V Shared Memory / Semaphore / Message Queue implementation
252* 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.
253* 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.
254* Test and benchmark the new facilities with heavy SysV consumers such as PostgreSQL
255* 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.
256
257Meta information:
258
259* Prerequisites: C, x86 assembly
260* Difficulty: Moderate
261* Contact point: Samuel J. Greear <sjg@thesjg.com>
262
263---
264
265
266##### Update our interrupt routing and PCI code
267* Update our interrupt routing to ACPI interrupt routing instead of relying on the mptable exclusively
268* Update the PCI code to take advantage of MSI (Message Signalled Interrupts)
269
270Meta information:
271
272* Prerequisites: C, OS internals
273* Difficulty: Hard
274* Contact point: kernel@crater.dragonflybsd.org
275
276---
277
278##### Proportional RSS
279
280The Resident Stack Size displayed by top keeps track of the number of resident pages in
281a certain process's adress space. It is very useful to locate memory hogs, but doesn't take
282into account page sharing. For example, if N processes map library L and L's resident pages
283are 1G, this 1G is added to the RSS of all N processes. A more useful number would be the
284Proportional (or Effective) RSS, for which we divide the number of mapped shared pages by
285the number of processes sharing each page. So in the previous example we would add 1GB/N
286to each process that has L mapped.
287
288The goal of this project is to hack the kernel to allow for effective calculation of the
289Proportional RSS and modify top to use it in addition to the RSS (i.e. it should display it by
290default and be able to sort based on it).
291
292Meta information:
293
294* Prerequisites: C, Elementary OS internals
295* Difficulty: Easy
296* Contact point: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
297
298Status:
299
300* Possibly in-progress
301
302---
303
304 (please add)