(no commit message)
[ikiwiki.git] / docs / developer / ProjectsPage.mdwn
8c0cdf29 1# DragonFly Projects
b790f880 2
8c0cdf29 3This page shall serve as a common place to look if you're in search of a DragonFly related project. It's also the place to check if someone else is already working on it (to prevent project collision) or should be contacted.
b790f880 4
b1b401e0 5Projects that can be clearly used for Google Code-In are marked with their category, where applicable. Some unmarked items may be eligible; it depends on how the student wants to tackle the project.
8c0cdf29 7[[!toc levels=3 ]]
b790f880 8
8c0cdf29 9## Documentation projects
b790f880 10
87bf445d 11### Write manpages
b1b401e0 12* sysref (GCI:Documentation or Research)
87bf445d 13
8c0cdf29 14## Userland projects
b790f880 15
06d07101 16### One-liners
8116f646 17* Bring in smbfs changes from FreeBSD (GCI:Code)
1571f8e5 18* rpc.lockd and rpc.statd sync with FreeBSD (GCI:Code)
8753e704 19* Add extended slice support to `fdisk`
b1b401e0 20* C99 Standards Conformance. The todo list is on [[/docs/developer/StandardsConformanceProject]] (GCI:Code)
8753e704 21* Add lwp support to ptrace/gdb/core dumps.
8753e704 22* UTF8 support in the console
06d07101 23
8116f646 24### dma
25* Make dma(8) our default MTA
26* Remove sendmail (optional)
b1b401e0 28### Scalability (algorithmic performance) (GCI:Research)
29* [http://bulk.fefe.de/scalability/](http://bulk.fefe.de/scalability/)
8753e704 30* [http://bulk.fefe.de/lk2006/talk.pdf](http://bulk.fefe.de/lk2006/talk.pdf)
06d07101 31
4e927740 32### Clean our code to make it [style(9)](http://leaf.dragonflybsd.org/cgi/web-man?command=style&section=ANY#style&sectionANY) compatible. (GCI:Code)
8753e704 33* Compile and test your changes.
b1b401e0 34* Verify that the checksum (sha(1)) of the unmodified object matches the checksum of the cleaned object. Check also with strip(1)+sha(1)
06d07101 35
b1b401e0 36### Port BSD-licensed tools (ex: `grep`, `diff` and `sort`) (GCI:Code)
8753e704 37* The OpenBSD guys already did some work related to that.
38* If you manage to bring the tools to DragonFly, check if everything works as expected (e.g. rc.d scripts, make world runs, ...).
06d07101 39
99e24f21 40### GDB
8753e704 41* ptrace/gdb follow-fork-mode support and more (peek at linux)
42* Change the build to create one libbfd for gdb and binutils
43* Separate RPC code from NFS into separate library.
45### I/O diagnostic utilities
46* A utility similar to top which displays I/O usage on a per-process basis
47* Network, Disk
8c0cdf29 48
05f26292 49### SMART capabilities
05f26292 50* Add to camcontrol
8e7be9e6 51* Add to natacontrol (see NetBSD's atactl?)
05f26292 52
b1b401e0 53### Disk scheduling rc scripts (GCI:Code)
05f26292 54* Create a rc script to manage the disk/io scheduling system
55* Perhaps 1 entry to "enable" it, and all disks will have mode set to "auto", in auto mode smart inquiries and other heuristics could attempt to determine the best i/o scheduler
56* Per-device and device class or similar defaults should be definable in rc.conf also
dcf86f60 57* The bulk of this functionality could be implemented in a resurrected "dschedctl" utility and exposed through the rc interface using just a thin wrapper, allowing hotplug scripts and etc. an easier option to use the same facilities.
05f26292 58
b1b401e0 59### libHAMMER
3eda57ef 60* HAMMER has the capability to expose very rich information to userland through ioctl's.
61* Currently the hammer(8) utility makes use of this information in an ad-hoc manner.
62* Port this core functionality into a public libhammer library so that other base and third party utilities may take advantage of it.
8e7be9e6 63* See commit: cb7575e6a89409a2041a37fcfc22ce9e41297ab8 -- libHAMMER already exists, port functionality into it!
3eda57ef 64
5dd9f19a 65### Clean up crypt(3) consumers
66* crypt(3) can legitimately return NULL on error, but many consumers do not check for this, instead passing the return directly to str[n]cmp. Fix these cases.
67* Fix these cases in pkgsrc as well.
d299f726 69### Live images enhancement
71The live images could be made easier to use by not assuming a QWERTY keyboard layout.
73Not beeing able to choose a localized keyboard layout before having to type 'installer' or 'root' may be a deal breaker for some users.
74A simple menu replacing login(1) and displaying the following three choices could be a good solution:
761. Set keyboard layout
772. Launch the installer
783. Login as root
8c0cdf29 80## Kernel projects
06d07101 82### One-liners
8753e704 83* Port the BSDL OSS code to DragonFly
84* Complete Path MTU Discovery by adding a host route to remember the Path MTU and setting a timer to expire old host routes. See netinet/if_ether.c for an example of this mechanism as used by ARP. Periodically increase MTU of hosts that have had its MTU decreased.
b1b401e0 85* Implement [`sem_open()`](http://www.opengroup.org/onlinepubs/000095399/functions/sem_open.html), [`sem_close()`](http://www.opengroup.org/onlinepubs/000095399/functions/sem_close.html), and [`sem_unlink()`](http://www.opengroup.org/onlinepubs/000095399/functions/sem_unlink.html). (GCI:Code)
8753e704 86* Port or update drivers from other systems.
52dfca9b 87* Port Linux emulation to x86-64
06d07101 88
89### Code to port/sync from FreeBSD
8753e704 90* PCI code (to take advantage of power saving features)
b1b401e0 91* Bring in support for UFS2, just the changes to extend the width of some fields from 32 bits to 64 bits. (GCI:Code)
92* hardware drivers.
8116f646 93* ext2fs
94* DTrace
99e24f21 95
06d07101 96### Code to port/sync from OpenBSD
8753e704 97* Add support for the NoExecute bit as described in [http://www.openbsd.org/papers/auug04/index.html](http://www.openbsd.org/papers/auug04/index.html).
98* After that, make user stacks and data heaps non-executable. (W^X)
99* hardware drivers, specially wireless.
06d07101 100
df817d42 101### CPU scheduler
8753e704 102* A scheduler API supporting multiple scheduler implementations already exists
103* Add a Solaris-like dispatcher framework that can handle more than one installed scheduling policy
06d07101 104
105### I/O scheduler
df817d42 106* A pluggable kernel I/O scheduler already exists
107* Implement additional disk scheduling policies
8753e704 108
43da2530 109### Implement boot cache
110* Effectively a smart readahead.
7957e767 111* Store the pattern of incoming read requests of the boot disk.
43da2530 112
c1941460 113### Improve kernel boot speed
114* Research source of delays in boot process, keyboard init, scsi?
115* Better thread some hardware init, for example USB?
116* Perhaps look to see how Linux can boot in one second, better pci scan code?
ab4ba9d2 117* "Some kernel work made it possible to do asynchronous initialization of some subsystems. For example, the modified kernel starts the Advanced Host Controller Interface (AHCI) initialization, to handle storage, at the same time as the Universal Host Controller Interface (UHCI), in order to handle USB" - http://lwn.net/Articles/299483/
c1941460 118
b1b401e0 119### Modify firmware framework
1ac22aa1 120* We currently use the firmware(9) FreeBSD also uses
121* It would be more appropriate to avoid future problems with redistribution problems, etc, to adapt the wifi firmware stuff to use the firmware(9) we used to have before, which was able to load firmware files from userland (/etc/firmware).
122* See "firmware discussion" thread on kernel@ mailing list, March-May 2010.
ca622843 123* Since it's not desired to just add another way of doing it, this project should include getting rid of loading firmwares as modules
1ac22aa1 124
8753e704 125### Work relating to LWKT (LightWeightKernelThreading)
126* Implement lazy IPI cross-processor lwkt message passing.
127* Add timeout functionality to lwkt_waitmsg().
8753e704 128
129### Filesystem extended attributes
130* Generic VFS attributes layer
131* Emulate attributes ala Darwin
132* Allow filesystems to define their own attribute vop ops
133* QUESTIONS: Attributes or subfiles? The consensus is that subfiles are better?
b6a0e48f 135### Capabilities
136* Implement something resembling or inspired by POSIX.1e
137* This implementation could possibly exist in userland and interlock with the kernel via a VFS Journal or HAMMER mirroring ioctl's.
138* These should be capable of supporting NFSv4 capabilities.
139* References: [1](http://leaf.dragonflybsd.org/mailarchive/kernel/2006-07/msg00012.html)
8753e704 141### Hardware virtualization extensions
142* Increase performance of virtual kernels
143* Make use of hardware virtualization extensions, if supported, to manage vmspaces
0b48e63b 144* Implement a KVM-compatible virtualization device to support qemu
8898930f 145* Hardware IOMMU support is not a priority and if implemented must be strictly optional.
8753e704 146
f1dc70a1 147### Remove zalloc
148* zalloc is a deprecated kernel interface and all current consumers can be ported to objcache, with varying levels of difficulty.
48b27198 149* zlib, pv entries
f1dc70a1 150* Once all consumers are ported, zalloc can be removed.
97f327a5 151
b6a0e48f 152### Convert kprintf-enabling sysctl's to KTR's
153* Many sysctl's simply enable one or more kernel kprintf's
154* This can be very easy, or can be very unwieldy
155* Convert all of these cases to ktr's, while slightly less easy they are far easier to wield in all cases.
8116f646 157### Tear out C/H/S disk reporting
bd0ac588 158* Cylinders/Heads/Sectors are an outdated concept and the system doesn't rely on them anymore.
159* Verify the assumption that we don't rely on them in any way, shape or form.
160* Tear the reporting out of the kernel/installer/etc.
e2952a1f 162### Change vm_map lookup algorithm
163* The vm_map lookups currently use a Red-Black tree, since 2005.
164* It has been decided that using an array'ized bucket'ized hash table is probably a better approach.
165* References: [1](http://kerneltrap.org/mailarchive/freebsd-current/2010/10/1/6260944) [2](http://leaf.dragonflybsd.org/mailarchive/kernel/2005-01/msg00122.html)
97f327a5 166
167### Trampoline Code Page instead of direct syscalls
168* Map a read/execute trampoline page into every process, which has a syscall table, i.e. is used instead of "int" to enter the kernel. This way we can easily change the kernel enter method from "int" to e.g. "sysenter" without having to recompile userland applications, or even implement some syscalls in userspace.
170### Compressed in-memory swap device
171* A device that uses physical memory as swap space, but compresses it.
172* Do we support stacking of swap space? For example, one would have this compressed in-memory swap device with highest priority. Replaced objects will be put into the next priority swap device (e.g. a SSD), and so on.
3114c38f 174### mmap MAP_ALIGN
175* Solaris's mmap support a flag, MAP_ALIGN, where the address to mmap acts as an alignment hint
176* Our backing VM calls support an alignment parameter, but our public mmap does not
177* This would allow nmalloc to allocate slabs (64k, 64k-aligned) without wastage
fb27736e 179### vnode dumps
8116f646 180* It may be beneficial to be able to have crash dumps written to an ordinary file in configurations where swap is not configured.
182### vnode swap
183* Add a vnode-backed swap pager that respects a file size limit, to allow paging to a "swap file" on a filesystem.
fb27736e 184
af80ec85 185### Kernel allocator feature enhancements
186* Enhance objcache in a manner that will allow the initialization to specify allocation functions which will allocate and free entire slabs of memory, not just single objects.
60f380f8 187* Rework the kmalloc allocator to sit on top of objcache (there are various dependencies to making this work).
188* Create or sort out a metric for vnode/other cache object cycling rate that can indicate realistic memory pressure.
189* Clear out free objcache slabs under memory pressure.
190* Add reclaim functionality to objcache, such that it may ask consumers to free objects back into it under memory pressure.
af80ec85 191
8e7be9e6 192### Tear out serializers
8116f646 193* Serializers could be _carefully_ replaced with MTX locks?
8e7be9e6 194
195### Tear out condvars
196* Conditional vars -- condvar(9), could be replaced with other locking primitives and our tsleep/wakeup interlock.
c52e2798 198### Make karc4random in libkern per-cpu (or at least wrap its own token around it)
8ac2913d 199* Verify that it is possible and safe to do this, what care would need to be taken, especially with respect to the random seeding?
200* Pull out locks around calls to karc4rand*
d882bf8a 202### Improve kernel spinlock debug-ability
203* Add a const char *descr field to the spinlock structure.
204* Adjust spin_init() and all use cases, SPINLOCK_INITIALIZER() could juse use macro string extensions (# head) to install the name there.
205* Adjust error messages to print the spinlock desc field.
206* This change will require a full world & kernel recompile.
d866bea9 208### Partially rewrite buffer cache
209* Buffer cache buffers map VM pages from the filesystems VM-backed vnodes, the "buffer space" is the maximum amount of virtual space to allocate to these buffers.
210* When the buffer_map KVA space gets fragmented it caused very expensive defrag operations, the buffer_map KVA was recently increased to double the actual buffer space to allow full space utilization in the face of fragmentation and reduce the frequency of defrag operations.
211* Rewrite the buffer cache to have separate spaces or separate buffer pools for different sizes (16, 32, 64, 128, 256... up to max).
212* The vm_map API is used to allocate kvm out of the buffer_map. If the buffer's KVAs are preallocated then things can basically just be setup linearly at boot time.
29685166 214### Sync wireless infrastructure / drivers from FreeBSD
215* Rui 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.
ff694554 217### Add informational hardware-related sysctl's
218* MacOS X exports a bunch of cpu-specific sysctl's detailing sizes, layout, features, etc. Most/all of this could be detected by a userspace program, but exporting these makes the barrier of entry to cpu-conditional code lower.
219* Research which of these sysctl's is the most useful and add them, using the same node names as OSX.
2201. hw.vectorunit = 1
2211. hw.busfrequency = 100000000
2221. hw.cpufrequency = 3062000000
2231. hw.cachelinesize = 64
2241. hw.l1icachesize = 32768
2251. hw.l1dcachesize = 32768
2261. hw.l2settings = 1
2271. hw.l2cachesize = 262144
2281. hw.l3settings = 1
2291. hw.l3cachesize = 6291456
2301. hw.tbfrequency = 1000000000
2311. hw.activecpu: 2
2321. hw.physicalcpu: 2
2331. hw.physicalcpu_max: 2
2341. hw.logicalcpu: 2
2351. hw.logicalcpu_max: 2
2361. hw.cputype: 7
2371. hw.cpusubtype: 4
2381. hw.cpu64bit_capable: 1
2391. hw.cpufamily: 1418770316
2401. hw.cacheconfig: 2 1 1 1 0 0 0 0 0 0
2411. hw.cachesize: 2147483648 32768 262144 6291456 0 0 0 0 0 0
2421. hw.busfrequency: 100000000
2431. hw.busfrequency_min: 100000000
2441. hw.busfrequency_max: 100000000
2451. hw.cpufrequency: 3062000000
2461. hw.cpufrequency_min: 3062000000
2471. hw.cpufrequency_max: 3062000000
2481. hw.cachelinesize: 64
2491. hw.l1icachesize: 32768
2501. hw.l1dcachesize: 32768
2511. hw.l2cachesize: 262144
2521. hw.l3cachesize: 6291456
2531. hw.tbfrequency: 1000000000
2541. hw.packages: 2
2551. hw.optional.floatingpoint: 1
2561. hw.optional.mmx: 1
2571. hw.optional.sse: 1
2581. hw.optional.sse2: 1
2591. hw.optional.sse3: 1
2601. hw.optional.supplementalsse3: 1
2611. hw.optional.sse4_1: 1
2621. hw.optional.sse4_2: 1
2631. hw.optional.x86_64: 1
2641. hw.optional.aes: 1
2651. hw.optional.avx1_0: 1
2661. hw.optional.rdrand: 0
2671. hw.optional.f16c: 0
2681. hw.optional.enfstrg: 0
2691. machdep.cpu.max_basic: 13
2701. machdep.cpu.max_ext: 2147483656
2711. machdep.cpu.vendor: GenuineIntel
2721. machdep.cpu.brand_string: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz
2731. machdep.cpu.family: 6
2741. machdep.cpu.model: 42
2751. machdep.cpu.extmodel: 2
2761. machdep.cpu.extfamily: 0
2771. machdep.cpu.stepping: 7
2781. machdep.cpu.feature_bits: 262929407 2660770315
2791. machdep.cpu.extfeature_bits: 672139520 1
2801. machdep.cpu.signature: 132775
2811. machdep.cpu.brand: 0
2831. machdep.cpu.extfeatures: SYSCALL XD EM64T LAHF RDTSCP TSCI
2841. machdep.cpu.cores_per_package: 1
2851. machdep.cpu.microcode_version: 16
2861. machdep.cpu.processor_flag: 0
2871. machdep.cpu.mwait.linesize_min: 4096
2881. machdep.cpu.mwait.linesize_max: 4096
2891. machdep.cpu.mwait.extensions: 3
2901. machdep.cpu.mwait.sub_Cstates: 4384
2911. machdep.cpu.xsave.extended_state: 7 832 832 0
2921. machdep.cpu.arch_perf.version: 1
2931. machdep.cpu.arch_perf.number: 8
2941. machdep.cpu.arch_perf.width: 48
2951. machdep.cpu.arch_perf.events_number: 7
2961. machdep.cpu.arch_perf.events: 127
2971. machdep.cpu.arch_perf.fixed_number: 0
2981. machdep.cpu.arch_perf.fixed_width: 0
2991. machdep.cpu.cache.linesize: 64
3001. machdep.cpu.cache.L2_associativity: 8
3011. machdep.cpu.cache.size: 256
3021. machdep.cpu.tlb.inst.small: 128
3031. machdep.cpu.tlb.data.small: 64
3041. machdep.cpu.tlb.data.large: 32
3051. machdep.cpu.tlb.shared: 512
3061. machdep.cpu.address_bits.physical: 40
3071. machdep.cpu.address_bits.virtual: 48
3081. machdep.cpu.core_count: 1
3091. machdep.cpu.thread_count: 1
094b2c92 311
97f327a5 312For more theoretical projects and project concepts see [[ResearchProjects|/docs/developer/ResearchProjectsPage]]