From mboxrd@z Thu Jan 1 00:00:00 1970 From: mulyadi.santosa@gmail.com (Mulyadi Santosa) Date: Tue, 5 Apr 2011 13:40:35 +0700 Subject: query regarding kernel daemon In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mon, Apr 4, 2011 at 16:28, shubham sharma wrote: > The problem I am facing is that when I enter the string the second time, the > system stalls. I added some sleeps in the code and figured out that when the > proc function wakes up the daemon, the system stalls. Typical: you must be doing somekind of busy looping or block while interrupt is down. And this matter a lot since what running here is kernel thread/daemon, which operate entirely in kernel space i.e if it blocks, then the entire OS stalls since most likely scheduling happen during kernel to user mode transition or voluntarily. So as a side watch, check the preemption model your kernel use... try to avoid no preemption...and if you could, switch to full preemption mode...in this mode, preemption could happen on interrupt-to-kernel mode transition. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com