kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: mulyadi.santosa@gmail.com (Mulyadi Santosa)
To: kernelnewbies@lists.kernelnewbies.org
Subject: query regarding kernel daemon
Date: Tue, 5 Apr 2011 13:40:35 +0700	[thread overview]
Message-ID: <BANLkTik5vvmGZfK6O_qhHbKT6t4LgVh6uw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTim6StdO_DFJC+L=baWXwm25fNm=XA@mail.gmail.com>

On Mon, Apr 4, 2011 at 16:28, shubham sharma <shubham20006@gmail.com> 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

      parent reply	other threads:[~2011-04-05  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-04  9:28 query regarding kernel daemon shubham sharma
2011-04-04  9:45 ` Daniel Baluta
2011-04-05  6:40 ` Mulyadi Santosa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTik5vvmGZfK6O_qhHbKT6t4LgVh6uw@mail.gmail.com \
    --to=mulyadi.santosa@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).