public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Waychison <Michael.Waychison@Sun.COM>
To: Arun Srinivas <getarunsri@hotmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: problem with printk on SMP-- somebody please help
Date: Tue, 09 Nov 2004 09:54:56 -0500	[thread overview]
Message-ID: <4190DA40.9030407@sun.com> (raw)
In-Reply-To: <BAY10-F26KktkpgnkTl0003031e@hotmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Arun Srinivas wrote:
> hi
> 
> I really appreciate your suggestions and as a newcomer eager to learn
> more from you people.
> 
> As I said I was able to do printk anywhere in the sched.c (including
> _activate_task ) on a non-smp kernel and on a smp-kernel I can do it
> only on the main schedule() function.
> Also, I would like to add that I am not able to do the macro rdtsc() for
> reading the timestamp counter in the same function.When I compile the
> kernel it dosent show any error, but just the printk's and rdtsc()'s get
> subdued!
> 
> Well,  with reference to your reply, I have some basic questions:
> 1) on a non-smp kernel will the _activate_task not lock the given runqueue?

The locking is done in schedule().  Read include/linux/spinlock.h to see
how spinlocks differ in the SMP vs non-SMP case.  In the latter case
with spinlock debugging enabled, there is no lock bit and recursively
grabbing a lock is possible (though still not allowed!).

> 2) where is the best place I can do the rdtsc() and printk to read the
> value as to when a task is being scheduled for execution, on a SMP kernel?
> 

No idea wrt to rdtsc.

HTH,

- --
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

iD8DBQFBkNpAdQs4kOxk3/MRAkCCAJ9IoN7VfyymTBuYn7R8//dbxLGwkACfUTQu
l1BiHVTfZf6IvIT2+nqsiPE=
=loXh
-----END PGP SIGNATURE-----

  reply	other threads:[~2004-11-09 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-09  2:25 problem with printk on SMP-- somebody please help Arun Srinivas
2004-11-09 14:54 ` Mike Waychison [this message]
2004-11-09 18:59   ` arun srinivasan

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=4190DA40.9030407@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