Load interrupt code dynamically



Hi, all,

I am working on a project to reduce the memory requirement of Linux
kernel code. The idea is to keep infrequent executed code on disk and
load them into a
buffer (code buffer) in memory at runtime. The idea is simple but
there are many issues
dealing with the concurrency in the kernel. Interrupt is one of them.

Since interrupt is executed asynchronously, my current solution is to
assign two buffers: one for regular (non-interrupt code) and one
specifically for
interrupt code. However, the scheme still does not work well. The
problem is that, it seems,
there can multiple interrupt occur at the same in the kernel and
therefore, if interrupt
A is using the code buffer, another interrupt B can be issued and
overwrite the code
buffer(where A's code is stored). I found couples of such examples,
including, driver code
for ide (driver/ide/) and video (driver/video/vgacon.c) and console
(driver/char/). My
feeling is that since handling ide interrupt may take a while, kernel
will enable
other interrupts when handling an ide request.

My first question is, what are other interrupts in the kernel that can
allow other interrupts
to be issued? Second question is, how does the kernel switch between
different interrupts? Last, any suggestion on how to change my current
implementation to
enable loading interrupt code dynamically?

Thank you

Haifeng
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Interrupt context...
    ... > gone through most of the posts on interrupt in usenet. ... > kernel stack and ISR is executed. ... More may be saved depending on the architecture. ... Here the kernel have assembler code to save all general ...
    (comp.os.linux.development.system)
  • Re: [PATCH 19-rc1] Fix typos in /Documentation : Misc
    ... +do not have a corresponding kernel virtual address space mapping) and ... This command sets the scale factor for the ABSOLUTE MOUSE POSITIONING mode. ... If you check the source code you will see that what I draw here as a frame ... interrupt-parent: contains the phandle of the interrupt ...
    (Linux-Kernel)
  • Re: [PATCH 18-rc3] Fix typos in /Documentation : Q-R
    ... The driver will receive them again on the ... The kernel is entered with r3 pointing to an area of memory that is ... Bits are then right shifted into the GP_SAMPLE register at the specified ... you get an interrupt when a full DWORD is recieved. ...
    (Linux-Kernel)
  • PROBLEM: oops in 2.6.21.1 after bringing up the network
    ... I am consistently getting a kernel oops from a vanilla 2.6.21.1 kernel. ... Fatal exception in interrupt ... pin B routed to IRQ 0 ... Elitegroup Computer Systems Unknown device b732 ...
    (Linux-Kernel)
  • [PATCH] Update Documentation/DocBook/kernel-hacking.tmpl
    ... Kernel Hacking. ... not associated with any process, serving a softirq, tasklet or bh; ... For example, while a softirq is running on a CPU, no other ... but a hardware interrupt can. ...
    (Linux-Kernel)