linux-kernel

How does Linux Kernel know where to look for driver firmware?

I'm compiling a custom kernel under Ubuntu and I'm running into the problem that my kernel doesn't seem to know where to look for firmware. Under Ubuntu 8.04, firmware is tied to kernel version the same way driver modules are. For example, kernel 2.6.24-24-generic stores it's kernel modules in: /lib/modules/2.6.24-24-generic and it'...

is there a limit for the number of sk_buffs in the kernel

Hi, I need to steal some SKBs in my NetFilter hook, and retain them for some time. Is there a limit in the kernel about how many SKBs can I use at a time? What are the consequences of having some 100,000 or even more SKBs held in my kernel module? I could avoid copying my packets two time if I can have many-many SKBs. Regards, Denes ...

Content for Linux Operating Systems Class

I will be TA for an operating systems class this upcoming semester. The labs will be deal specifically with the Linux Kernel. What concepts/components of the Linux kernel do you think are the most important to cover in the class? What do you wish was covered in your studies that was left out? Any suggestions regarding the Linux kerne...

Cross Compiling Linux Kernels and Debugging via VMware

I'm considering doing some Linux kernel and device driver development under a vmware VM for testing ( Ubuntu 9.04 as a guest under vmware server 2.0 ) while doing the compiles on the Ubuntu 8.04 host. I don't want to take the performance hit of doing the compiles under the VM. I know that the kernel obviously doesn't link to anything o...

Selecting a Linux I/O Scheduler

I read that it's supposedly possible to change the I/O scheduler for a particular device on a running kernel by writing to /sys/block/[disk]/queue/scheduler. For example I can see on my system: anon@anon:~$ cat /sys/block/sda/queue/scheduler noop anticipatory deadline [cfq] that the default is the completely fair queuing scheduler. ...

The same driver for multiple network cards -- performance bottleneck?

I'm using driver e1000e for multiple Intel network cards (Intel EXPI9402PT, based on 82571EB chip). The problem is that when I'm trying to utilize maximum speed (1GB) on more than one interface, speed on each interface starts to drop down. I have my own driver in kernel space designed to just sent given packets. It just allocs packets b...

Arguments to kernel

Is there anything that the kernel need to get from the boot loader.Usually the kernel is capable of bringing up a system from scratch,so why does it require anything from boot-loader? I have seen boot messages from kernel like this. "Fetching vars from bootloader... OK" So what exactly is the variables being passed? Also how's the va...

Is it possible to know if a process(Java app.) is waiting in Blocked state on a Receive() call on Linux?

My main purpose is to execute processes one by one in a round-robin fashion until one calls receive() and is blocked, so that the execution switches to the next process in the queue. There is a controller application which is coded in Java and it executes these processes(which are also Java applications) using Runtime.getRuntime().exec()...

kvm vs. vmware for kernel debugging / USB driver development

The title says it all. I'm currently setting up vmware Server 2.0 for kernel debugging with gdb ( see this setup guide ) and someone asked me why not use kvm? So I ask: kvm vs. vmware for kernel debugging / USB driver development what are the pros and cons of each? ...

wait fails in multithreaded application at 2.4 kernel

I have an application that is multithreaded - one thread is responsible for collecting the dead children with wait(), anther thread spawns them with fork upon request. I found out that on one platform with 2.4 kernel and LinuxThread wait always fails with ECHILD. I've found out that problem might be in non-POSIX compliant implementation...

linux: where's the "real" segmentation fault handler ?

If I read/write/jump to an ummapped address ie. .text .global _start _start: movl $1,%edx jmp *%edx this causes a segmentation fault. I wonder, what's the actual part of the system (kernel) that intercepts reads/writes to unmapped addresses (how ?) and throws the "user mode" signal ? ...

Why kernel code/thread executing in interrupt context cannot sleep?

I am reading following article by Robert Love http://www.linuxjournal.com/article/6916 that says "...Let's discuss the fact that work queues run in process context. This is in contrast to the other bottom-half mechanisms, which all run in interrupt context. Code running in interrupt context is unable to sleep, or block, because inter...

Get the Linux Kernel make process to rebuild modified files

I'm building a custom Ubuntu kernel and have modified one of the source files. When I issue the build command: NOEXTRAS=1 skipabi=true skipmodule=true fakeroot debian/rules binary-insp8600 it rebuilds the debs, but none of the modified source files are rebuilt. What's up? Do I have to do a completely clean rebuild every time I modi...

Strange Build Message from Linux Kernel

I was trying to rebuild my kernel after modifying some source files and noticed the following message in the build output: II: New modules (you've been busy, wipe the poop off your nose) What is that supposed to mean? What other weirdness awaits me in the Kernel? ...

__udivdi3 undefined. Howto find code?

Compiling a kernel module on 32-Bit Linux kernel results in "__udivdi3" [mymodule.ko] undefined! "__umoddi3" [mymodule.ko] undefined! Everything is fine on 64-bit systems. As far as I know, the reason for this is that 64-bit integer division and modulo are not supported inside a 32-bit Linux kernel. How to I find the code issueing th...

Distinguishing between execution control paths

I want to distinguish between various execution paths in linux kernel so that I can monitor a particular thread by grepping on its id in dmesg. Is task_struct->pid sufficient to distinguish between all threads of execution (like kernel threads executing on behalf of user processes, normal kernel threads with process contexts but not ex...

What is kernel's KMS(kernel mode setting) API?

What is kernel's KMS(kernel mode setting) API? ...

nanosleep high cpu usage?

I noticed that a little test program which calls nanosleep is showing a huge difference in CPU usage when run on Linux machines with a kernel newer than 2.6.22. #include <time.h> int main (void) { struct timespec sleepTime; struct timespec returnTime; sleepTime.tv_sec = 0; sleepTime.tv_nsec = 1000; while (1) { ...

Add insmod Kernel HID module

Dear All, I made certain modifications in hid module. I can make it and load (insmod) it on kernel v 2.6.27.14 sucessfully Now I am willing to load the same kernel module on kernel v 2.6.27.11 As there is no differance in the kerbel source files for both the kernel versions I can make it sucessfully, but I cannot add / insmod in th...

Can this kernel function be more readable? (Ideas needed for an academic research!)

Following my previous question regarding the rationale behind extremely long functions, I would like to present a specific question regarding a piece of code I am studying for my research. It's a function from the Linux Kernel which is quite long (412 lines) and complicated (an MCC index of 133). Basically, it's a long and nested switch...