From: Mike Waychison <Michael.Waychison@Sun.COM>
To: Arun Srinivas <getarunsri@hotmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: problem with printk-- somebody please help
Date: Mon, 08 Nov 2004 14:47:59 -0500 [thread overview]
Message-ID: <418FCD6F.30100@sun.com> (raw)
In-Reply-To: <BAY10-F469WbbjykeNX00014ef5@hotmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Arun Srinivas wrote:
> hi
>
> I am new to the kernel world and would be very glad if somebody could
> help me with this problem.
>
> I am unable to do printk or even a macro call like rdtsc()...(for
> reading the time stamp counter) from within the "activate_task"
> function on a kernel with smp support.But these work under the main
> schedule() function.
>
> I was able to do all these i.e., inside "activate_task" on a kernel
> without smp support.Can anybody suggest a solution as to what could be
> the problem??
>
> somebody please help.
I seem to recall that doing so would deadlock your machine.
activate_task is called with the given cpu's runqueue locked. printk
eventually calls release_console_sem, which will wake_up_interruptible,
which will eventually call try_to_wake_up which grabs the same lock.
I don't think I've ever seen printk work while task_rq_lock'ed.
Someone correct me if I'm wrong, this is the best I was able to figure
out before giving up.
- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBj81vdQs4kOxk3/MRAlJGAKCIYIgXCkaSXpwGLdsj/WK1BhPOlwCeK6s0
1pc0XbERKlQKpLIBpObhwZA=
=2DSX
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2004-11-08 19:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-08 18:40 problem with printk-- somebody please help Arun Srinivas
2004-11-08 19:10 ` linux-os
2004-11-08 19:47 ` Mike Waychison [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=418FCD6F.30100@sun.com \
--to=michael.waychison@sun.com \
--cc=getarunsri@hotmail.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