mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Xu Yang" <risingsunxy@googlemail.com>
To: "Bernd Petrovitsch" <bernd@firmix.at>
Cc: linux-kernel@vger.kernel.org
Subject: Re: looking for a function
Date: Tue, 16 Sep 2008 16:11:10 +0200	[thread overview]
Message-ID: <ab40e9c0809160711p4182d9e7n9b3ce965b3ce9f1f@mail.gmail.com> (raw)
In-Reply-To: <1221573632.6103.83.camel@spike.firmix.at>

Hi Bernd,

thanks for you reply.

yes, I know the thread migrates all the time, this is exactly what I
would like to observe. I would like to learn about the thread
migration of some specific scheduling algorithm. so ....

any idea about the function?

Best regards,

Yang

2008/9/16, Bernd Petrovitsch <bernd@firmix.at>:
> Hi!
>
> On Tue, 2008-09-16 at 14:50 +0200, Xu Yang wrote:
> > Hi guys,
> >
> > I am looking for a function that can show me the current thread is
> > running on which cpu.
>
> > e.g I am using pthread to write a multithreaded program, in each
> > thread I would like to insert such kind of function so that I can know
> > on which cpu this thread is running on.
>
> That doesn't make much sense as the same thread can run on a different
> CPU after each scheduling decision. And - as it is in userspace -
> scheduling can happen before any assembler op.
>
>        Bernd
> --
> Firmix Software GmbH                   http://www.firmix.at/
> mobil: +43 664 4416156                 fax: +43 1 7890849-55
>          Embedded Linux Development and Services
>
>
>

  reply	other threads:[~2008-09-16 14:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16 12:50 Xu Yang
2008-09-16 14:00 ` Bernd Petrovitsch
2008-09-16 14:11   ` Xu Yang [this message]
2008-09-16 14:18     ` Arjan van de Ven
2008-09-16 14:32       ` Xu Yang
2008-09-16 14:29     ` Frédéric Weisbecker
2008-09-16 14:33       ` Xu Yang
2008-09-16 19:04     ` Chris Snook

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=ab40e9c0809160711p4182d9e7n9b3ce965b3ce9f1f@mail.gmail.com \
    --to=risingsunxy@googlemail.com \
    --cc=bernd@firmix.at \
    --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®