public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marin Mitov <mitov@issp.bas.bg>
To: linux-kernel@vger.kernel.org
Subject: Re: is minimum udelay() not respected in preemptible SMP kernel-2.6.23?
Date: Thu, 8 Nov 2007 13:24:49 +0200	[thread overview]
Message-ID: <200711081324.49130.mitov@issp.bas.bg> (raw)
In-Reply-To: <20071107123045.c6d4b855.akpm@linux-foundation.org>

Hi all,

Thanks to all of you answering to my post.

On 7.11.2007, Andrew Morton wrote:
> Ow.  Yes, from my reading delay_tsc() can return early (or after
> heat-death-of-the-universe) if the TSCs are offset and if preemption
> migrates the calling task between CPUs.
>
> I suppose a lameo fix would be to disable preemption in delay_tsc().

I have seen the problem in delay_tsc(), but I was pusled by these lines
in my dmesg:

> Time: acpi_pm clocksource has been installed.
> Switched to high resolution mode on CPU 0
> Switched to high resolution mode on CPU 1

I thought (sort of) acpi_pm (but not tsc) is used in udelay().

The same delay_tsc() is used in both arches: i386 & x86_64
(and as I see from the proposed patches in -mm, also for 
the new x86 arch). Should the patch be applied for all of them?

Quite similar function ia64_itc_udelay() is used in IA64, but one
find a coment before it:
/*
 * Generic udelay assumes that if preemption is allowed and the thread
 * migrates to another CPU, that the ITC values are synchronized across
 * all CPUs.
 */

Are they really synchronized or similar patch: preempt_disable/enable()
should be applied?

What about all other arches?

Thanks.

Marin Mitov

      parent reply	other threads:[~2007-11-08 11:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-07 17:21 is minimum udelay() not respected in preemptible SMP kernel-2.6.23? Marin Mitov
2007-11-07 20:30 ` Andrew Morton
2007-11-07 23:10   ` Andi Kleen
2007-11-08  0:20   ` Matt Mackall
2007-11-08  0:31     ` Andi Kleen
2007-11-08  1:03       ` Matt Mackall
2007-11-08  1:20         ` Andi Kleen
2007-11-08  2:44           ` Matt Mackall
2007-11-08 11:46       ` Avi Kivity
2007-11-08 15:10         ` Matt Mackall
2007-11-08  9:11     ` Peter Zijlstra
2007-11-08 15:43       ` Matt Mackall
2007-11-08 11:24   ` Marin Mitov [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=200711081324.49130.mitov@issp.bas.bg \
    --to=mitov@issp.bas.bg \
    --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