mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
	Zwane Mwaikambo <zwane@fsmlabs.com>,
	linux-kernel@vger.kernel.org, wli@holomorphy.com
Subject: Re: [PATCH] remove LOCK_SECTION from x86_64 spin_lock asm
Date: Thu, 16 Sep 2004 09:53:39 +0200	[thread overview]
Message-ID: <20040916075339.GJ12915@wotan.suse.de> (raw)
In-Reply-To: <20040916074431.GA13713@elte.hu>

On Thu, Sep 16, 2004 at 09:44:31AM +0200, Ingo Molnar wrote:
> it only works on pointer less kernels because the spinlock profile 
> unwinding is _conditional_ on an FP kernel right now:
> 
>  #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
>  unsigned long profile_pc(struct pt_regs *regs)
>  {
>  ...
> 
> on non-FP kernels you'll see all the overhead in the single spin_lock()
> function, agreed?

Agreed.  Ok, should be easy to fix with the same scheme, except
that it has to use offset 0 instead of 1 for the !FP case.
I will cook up a patch.

BTW the SMP check is also wrong because preemptive kernels also
need this unwinding, although they should not spend too much
time in locking.

> > > in this respect - it might work if you can detect for sure at build time
> > > whether there's any local variable. Tricks like this really tend to
> > > haunt us later.
> > 
> > There are already lots of such assumptions in the kernel (e.g. WCHAN
> > and others).  I don't think adding one more is a big issue.
> 
> wchan has only one assumption: that that all __sched section functions

It's more than WCHAN, e.g. sysrq-t assumes it too. 

-Andi

  reply	other threads:[~2004-09-16  7:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-15 16:01 Zwane Mwaikambo
2004-09-15 21:45 ` Andrew Morton
2004-09-15 17:55   ` Zwane Mwaikambo
2004-09-15 21:47   ` Ingo Molnar
2004-09-16  6:13   ` Andi Kleen
2004-09-16  6:27     ` Ingo Molnar
2004-09-16  6:44       ` Andi Kleen
2004-09-16  6:51         ` Ingo Molnar
2004-09-16  6:53           ` Andi Kleen
2004-09-16  6:58             ` Ingo Molnar
2004-09-16  7:09               ` Andi Kleen
2004-09-16  7:19                 ` Ingo Molnar
2004-09-16  7:29                   ` Andi Kleen
2004-09-16  7:44                     ` Ingo Molnar
2004-09-16  7:53                       ` Andi Kleen [this message]
2004-09-16  9:01                       ` Andi Kleen
2004-09-16 12:44       ` Zwane Mwaikambo
2004-09-16 19:30         ` Ingo Molnar
2004-09-15 22:42 Andrew Chew

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=20040916075339.GJ12915@wotan.suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=wli@holomorphy.com \
    --cc=zwane@fsmlabs.com \
    /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

Powered by JetHome