6fe81c06614ec527795e7eb05844b117c9c9a6f9
[ikiwiki.git] / docs / developer / gsoc2010 / index.mdwn
1 [[!meta title="Google Summer of Code 2010"]]
2
3 [[!toc  levels=0]]
4
5 DragonFly BSD is planning to participate (pending acceptance) in the Google Summer of Code program for 2010.
6
7
8 Have a look at our SoC pages from [[2008|docs/developer/GoogleSoC2008/]] and [[2009|docs/developer/gsoc2009]] to get an overview about prior year's projects.  The [Projects Page](/docs/developer/ProjectsPage/) is also a potential source of ideas.
9
10
11 For more details on Google's Summer of Code: [Google's SoC page](http://socghop.appspot.com/)
12
13 Legend:
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.
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
26 Meta 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 * Add a data de-duplication mechanism to HAMMER.
36
37 * Potential data matches using CRCs during pruning runs,
38   verify duplicate data, collapse the B-Tree reference,
39   and account for the additional ref in the allocator.
40
41 Meta information:
42
43 * Prerequisites: C, modern filesystem internals
44 * Difficulty: Moderate
45 * Contact point: dillon
46
47 ---
48
49 ##### Implement i386 32-bit ABI for x86_64 64-bit kernel
50 * Add a 32-bit syscall table which translates 32-bit
51   system calls to 64-bit
52
53 * Add support for 32 bit compatibility mode operation
54   and ELF binary detection.
55
56 Meta information:
57
58 * Prerequisites: C
59 * Difficulty: Moderate
60 * Contact point: dillon
61
62 ---
63
64 ##### Implement ARC algorithm for vnode free list
65 * Vnode recycling is LRU and can't efficiently handle data sets which
66   exceed the maxvnode limit.
67
68 Meta information:
69
70 * Prerequisites: C, OS internals
71 * Difficulty: Modest
72 * Contact point: dillon
73
74 ---
75
76 ##### Implement swapoff
77 * We have swapon to add swap space, we need a swapoff to
78   remove it.
79
80 Meta information:
81
82 * Prerequisites: C, elementary OS memory management
83 * Difficulty: Modest
84 * Contact point: dillon
85
86 ---
87
88 ##### Graphics Kernel Memory Manager Support ( GEM )
89 * Support dealing with graphics NUMA in kernel space for modern graphics hardware
90 * http://en.wikipedia.org/wiki/Graphics_Execution_Manager
91
92 Meta information:
93
94 * Prerequisites: C, knowledge of modern computer graphics system architecture
95 * Difficulty: Moderate
96 * Contact point: kernel@crater.dragonflybsd.org
97
98 ---
99
100 ##### Make DragonFly NUMA-aware 
101
102 * Parse related ACPI tables 
103 * NUMA-aware memory allocation
104 * References:
105 [ACPI SLIT parser](http://mail-index.netbsd.org/tech-kern/2009/11/23/msg006518.html)
106 [ACPI SRAT parser](http://mail-index.netbsd.org/tech-kern/2009/11/23/msg006517.html)
107 [NetBSD NUMA diff](http://www.netbsd.org/~cegger/numa2.diff)
108 [NetBSD NUMA x86 diff](http://www.netbsd.org/~cegger/numa_x86.diff)
109
110 Meta information:
111
112 * Prerequisites: C, introductory computer architecture
113 * Difficulty: Easy
114 * Contact point: kernel@crater.dragonflybsd.org
115
116 ---
117
118 ##### Volume Management based on NetBSD's port of LVM2
119
120 NetBSD reimplemented Linux's device mapper (currently only implementing
121 the linear, zero and error targets; Linux has support for a variety of
122 targets, including crypt, stripe, snap, multipath) as dm(4). Device mapper
123 provides the functionality on which to implement volume management; NetBSD
124 has imported LVM2 (which is GPL), but it is possible to create different
125 tools for volume management (e.g. IBM's EVMS was also built on top of device
126 mapper).
127
128 The goal of this project is to port both the kernel code, dm(4), and the
129 LVM2 userspace libraries and tools from NetBSD. If time remains, the
130 student should also implement a proof of concept "stripe" target or, for the
131 more ambitious, a "crypt" target.
132
133 A possible roadmap for this project would be
134
135 1. Port the dm(4) code
136
137     This code uses proplib instead of binary ioctls for communicating with
138 userspace. Either port proplib, or convert the code to use ioctls.
139
140 1. Port the userspace tools
141
142     Integrate the tools in our source tree using a separate vendor branch, as
143 is normally done for contrib software (see development(7)). Make any
144 DragonFlyBSD-specific changes necessary.
145
146 1. (Optional) Implement either a "stripe" target or a crypt target.
147
148     The stripe target must be designed with robustness and extensibility in
149 mind, though it is not required to go all the way. It should be flexible
150 enough to allow for different RAID level implementations (at least 0, 1
151 and 5). Additionally, it should be possible to keep an internal (i.e. part
152 of the volume) log to speed up resyncing and parity checking. Implementing
153 those features would be ideal, but is not required.
154
155     The crypt target must allow for different ciphers and cipher parameters and
156 should make use of our in-kernel crypto infrastructure. It is probably
157 necessary to do the encryption asynchronously which will require extending
158 the current infrastructure.
159
160 Meta information:
161
162 * Prerequisites: C, elementary OS internals
163 * Difficulty: Medium
164 * Contact point: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
165
166 ---
167
168 ##### Port DragonFly to ARM platform
169
170 Meta information:
171
172 * Prerequisites: C, ARM assembly, x86 assembly
173 * Difficulty: Extremely hard
174 * Contact point: kernel@crater.dragonflybsd.org
175
176
177 ---
178
179 ##### Port DragonFly to Xen platform
180
181 Meta information:
182
183 * Prerequisites: C, x86 assembly
184 * Difficulty: Hard
185 * Contact point: kernel@crater.dragonflybsd.org
186
187 ---
188
189 ##### Port valgrind to DragonFlyBSD
190
191 Valgrind 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.
192
193 The 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.
194
195 Meta information:
196
197 * Prerequisites: C, x86 assembly, low-level OS internals
198 * Difficulty: Hard
199 * Contact point: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
200
201 ---
202
203 ##### Adapt pkgsrc to create a package system with dependency independence.
204 * 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.
205
206 Meta information:
207
208 * Prerequisites: C
209 * Difficulty: ?
210 * Contact point: kernel@crater.dragonflybsd.org
211
212 ---
213
214 ##### Implement virtio drivers on DragonFly to speed up DragonFly as a KVM guest
215
216 As virtualization is coming more and more and KVM will be a strong player in that field,
217 we want DragonFly to have top-notch support for this virtualization platform. For this
218 purpose, we'd like to have a virtio-based implementation of a paravirtualized disk and
219 network driver. [virtio](http://www.ibm.com/developerworks/linux/library/l-virtio/index.html)
220 is an abstraction to a ring buffer that is shared between the host and the guest. On top of this
221 abstraction, one can build a variety of paravirtualized devices, as specified in
222 [virtio-spec](http://ozlabs.org/~rusty/virtio-spec/virtio-spec-0.8.6.pdf).
223
224 The goal of this project is to create a virtio-ring implementation and then to implement drivers
225 for the network and block devices described in the specification linked to above. This is a great
226 project for a student who wants to get experience writing (real-world, high-performance) device
227 drivers without having to deal with the quirks of real hardware.
228
229 Meta information:
230
231 * Prerequisites: C, elementary OS internals
232 * Difficulty: Easy
233 * Contact point: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>, kernel@crater.dragonflybsd.org
234
235 ---
236
237 ##### Port FUSE or PUFFS from FreeBSD/NetBSD
238
239 * http://www.netbsd.org/docs/puffs/
240 * This would make many userspace filesystems available to DragonFly, e.g. sshfs to mention only one.
241
242 Meta information:
243
244 * Prerequisites: C, elementary OS internals
245 * Difficulty: Medium
246 * Contact point: Michael Neumann <mneumann@ntecs.de>
247
248 ---
249
250 ##### Make vkernels checkpointable
251
252 * See checkpt(1).
253 * Teach the checkpt syscall how to checkpoint multiple vmspaces.
254 * Add code to the vkernel which gets triggered on SIGCKPT to dump/load e.g. the current state of network drivers.
255 * This would allow us to save and restore or even migrate a complete DragonFly operating system running on the vkernel platform.
256 This could be especially handy on laptops (if we'd get X11 operating in vkernels).
257 * See also: http://www.dragonflybsd.org/docs/developer/CheckpointFeatures/
258
259 Meta information:
260
261 * Prerequisites: C, OS internals
262 * Difficulty: Medium
263 * Contact point: Michael Neumann <mneumann@ntecs.de>
264
265 ---
266
267 ##### HAMMER compression
268
269 * Compress blocks as they get written to disk.
270 * Only file data (rec_type == DATA) should be compressed, not meta-data.
271 * the CRC should be that of the uncompressed data.
272 * ideally you'd need to associate the uncompressed data with the buffer cache buffer somehow, so that decompression is only performed once.
273 * compression could be turned on a per-file or per-pfs basis.
274 * gzip compression would be just fine at first.
275
276 Meta information:
277
278 * Prerequisites: C, filesystem internals
279 * Difficulty: Medium
280 * Contact point: Michael Neumann <mneumann@ntecs.de>
281
282 ---
283
284
285 ##### Port usb4bsd
286 * Port the whole usb4bsd stuff to DragonFly, as our own usb stack is too outdated.
287
288 * The usb4bsd branch of hselasky (?) has several userland wrappers and quite good abstraction to simplify the porting.
289
290 * (is polachok doing this or not?)
291
292 Meta information:
293
294 * Prerequisites: C, OS internals
295 * Difficulty: Moderate
296 * Contact point: kernel@crater.dragonflybsd.org
297
298 ---
299
300 ##### Userland System V Shared Memory / Semaphore / Message Queue implementation
301 * 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.
302 * 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.
303 * Test and benchmark the new facilities with heavy SysV consumers such as PostgreSQL
304 * 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.
305
306 Meta information:
307
308 * Prerequisites: C, x86 assembly
309 * Difficulty: Moderate
310 * Contact point: Samuel J. Greear <sjg@thesjg.com>
311
312 ---
313
314
315 ##### Update Linux Emulation
316 * Update the in-kernel Linux Emulation (linuxulator).
317 * This involves getting LTP (Linux Test Project) running on DragonFly to identify the issues and then implementing all the necessary syscalls to pass the tests.
318
319 Meta information:
320
321 * Prerequisites: C, OS internals 
322 * Difficulty: Easy (but extensive)
323 * Contact point: kernel@crater.dragonflybsd.org
324
325 ---
326
327 ##### Proportional RSS
328
329 The Resident Stack Size displayed by top keeps track of the number of resident pages in
330 a certain process's adress space. It is very useful to locate memory hogs, but doesn't take
331 into account page sharing. For example, if N processes map library L and L's resident pages
332 are 1G, this 1G is added to the RSS of all N processes. A more useful number would be the
333 Proportional (or Effective) RSS, for which we divide the number of mapped shared pages by
334 the number of processes sharing each page. So in the previous example we would add 1GB/N
335 to each process that has L mapped.
336
337 The goal of this project is to hack the kernel to allow for effective calculation of the
338 Proportional RSS and modify top to use it in addition to the RSS (i.e. it should display it by
339 default and be able to sort based on it).
340
341 Meta information:
342
343 * Prerequisites: C, Elementary OS internals
344 * Difficulty: Easy
345 * Contact point: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
346
347 ---
348
349  (please add)