Hello
I need to send (interchange) a high volume of data periodically with the lowest possible latency between 2 machines. The network is rather fast (e.g. 1Gbit or even 2G+). Os is linux. Is it be faster with using 1 tcp socket (for send and recv) or with using 2 uni-directed tcp sockets?
The test for this task is very like NetPIPE ne...
I wrote a system call that opens a directory and gets the file object and the dentry struct. Im trying to list all entries including entries in subdirectories using the list_for_each() macro. The problem is its only displaying whats currently in the dentry cache. If I open the directory with nautilus then rerun the system call, all the e...
Hello
If there is only 1 running application in the system (and default 100 sleeping process), and it do a blocking syscall (I'm interested in blocking recv or blocking read). Will linux kernel delete this application from task_t *current pointer?
...
Where in the linux kernel does the closing of a socket's file descriptor occur? I know for a file, the file's file descriptor is closed in fs/open.cs function sys_close(). However, for a socket file descriptor, is this the same location or somewhere else?
Also, do sockets utilize the file.c alloc_fd to allocate the file descriptor or do...
Hi guys! I read the following statement:
The x86 architecture includes a
specific segment type called the Task
State Segment (TSS), to store hardware
contexts. Although Linux doesn't use
hardware context switches, it is
nonetheless forced to set up a TSS for
each distinct CPU in the system.
I am wondering:
Why doesn't...
I have a Linux kernel module M1 which exports a symbol S1. When I insmod M1.ko, I can see S1 in /proc/kallsyms. I use S1 in another kernel module M2. When I compile and insert module M2, I get message in dmesg saying "Unknown symbol in module S1".
I am stumped. Can someone please tell me what is going wrong? I am using Ubuntu 9.10.
...
In linux kernel programming, is there a way to check if a particular file descriptor is in use for a given process or if it's available?
...
I try to insmod a linux kernel legacy module being ported by me.
The following errors appear:
> sudo insmod camac-mx.ko
insmod: error inserting 'camac-mx.ko': -1 Invalid module format
dmesg |tail -n 1
[1312783.938299] camac_mx: disagrees about version of symbol module_layout
How do I fix this?
...
I'm trying to figure out the technicalities of scheduling in Linux. What I can't figure out is what happens with those entries in the run_queue where there are no running processes.
In the run_queue we have a bitmap, a counter, and the array of lists themselves. For a list that is empty because there are no running tasks with its priori...
Hi, all,
I have a problem with get_user() macro. What I did is as follows:
I run the following program
int main()
{
int a = 20;
printf("address of a: %p", &a);
sleep(200);
return 0;
}
When the program runs, it outputs the address of a, say, 0xbff91914.
Then I pass this address to a module running in Kerne...
How do I manually convert jiffies to milliseconds and vice versa in Linux? I know kernel 2.6 has a function for this, but I'm working on 2.4 (homework) and though I looked at the code it uses lots of macro constants which I have no idea if they're defined in 2.4.
...
I'm trying to get two computers to communicate with each other over firewire. Both of the computers are running Ubuntu 9.10 and both have read/write access to the /dev/raw1394 node. I'm using firecontrol to quickly test sending read/write requests. If I can get it to work with firecontrol, I should be able to figure out how to do the sam...
Hello
I want to know, how does the linux kernel do some stuff (receiving a tcp packet). In what order main tcp functions are called. I want to see both interrupt handler (top half), bottom half and even work done by kernel after user calls "read()".
How can I get a function trace from kernel with some linear time scale?
I want to get ...
Hi,
I am looking at linux startup services, like Cron which runs at level 5 located in init.d,
in the startup script I can only see the script file and location of binary file which is executed on startup. Where can I see the actual source code of this services
...
I made changes in sched.c in Linux kernel 2.4 (homework), and now the system goes into kernel panic. The strange thing is: it seems to pass A LOT of booting checks and initializations, and panics only at the very end, showing hte following stack trace:
update_process_times
do_timer
timer_interrupt
handle_IRQ_event
do_IRQ
call_do_IRQ
do...
I'm writing a linux driver and I would like to register a callback function to be invoked when the system goes to sleep. What is the api to do this?
Thanks.
...
When calling rdma_disconnect(), do I get completion queue events for all posted recv work requests before rdma_disconnect() returns, or should I expect them to come in after rdma_disconnect() has returned?
...
I am compiling a kernel module, containing a structure of size 34, using the standard command.
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
The sizeof(some_structure) is coming as 36 instead of 34 i.e. the compiler is padding the structure.
How do I remove this padding?
Running make V=1 shows the gcc compiler options pas...
I'm messing around with Linux kernel 2.4 and function schedule() in sched.c uses the macro prepare_arch_schedule, which looks really strange. What is that?
Here's the relevant section
#ifndef prepare_arch_schedule
# define prepare_arch_schedule(prev) do { } while(0)
# define finish_arch_schedule(prev) do { } while(0)
# define prepar...
Hello,
I am trying to create a debugfs file using the debugfs_create_file(...). I have written a sample code for this.
static int __init mmapexample_module_init(void)
{
file1 = debugfs_create_file("mmap_example", 06...