update schedule 09-tuning

This commit is contained in:
Cheng Jian
2019-07-05 20:31:09 +08:00
parent a3a0d7eb17
commit c7a5dc2f87
7 changed files with 273 additions and 28 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ else # userspace
LINUX_KERNEL := $(shell uname -r)
LINUX_KERNEL_PATH := /lib/modules/$(LINUX_KERNEL)/build
LINUX_KERNEL_PATH ?= /lib/modules/$(LINUX_KERNEL)/build
CURRENT_PATH := $(shell pwd)
CFG_INC := $(CURRENT_PATH)
-25
View File
@@ -11,32 +11,8 @@ MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Gatieme");
MODULE_DESCRIPTION("hello world");
/*
* print the module information
*/
static void print_module(void)
{
struct module *mod;
printk(KERN_ALERT "this module: %p==%p\n", &__this_module, THIS_MODULE);
printk(KERN_ALERT "module state: %d\n", THIS_MODULE->state);
printk(KERN_ALERT "module name: %s\n", THIS_MODULE->name);
list_for_each_entry(mod, *(&THIS_MODULE->list.prev), list);
printk(KERN_ALERT "module name: %s\n", mod->name);
printk(KERN_ALERT "module state: %d\n", THIS_MODULE->state);
}
static int hello_init(void)
{
print_module( );
printk(KERN_ALERT "run in cpu %d\n", get_cpu());
printk(KERN_ALERT "PAGE_OFFSET : 0x%lx, TASK_SIZE : 0x%lx", PAGE_OFFSET, TASK_SIZE);
return 0;
}
@@ -44,7 +20,6 @@ static int hello_init(void)
static void hello_exit(void)
{
printk(KERN_ERR"exit");
}