Giter Site home page Giter Site logo

heechul / memguard Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 33.0 223 KB

Memory Bandwidth Reservation System for Efficient Performance Isolation in Multi-core Processors

Home Page: https://github.com/heechul/memguard/wiki/MemGuard

License: GNU General Public License v2.0

Makefile 0.17% C 67.54% Python 4.36% Shell 19.60% C++ 8.33%

memguard's People

Contributors

aabbfan avatar amanley97 avatar heechul avatar m00wl avatar mbechtel2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

memguard's Issues

Do not support write bandwidth limit ?

Hi,
I have successfully compiled the memguard as a kernel module without any error, but Only the read operation bandwidth can be limited, but the write operation bandwidth cannot be limited. The data obtained by all write operations in the update_statistics method is 0. Do not support write bandwidth limit ?

Issue while building memguard module for arm based processors

Hi,

I am trying to test the memguard module for arm based board like Raspberry Pi 3 board and i.MX6QP board, but while compiling the module I get an error file "asm/idle.h" not found. I searched it in the respective directory, I found that it was not there, What procedure or what changes I must make in memguard.c file so that I can get a kernel module for arm based processors.

Kernel Version I am using is 4.4.35
Its really very important for me, kindly help me out regarding this issue.

Thanks in advance.

How can I apply memguard into arm linux kernel?

Hi.
I have successfully compiled the memguard into ARM linux 3.18.14 kernel statically not module.
In order to do it, I added CONFIG_PERF_EVENT and CONFIG_DEBUG_FS.
But it can't boot properly.

Thanks in advence.

Compilation under 4.2 kernel

Hello,

I would like to test your memguard kernel module but i'm not able to build it on 4.2.x kernel version. I tried to build on an old 3.19.x kernel and it's working but i'm not able to load the module ( ins mod or mod probe are not working because of an unknown symbol ). Will you update to support kernel 4.2 ?

i post the errors during compilation :

nicolas@nicolas-VOSYS-VM:~/Mem_compile/memguard$ make make -C /lib/modules/4.2.0-25-generic/build M=/home/nicolas/Mem_compile/memguard modules make[1]: Entering directory '/usr/src/linux-headers-4.2.0-25-generic' CC [M] /home/nicolas/Mem_compile/memguard/memguard.o /home/nicolas/Mem_compile/memguard/memguard.c:245:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘memguard_cpu_callback’ static int __cpuinit memguard_cpu_callback(struct notifier_block *nfb, ^ /home/nicolas/Mem_compile/memguard/memguard.c:263:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘memguard_cpu_notifier’ static struct notifier_block __cpuinitdata memguard_cpu_notifier = ^ /home/nicolas/Mem_compile/memguard/memguard.c: In function ‘mg_nr_bwlocked_cores’: /home/nicolas/Mem_compile/memguard/memguard.c:351:13: error: ‘struct task_struct’ has no member named ‘bwlock_val’ if (t && t->bwlock_val > 0) ^ /home/nicolas/Mem_compile/memguard/memguard.c:352:11: error: ‘struct task_struct’ has no member named ‘bwlock_val’ nr += t->bwlock_val; ^ /home/nicolas/Mem_compile/memguard/memguard.c: In function ‘period_timer_callback_slave’: /home/nicolas/Mem_compile/memguard/memguard.c:668:14: error: ‘struct task_struct’ has no member named ‘bwlock_val’ if (target->bwlock_val > 0) ^ /home/nicolas/Mem_compile/memguard/memguard.c:687:14: error: ‘struct task_struct’ has no member named ‘bwlock_val’ current->bwlock_val, global->bwlocked_cores)); ^ /home/nicolas/Mem_compile/memguard/memguard.c:23:25: note: in definition of macro ‘DEBUG_BWLOCK’ #define DEBUG_BWLOCK(x) x ^ include/linux/kernel.h:612:2: note: in expansion of macro ‘__trace_printk_check_format’ __trace_printk_check_format(fmt, ##args); \ ^ include/linux/kernel.h:601:3: note: in expansion of macro ‘do_trace_printk’ do_trace_printk(fmt, ##__VA_ARGS__); \ ^ /home/nicolas/Mem_compile/memguard/memguard.c:685:15: note: in expansion of macro ‘trace_printk’ DEBUG_BWLOCK(trace_printk("%s|bwlock_val %d|g->bwlocked_cores %d\n", ^ /home/nicolas/Mem_compile/memguard/memguard.c:687:14: error: ‘struct task_struct’ has no member named ‘bwlock_val’ current->bwlock_val, global->bwlocked_cores)); ^ /home/nicolas/Mem_compile/memguard/memguard.c:23:25: note: in definition of macro ‘DEBUG_BWLOCK’ #define DEBUG_BWLOCK(x) x ^ include/linux/kernel.h:601:3: note: in expansion of macro ‘do_trace_printk’ do_trace_printk(fmt, ##__VA_ARGS__); \ ^ /home/nicolas/Mem_compile/memguard/memguard.c:685:15: note: in expansion of macro ‘trace_printk’ DEBUG_BWLOCK(trace_printk("%s|bwlock_val %d|g->bwlocked_cores %d\n", ^ /home/nicolas/Mem_compile/memguard/memguard.c:687:14: error: ‘struct task_struct’ has no member named ‘bwlock_val’ current->bwlock_val, global->bwlocked_cores)); ^ /home/nicolas/Mem_compile/memguard/memguard.c:23:25: note: in definition of macro ‘DEBUG_BWLOCK’ #define DEBUG_BWLOCK(x) x ^ include/linux/kernel.h:601:3: note: in expansion of macro ‘do_trace_printk’ do_trace_printk(fmt, ##__VA_ARGS__); \ ^ /home/nicolas/Mem_compile/memguard/memguard.c:685:15: note: in expansion of macro ‘trace_printk’ DEBUG_BWLOCK(trace_printk("%s|bwlock_val %d|g->bwlocked_cores %d\n", ^ /home/nicolas/Mem_compile/memguard/memguard.c: In function ‘memguard_control_show’: /home/nicolas/Mem_compile/memguard/memguard.c:938:2: error: implicit declaration of function ‘cpulist_scnprintf’ [-Werror=implicit-function-declaration] cpulist_scnprintf(buf, 64, global->active_mask); ^ /home/nicolas/Mem_compile/memguard/memguard.c: In function ‘memguard_limit_show’: /home/nicolas/Mem_compile/memguard/memguard.c:1041:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] struct memguard_info *global = &memguard_info; ^ In file included from include/linux/perf_event.h:48:0, from /home/nicolas/Mem_compile/memguard/memguard.c:38: /home/nicolas/Mem_compile/memguard/memguard.c: In function ‘init_module’: /home/nicolas/Mem_compile/memguard/memguard.c:1302:28: error: ‘memguard_cpu_notifier’ undeclared (first use in this function) register_hotcpu_notifier(&memguard_cpu_notifier); ^ include/linux/cpu.h:237:60: note: in definition of macro ‘register_hotcpu_notifier’ #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) ^ /home/nicolas/Mem_compile/memguard/memguard.c:1302:28: note: each undeclared identifier is reported only once for each function it appears in register_hotcpu_notifier(&memguard_cpu_notifier); ^ include/linux/cpu.h:237:60: note: in definition of macro ‘register_hotcpu_notifier’ #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) ^ /home/nicolas/Mem_compile/memguard/memguard.c: In function ‘cleanup_module’: /home/nicolas/Mem_compile/memguard/memguard.c:1366:30: error: ‘memguard_cpu_notifier’ undeclared (first use in this function) unregister_hotcpu_notifier(&memguard_cpu_notifier); ^ include/linux/cpu.h:239:64: note: in definition of macro ‘unregister_hotcpu_notifier’ #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) ^ cc1: some warnings being treated as errors scripts/Makefile.build:264: recipe for target '/home/nicolas/Mem_compile/memguard/memguard.o' failed make[2]: *** [/home/nicolas/Mem_compile/memguard/memguard.o] Error 1 Makefile:1398: recipe for target '_module_/home/nicolas/Mem_compile/memguard' failed make[1]: *** [_module_/home/nicolas/Mem_compile/memguard] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-25-generic' Makefile:9: recipe for target 'all' failed make: *** [all] Error 2

thanks in advance

Compilation under 4.4.26 kernel

Hi,

I have successfully compiled the memguard as a kernel module without any error, but When I am loading it my system crashes and I have to hard reboot the system by removing power supply.

Kindly help me out regarding this issue it is really very important for me.

Thank in advance.

How to apply memgiard i to arm kernel??

Hi !

How can I build and load it into arm 4.4 linux kernel?

I just copy memguard.c to kernel folder, and build it.
But it has many compile errors.

I want to build it statically not loadable(.ko).

Thanks in advence.

How to enable per-task mode

It seems memguard does not support allocate memory bandwidth by task.
When run the following commond:

echo taskprio 1 > /sys/kernel/debug/memguard/control

memgurad Ignored the command,as the source code show:

static ssize_t memguard_control_write(struct file *filp,
				    const char __user *ubuf,
				    size_t cnt, loff_t *ppos)
{
	char buf[BUF_SIZE];
	char *p = buf;
	if (copy_from_user(&buf, ubuf, (cnt > BUF_SIZE) ? BUF_SIZE: cnt) != 0)
		return 0;

	if (!strncmp(p, "exclusive ", 10))
		sscanf(p+10, "%d", &g_use_exclusive);
	else
		pr_info("ERROR: %s\n", p);
	return cnt;
}

How can I allocate memory bandwidth for tasks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.