public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Andi Kleen <ak@suse.de>
Cc: John Levon <levon@movementarian.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] oprofile for 2.5.39
Date: Sat, 28 Sep 2002 20:47:06 -0700	[thread overview]
Message-ID: <3D9677BA.110E5AB3@digeo.com> (raw)
In-Reply-To: 20020929050807.A17869@wotan.suse.de

Andi Kleen wrote:
> 
> smp_processor_id

Using smp_processor_id() is usually a bug.

Please default to using get_cpu()/put_cpu().

- It pins the caller onto that CPU if the kernel is preemptive.

- You may not sleep inside get_cpu/put_cpu.  

- If you do something which might sleep inside get_cpu/put_cpu,
  you get might_sleep() warnings.

Probably, smp_processor_id() needs to be renamed to something
which is hard to type.

  parent reply	other threads:[~2002-09-29  3:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020929014440.GA66796@compsoc.man.ac.uk.suse.lists.linux.kernel>
2002-09-29  2:29 ` [PATCH][RFC] oprofile for 2.5.39 Andi Kleen
2002-09-29  2:52   ` John Levon
2002-09-29  3:08     ` Andi Kleen
2002-09-29  3:14       ` Andi Kleen
2002-09-29  3:27       ` John Levon
2002-09-29  4:11         ` Anton Blanchard
2002-09-29  3:47       ` Andrew Morton [this message]
2002-09-29  3:53         ` John Levon
2002-09-29  1:44 John Levon

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=3D9677BA.110E5AB3@digeo.com \
    --to=akpm@digeo.com \
    --cc=ak@suse.de \
    --cc=levon@movementarian.org \
    --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