{"push_id":1328050280,"size":6,"distinct_size":5,"ref":"refs/heads/multiprocess-engine","head":"9fe91ac51483232372abfc042e5120c5ad7d4be1","before":"0d717a46e924e5b77e0e751ab4aee9a88b435b3f","commits":[{"sha":"ca490c442be985bd0de0af06a19e8950e14f72b6","author":{"name":"Luke Gorrie","email":"20708a612f2164e970e0608bcf18a483ca8c8e72@snabb.co"},"message":"core.memory: Rewrite memory.c in Lua using ljsyscall\n\nSwitch to allocating HugeTLB pages as mmaped files on hugetlbfs\ninstead of POSIX shared memory. The advantage of POSIX shared memory\nwas that we did not need to rely on having a hugetlbfs filesystem\nmounted -- but now we auto-mount one at /var/run/snabb/hugetlbfs.\n\nThis design is a bit simpler and should also make it easier for one\nSnabb process to map a page that was allocated by a different process.\n\nThe main motivation for rewriting memory.c is to make it easier to\nmaintain. Lua code is more in keeping with the rest of Snabb and it\ndoesn't require people to be expert C programmers and debate the\nmerits of POSIX compliance and using GCC extensions and so on. (It\nalso puts a bit more distance between Snabb and monstrosities like\nautoconf which cannot be a bad thing.)","distinct":false,"url":"https://api.github.com/repos/lukego/snabb/commits/ca490c442be985bd0de0af06a19e8950e14f72b6"},{"sha":"e3db28a86b4dcd02da66447041db294fdb18919b","author":{"name":"Luke Gorrie","email":"20708a612f2164e970e0608bcf18a483ca8c8e72@snabb.co"},"message":"Merge branch 'memory-ljsyscall' into multiprocess-engine\n\nResolved conflict in memory.lua which now has a lock on nr_hugepages to\nprevent a race when provisioning new ones.","distinct":true,"url":"https://api.github.com/repos/lukego/snabb/commits/e3db28a86b4dcd02da66447041db294fdb18919b"},{"sha":"6e28390e43ca8878af72cd8ca7e85d49fac8bb1a","author":{"name":"Luke Gorrie","email":"20708a612f2164e970e0608bcf18a483ca8c8e72@snabb.co"},"message":"shm: mkdir() now creates full path\n\nPreviously there was an implicit dirname() that skipped the last path\ncomponent. Removed this restriction to make the subroutine more useful.","distinct":true,"url":"https://api.github.com/repos/lukego/snabb/commits/6e28390e43ca8878af72cd8ca7e85d49fac8bb1a"},{"sha":"f614c6a6bf0f902a9c911bf87d7a863bd72fa09a","author":{"name":"Luke Gorrie","email":"20708a612f2164e970e0608bcf18a483ca8c8e72@snabb.co"},"message":"core.memory: Manage hugetlb file-backing lifetime\n\nHugeTLB memory allocated for DMA is now kept accessible in file-backed\nshared memory. This makes it possible for process to map each others'\nmemory. The new function shutdown(pid) removes file-backing for a\nprocess that is terminating (in order to free memory for the OS).\n\nMore specifically:\n\nAllocating a hugetlb page with address xxxxx creates:\n  /var/run/snabb/hugetlb/xxxxx.dma         File backed shared memory\n  /var/run/snabb/$pid/group/dma/xxxxx.dma  Symlink to above\n\nand the shutdown(pid) function will follow the symlinks to remove the\nfile backing. (The reason for symlinks is that these directories are on\nseparate filesystems, one hugetlbfs and one tmpfs.)","distinct":true,"url":"https://api.github.com/repos/lukego/snabb/commits/f614c6a6bf0f902a9c911bf87d7a863bd72fa09a"},{"sha":"50a446bef7341f8f6e1a1c375cc551234fa9e1b4","author":{"name":"Luke Gorrie","email":"20708a612f2164e970e0608bcf18a483ca8c8e72@snabb.co"},"message":"hardware.pci: Disable bus mastering on shutdown\n\nThe new function shutdown(pid) will disable PCI bus mastering (i.e. DMA)\nfor all PCI devices that were in use by the process (and its process\ngroup).\n\nThis is intended as a safety mechanism to prevent \"dangling\" DMA\nrequests on a device after a Snabb process terminates and the DMA memory\nis returned to the kernel.\n\nTo keep track of which devices are in use we now create shm files with\nnames like \"group/dma/pci/01:00.0\" for each device that we have enabled\nbus mastering for. These are the devices that are reverted by shutdown().","distinct":true,"url":"https://api.github.com/repos/lukego/snabb/commits/50a446bef7341f8f6e1a1c375cc551234fa9e1b4"},{"sha":"9fe91ac51483232372abfc042e5120c5ad7d4be1","author":{"name":"Luke Gorrie","email":"20708a612f2164e970e0608bcf18a483ca8c8e72@snabb.co"},"message":"main: Call pci.shutdown() and memory.shutdown()\n\nCall pci.shutdown() and memory.shutdown() when terminating the main\nSnabb process (not its worker children).\n\nThe pci.shutdown() call will disabled DMA for all PCI devices that were\nin use. The memory.shutdown() will then delete the DMA memory backing\nfiles so that the memory will be returned to the kernel (after all\nprocesses that have mapped the memory terminate).","distinct":true,"url":"https://api.github.com/repos/lukego/snabb/commits/9fe91ac51483232372abfc042e5120c5ad7d4be1"}]}
{"actor":{"display_login":"lukego"}}