GitHub PushEvent at 2014-09-17 19:07:54
Repository: memguard
Actor: heechul
Payload: {"shas":[["3b2d133f58e7738da0653c8ca29703f4a299b26b","a6f065f5926f7fd0b4c9894478573cc46e44b1cd@illinois.edu","bw_lock initial version","Heechul Yun",true],["9cc788f14339d33669022a47116ff1013901840b","a6f065f5926f7fd0b4c9894478573cc46e44b1cd@illinois.edu","bw_lock take2. test script","Heechul Yun",true],["4ecae50e46c6c9af1364108997b73fc7a50d9931","a6f065f5926f7fd0b4c9894478573cc46e44b1cd@illinois.edu","bw_mem: allow multiple lock holders","Heechul Yun",true],["806a95e2ead8d280d204975f94be4cc8a3396184","a6f065f5926f7fd0b4c9894478573cc46e44b1cd@illinois.edu","bw_lock: cleanup","Heechul Yun",true],["da8e2f9e1f7c4195c0935ce39dabf2459b30d16b","a6f065f5926f7fd0b4c9894478573cc46e44b1cd@illinois.edu","..","Heechul Yun",true],["42e3a4ecab7614796a0c1d9bdd1fa91be22e999f","a6f065f5926f7fd0b4c9894478573cc46e44b1cd@illinois.edu","bugfix: spinlock was causing the problem.","Heechul Yun",true],["489ae47d0ab7e1d6b1b372344096de1c87016fe6","a6f065f5926f7fd0b4c9894478573cc46e44b1cd@illinois.edu","USE_BWLOCK variable. bw_attr -> int\n\nnow use environment variable USE_BWLOCK","Heechul Yun",true],["78ed0fa7528b47eb07608ec00b3e9dda0234186e","a6f065f5926f7fd0b4c9894478573cc46e44b1cd@illinois.edu","memguard: add BwLock support\n\nBwLock is a user level bandwidth control mechanism to protect memory\nperformance critical section\n\nAPIs\n====\n\n    int bw_lock(int reserve_mb, int attr);\n        reserve 'reserve_mb' MB/s for the core that call this function.\n        The other cores's bandwidth will be limited to 100MB/s\n\n    int bw_unlock(int *attr);\n        remove b/w reservation of all cores.\n\nUsage\n=====\n\nModify source code as follows.\n\n    #include \"bwlock.h\"\n\n    bw_lock(10000, SOFT);\n\n    ... memory performance critical section ...\n\n    bw_unlock(NULL);\n\nCompile your code with 'bwlock.c'. In the following, we will use the\nincluded test program 'bwlocktest.c'\n\n    $ make bwlocktest\n    cc -std=gnu99 -O2 -g bwlock.c bwlocktest.c -o bwlocktest -lrt\n\nRun the test program.\n\n    $ ./bwlocktest\n    USE_BWLOCK=0\t\t// this mean BWLOCK is not being used\n    iter=100000 74.69 ns\n\nAt this point, we are not using BwLock. To use the BwLock, you need\nto set the environment variable USE_BWLOCK=1\n\n    $ export USE_BWLOCK=1\n    $ ./bwlocktest\n    USE_BWLOCK=1\n    N_PROC: 4, CoreId: 3\n    memguard is not loaded\n    N_PROC: 4, CoreId: 3\n    bwlocktest: bwlock.c:109: bw_lock_init: Assertion `fd_control == 0' failed.\n    Aborted (core dumped)\n\nThis is because you did not load memguard kernel module. BwLock requires the\nmodule is loaded ahead of the time. Also, you need to be a root.\n\n    $ sudo bash\n    # insmod ./memguard.ko\n    # USE_BWLOCK=1 ./bwlocktest\n    USE_BWLOCK=1\n    N_PROC: 4, CoreId: 3\n    iter=100000 2313.68 ns\n\nNow it is working correctly.","Heechul Yun",true]],"size":8,"ref":"refs/heads/devel","head":"78ed0fa7528b47eb07608ec00b3e9dda0234186e"}