cpuset

Isolate Kernel Module to a Specific Core Using Cpuset

末鹿安然 提交于 2019-12-29 20:11:00
问题 From user-space we can use cpuset to actually isolate a specific core in our system and execute just one specific process to that core. I'm trying to do the same thing with a kernel module. So I want the module to get executed in an isolated core. In other words: How do I use cpuset 's from inside a kernel module? * Using linux/cpuset.h in my kernel module doesn't work. So, I have a module like this: #include <linux/module.h> #include <linux/cpuset.h> ... #ifdef CONFIG_CPUSETS printk(KERN

Cannot allocate exclusively a CPU for my process

给你一囗甜甜゛ 提交于 2019-12-12 03:05:53
问题 I have a simple mono-threaded application that does almost pure processing It uses two int buffers of the same size It reads one-by-one all the values of the first buffer each value is a random index in the second buffer It reads the value at the index in the second buffer It sums all the values taken from the second buffer It does all the previous steps for bigger and bigger At the end, I print the number of voluntary and involuntary CPU context switches If the size of the buffers become

Isolate Kernel Module to a Specific Core Using Cpuset

只谈情不闲聊 提交于 2019-11-30 01:49:43
From user-space we can use cpuset to actually isolate a specific core in our system and execute just one specific process to that core. I'm trying to do the same thing with a kernel module. So I want the module to get executed in an isolated core. In other words: How do I use cpuset 's from inside a kernel module? * Using linux/cpuset.h in my kernel module doesn't work. So, I have a module like this: #include <linux/module.h> #include <linux/cpuset.h> ... #ifdef CONFIG_CPUSETS printk(KERN_INFO, "cpusets is enabled!"); #endif cpuset_init(); // this function is declared in cpuset.h ... When