Date: Fri, 10 Apr 2015 17:45:16 -0400 From: Alex Merritt <merritt.alex@gmail.com> To: freebsd-hackers@freebsd.org Subject: Page Coloring Manipulation Message-ID: <CADK3taJKXf=vGoakRsLHdXyonAXS0GbjZePZ=TcOcRQ6hdsqKg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello hackers, I am interested in playing with the page-coloring support within the virtual memory subsystem. Specifically: i. Methods to specify the number of colors a task receives ii. Methods to change the quantity of colors at runtime iii. Understand what areas of memory coloring governs, e.g., just task data/instructions, file-backed/anon, or even task page-table entries created by the kernel? Great if there are user-level methods, but not necessary. Does the kernel determine these values automatically? Is it disabled by default or always exercised? Here is what I found thus far -- // during page fault, in vm_fault_hold() #if VM_NRESERVLEVEL > 0 if ((fs.object->flags & OBJ_COLORED) == 0) { fs.object->flags |= OBJ_COLORED; fs.object->pg_color = atop(vaddr) - fs.pindex; } #endif // and in vm_object_init #if VM_NRESERVLEVEL > 0 kernel_object->flags |= OBJ_COLORED; kernel_object->pg_color = (u_short)atop(VM_MIN_KERNEL_ADDRESS); #endif So it seems an object must be explicitly marked as "colorable", which is true always? Please help me interpret. I am new to FreeBSD hacking ;) and appreciate any pointers for me to study further. Thanks, Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADK3taJKXf=vGoakRsLHdXyonAXS0GbjZePZ=TcOcRQ6hdsqKg>