|
|
Subscribe / Log in / New account

Facebook and the kernel

Facebook and the kernel

Posted Mar 27, 2014 16:53 UTC (Thu) by zblaxell (subscriber, #26385)
In reply to: Facebook and the kernel by pushersk
Parent article: Facebook and the kernel

Cute...but LD_PRELOAD hacks don't count. I want to do fadvise to processes after they've started, e.g. when I notice a performance problem, or on a schedule. I want to do mlock from privileged processes to affect unprivileged ones. I suppose I could make an LD_PRELOAD hack to spawn a thread that listens to a socket or something, but for the effort it's probably easier to just modify the kernel to add some new syscalls instead.

For rsync and backups I use a cgroup RAM limit, so the rsync gets a small amount of cache for itself but won't flood the entire RAM with its reading. cgroup charges cache memory to the process that read the page, so rsync can read pages from other cgroups' caches but won't remove their cache pages as rsync reads other data. I can also freeze and thaw the backup cgroup when I want it to temporarily stop executing (e.g. because I'm working on the machine).

cgroups aren't enough, though. I can't do a global POSIX_FADV_RANDOM or mlockall(MCL_FUTURE) through a cgroup.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds