mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Liu haixiang" <liu.haixiang@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Question on Schedule and Preemption
Date: Tue, 18 Apr 2006 15:23:01 +0800	[thread overview]
Message-ID: <bf3792800604180023r2a2111b4ude5ef15f9dd855a@mail.gmail.com> (raw)

Hi All,

Now I am developing the driver on Linux kernel 2.6.11. And I met the
problem that kernel will dump my stack from time to time. And the
kernel log will give me messages like "scheduling while atomic: ...".

Then I found the code in sched.c:

if (likely(!current->exit_state)) {
	if (unlikely(in_atomic())) {
		printk(KERN_ERR "scheduling while atomic: "
			"%s/0x%08x/%d\n",
			current->comm, preempt_count(), current->pid);
		dump_stack();
	}
}

Anybody can explain above code for me?

Thanks

best regards

Haixiang Liu

             reply	other threads:[~2006-04-18  7:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-18  7:23 Liu haixiang [this message]
2006-04-18  9:17 ` Andreas Mohr
2006-04-18  9:23   ` Arjan van de Ven
2006-04-18  9:28     ` Andreas Mohr
2006-04-18 12:55   ` Liu haixiang
2006-04-18 14:56     ` Steven Rostedt
2006-04-18 17:21       ` Liu haixiang
2006-04-18 17:32         ` Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2006-04-18 13:31 Michael Guo
2006-04-18  7:12 Liu haixiang

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=bf3792800604180023r2a2111b4ude5ef15f9dd855a@mail.gmail.com \
    --to=liu.haixiang@gmail.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®