kernel

How to finding all runnable processes

两盒软妹~` 提交于 2021-02-19 04:14:04
问题 I'm learning about the scheduler and trying to print all runnable proceeses. So I have written a kernel module that uses the for_each_process macro to iterate over all processes, and prints the ones at "runnable" state. But this seems like a stupid (and inefficient) way of doing this. So I thought about getting a reference to all running queues and use their Red-Black-Tree to go over the runnable processes, but couldn't find a way to do this. I have found out that there is a list of sched

How to finding all runnable processes

[亡魂溺海] 提交于 2021-02-19 04:12:48
问题 I'm learning about the scheduler and trying to print all runnable proceeses. So I have written a kernel module that uses the for_each_process macro to iterate over all processes, and prints the ones at "runnable" state. But this seems like a stupid (and inefficient) way of doing this. So I thought about getting a reference to all running queues and use their Red-Black-Tree to go over the runnable processes, but couldn't find a way to do this. I have found out that there is a list of sched

How to finding all runnable processes

不羁岁月 提交于 2021-02-19 04:12:25
问题 I'm learning about the scheduler and trying to print all runnable proceeses. So I have written a kernel module that uses the for_each_process macro to iterate over all processes, and prints the ones at "runnable" state. But this seems like a stupid (and inefficient) way of doing this. So I thought about getting a reference to all running queues and use their Red-Black-Tree to go over the runnable processes, but couldn't find a way to do this. I have found out that there is a list of sched

How to finding all runnable processes

你离开我真会死。 提交于 2021-02-19 04:12:02
问题 I'm learning about the scheduler and trying to print all runnable proceeses. So I have written a kernel module that uses the for_each_process macro to iterate over all processes, and prints the ones at "runnable" state. But this seems like a stupid (and inefficient) way of doing this. So I thought about getting a reference to all running queues and use their Red-Black-Tree to go over the runnable processes, but couldn't find a way to do this. I have found out that there is a list of sched

No arm-linux-androideabi-gcc in prebuilts for ndk r21d

二次信任 提交于 2021-02-11 15:02:04
问题 Hi I'm trying to build a custom android kernel. I was told to $ export CROSS_COMPILE=/home/user/adb-fastboot/kernel-custom/android-ndk-r21d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi- with nothing after the dash But when I $ make clean && make mrproper I get make: /home/user/adb-fastboot/kernel-custom/android-ndk-r21d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found So when I assume that make

what do the suffixes “*.part” and “.cold” mean in the result of Linux kernel's dump_stack?

谁说我不能喝 提交于 2021-02-11 12:58:03
问题 Sometimes dump_stack() would add the suffixes ".cold" and ".part" to the function name, for example, here are parts of lines from [1], [ 638.115912][ C0] Call Trace: [ 638.115986][ C0] ? kasan_set_free_info+0x1b/0x30 [ 638.115990][ C0] ? __kasan_slab_free+0xd8/0x120 [ 638.115995][ C0] ? kmem_cache_free.part.0+0x67/0x1f0 [ 638.115999][ C0] ? __put_cred+0x1de/0x250 [ 638.116004][ C0] ? revert_creds+0x1a8/0x1f0 [ 638.116008][ C0] ? do_faccessat+0x2ca/0x820 [ 638.116013][ C0] ? do_syscall_64+0x2d

what do the suffixes “*.part” and “.cold” mean in the result of Linux kernel's dump_stack?

∥☆過路亽.° 提交于 2021-02-11 12:57:04
问题 Sometimes dump_stack() would add the suffixes ".cold" and ".part" to the function name, for example, here are parts of lines from [1], [ 638.115912][ C0] Call Trace: [ 638.115986][ C0] ? kasan_set_free_info+0x1b/0x30 [ 638.115990][ C0] ? __kasan_slab_free+0xd8/0x120 [ 638.115995][ C0] ? kmem_cache_free.part.0+0x67/0x1f0 [ 638.115999][ C0] ? __put_cred+0x1de/0x250 [ 638.116004][ C0] ? revert_creds+0x1a8/0x1f0 [ 638.116008][ C0] ? do_faccessat+0x2ca/0x820 [ 638.116013][ C0] ? do_syscall_64+0x2d

Undefined reference to in os kernel linking

不羁岁月 提交于 2021-02-11 05:00:58
问题 i have a problem. I making simple OS kernel with this tutorial: http://wiki.osdev.org/Bare_Bones#Linking_the_Kernel but,if i want to link files boot.o and kernel.o, gcc compiler returns this error: boot.o: In function `start': boot.asm:(.text+0x6): undefined reference to `kernel_main' collect2.exe: error: ld returned 1 exit status. sources of files: boot.asm ; Declare constants used for creating a multiboot header. MBALIGN equ 1<<0 ; align loaded modules on page boundaries MEMINFO equ 1<<1 ;

Undefined reference to in os kernel linking

拈花ヽ惹草 提交于 2021-02-11 04:57:23
问题 i have a problem. I making simple OS kernel with this tutorial: http://wiki.osdev.org/Bare_Bones#Linking_the_Kernel but,if i want to link files boot.o and kernel.o, gcc compiler returns this error: boot.o: In function `start': boot.asm:(.text+0x6): undefined reference to `kernel_main' collect2.exe: error: ld returned 1 exit status. sources of files: boot.asm ; Declare constants used for creating a multiboot header. MBALIGN equ 1<<0 ; align loaded modules on page boundaries MEMINFO equ 1<<1 ;

Difference b/w Filesystem I/O (__GFP_FS) and Disk I/O (__GFP_IO)

倾然丶 夕夏残阳落幕 提交于 2021-02-10 14:28:39
问题 May i know in linux kernel what is the difference between filesystem I/O (GFP_FS) and Disk I/O (GFP_IO)? 回答1: It is plain and simple that filesystem I/O is I/O happening on the filesystem. Lets say you are reading/writing on a file which is represented on the filesystem. The disk IO is the IO happening directly on the disk. This is block IO. On a layering standpoint you can say, the disk IO happens at a low level than the file system IO. And you can even say, the filesystem IO may get