All of lore.kernel.org
 help / color / mirror / Atom feed
* Load interrupt code dynamically
@ 2007-07-31 21:26 Haifeng He
  2007-08-01  0:03 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Haifeng He @ 2007-07-31 21:26 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-01 10:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-31 21:26 Load interrupt code dynamically Haifeng He
2007-08-01  0:03 ` Alan Cox
2007-08-01 11:06   ` Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.