Hi 

Thanks for your reply. Regarding your suspects - 

1. I am actually calling the register_timer_interrupt routine to register the 
hook only once by running the userspace program once that registers the hook. 
So there should not be any lock contention I think unless the lock is global in 
the kernel!!!

2. I can't think about why it would overflow kernel stack because do_timer() 
calls many other functions too and my registered hook is like any function call 
which is currently empty. So it should not take any time to execute it.

3. After I load the module, I run the userspace program which registers the 
hook and terminates. The system runs fine for about 5-10 secs after that before 
freezing. 

- Meraj




Mulyadi Santosa <[EMAIL PROTECTED]> wrote: Hello...

> Why is registering an empty function and calling it from inside do_timer
> freezing the system after a short period of good run?

There are several suspects:
1. your code (call_timer_hook) is called while xtime_lock is held. it
could lead to lock contention.
2. you're running out of kernel stack. I don't have hard proof, purely
blind guessing. Try to make all your hook function a "static inline"
one. Silently overflowing kernel stack, AFAIK, is hard to detect. Do
you use 4K or 8K stack size? try 8K and see if it helps.

Before I forgot, you said it runs OK for after (quick?) period? So
this problem is intermitent?

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ



       
---------------------------------
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

Reply via email to