profile code added to netif_receive_skb function

2007-11-25 Thread kernel coder
hi, I have added some code to netif_receive_skb function.As linux kernel is multhreaded , so there is no gaurantee than mine code is completely executed without being disturbed by any other process .Timer interrupt handler is an example of code which might interrupt execution of mine code. I just

increased number of cycles

2007-11-17 Thread kernel coder
hi, I'm trying to add some code to netif_receive_skb function in dev.c file . The cycles consumed by that code was around 16 cycles on Dual Core Opetron machine.I'm working on that code for last 6 months now and the consumed cycles have always been around 16 cycles .I don't touch any other

cann't dump info to user file from kernel

2007-10-02 Thread kernel coder
hi, I'm trying to dump some information from dev.c to user space file.Following is the code which i'm using to write to user spcae file.I'm using 2.6.22.x86_64 kernel. #define _write(f, buf, sz) (f->f_op->write(f, buf, sz, &f->f_pos)) #define WRITABLE(f) (f->f_op && f->f_op->write) int

tcp/ip stack question

2007-06-07 Thread kernel coder
hi, I am recieveing the packet on eth1 and want to send it through eth2. I've written code in netif_recieve_skb function .This code changes the mac header in sk_buff structure so that it can be send through other interface card.But when i call ip_dev_find fucntion to get the second interfac

system call implementation for x86_64

2007-05-19 Thread kernel coder
hi, I'm trying to implement a system call for x86_64. Mine processor is dual core opetron.There is very little material on web for implementing system calls for x86_64 processor for 2.6 series kernel.I tried to implement a new system call by observing the existing implementation but to no success

bechmarking kernel code

2007-05-03 Thread kernel coder
hi, I'm profiling some part of kernel code.Mine profiling mechanism is based on rdtsc instruction. Please tell me if i'm profiling correctly.I'm teting linux kernel 2.6.15 and mine system is P4. function(){ unsigned long long c1,c2,c3,c4,c5; before=readtsc(); before

AMD dual core opetron optimization

2007-04-30 Thread kernel coder
hi, I'm doing trying to write some optimized code for AMD dual core opetron processor.But things are getting no where.I've installed Fedora 5 with 2.6 series Linux kernel and 4 series GCC Following are few lines of code which are consuming close to 100 cycles.Yes this is not the forum for such