Wednesday, September 23, 2015

SoftIRQ priority

include/linux/interrupt.h

enum
{
HI_SOFTIRQ=0,
TIMER_SOFTIRQ,
NET_TX_SOFTIRQ,
NET_RX_SOFTIRQ,
BLOCK_SOFTIRQ,
BLOCK_IOPOLL_SOFTIRQ,
TASKLET_SOFTIRQ,
SCHED_SOFTIRQ,
HRTIMER_SOFTIRQ, /* Unused, but kept as tools rely on the
   numbering. Sigh! */
RCU_SOFTIRQ,    /* Preferable RCU should always be the last softirq */

NR_SOFTIRQS
};

tasklet_schedule(struct tasklet_struct *t)
   __tasklet_schedule(t);

__tasklet_schedule(struct tasklet_struct *t)
   raise_softirq_irqoff(TASKLET_SOFTIRQ);


--------- Timer ----------------
void __init init_timers(void)
open_softirq(TIMER_SOFTIRQ, run_timer_softirq);

void open_softirq(int nr, void (*action)(struct softirq_action *))
softirq_vec[nr].action = action;

void run_local_timers(void)
        hrtimer_run_queues();
raise_softirq(TIMER_SOFTIRQ);

void hrtimer_run_queues(void)
        now = hrtimer_update_base(cpu_base);
       __hrtimer_run_queues(cpu_base, now);
   

Thursday, June 4, 2015

Linux Kernel SysRq




SysRq key can be enabled with the following command:
echo 1 > /proc/sys/kernel/sysrq

causes a kernel panic 
echo c > /proc/sysrq-trigger


 equivalent to the key combination Alt+SysRq+B which reboots the machine.
echo b > /proc/sysrq-trigger

Thursday, January 29, 2015

routing table

from 192.168.1.x to 192.168.123.x

root@EbMajor:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.123.254 0.0.0.0         UG    0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 br-lan
192.168.123.0   *               255.255.255.0   U     0      0        0 eth0

Wednesday, January 28, 2015