All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Zick" <lkml@morethan.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Harald Welte <HaraldWelte@viatech.com>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [Futex RFC] was Re: [BUG FIX] Make x86_32 uni-processor Atomic ops, Atomic
Date: Thu, 28 May 2009 18:15:34 -0500	[thread overview]
Message-ID: <200905281815.36728.lkml@morethan.org> (raw)
In-Reply-To: <200905281555.00245.lkml@morethan.org>

On Thu May 28 2009, Michael S. Zick wrote:
> On Thu May 28 2009, Pavel Machek wrote:
> > Hi!
> > 
> > > > @hpa - I still like your suggestion that it is only one (or a few)
> > > > uses of atomic ops that is incorrect and in general atomic ops
> > > > should compile away on uni-processor.
> > > > 
> > > 
> > > Actually, the more I think about it the more I suspect there is a race
> > > condition either in the chip set or in any VIA-specific drivers (if
> > > there are any.)  Putting LOCKs in random places will slow the CPU down
> > > significantly, so it might resolve the race condition without actually
> > > solving the problem.
> > 
> > Which you can verify; replace lock with something slow (pushad,
> > popad)? And see what happens.
> > 
> > (And if it never ever triggers on hp2133, you have strong clue that it
> > may not be cpu-related, but bios-related or chipset related or something).
> > 
> > Some time ago I was trying to debug misterious hangs on some
> > via/fic machines. 
> > 
> > We never figured out what was wrong, but we discovered many other bios
> > bugs, and those were not being fixed; so debugging was
> > hard/impossible. Unfortunately I no longer have access to that hw.
> > 
> 
> Then I am not losing my mind here - *it is* a difficult problem.  ;)
> 
> > hp2133 did _not_ have that problem.
> >
> 
> Today's build has been playing me music for over 8 hours on the
> HP-2133 (C7M-CN896) but can't get past a couple of hours on the
> (fic) Everex Cloudbook (C7M-CX700).
> 
> Also, the distro on the Cloudbook is using pulse-audio - the
> distro on the HP is not.  So I am reviewing the recent bug
> fixes to kernel/futex for something over-looked.  ;)
> May be a wild goose chase, but I think pulse-audio uses futexes.
> 

Please, somebody apply an experienced eye-ball to this;
It does seem to make a difference, but tests have not run
for very long yet.

diff --git a/arch/x86/include/asm/futex.h b/arch/x86/include/asm/futex.h
index 1f11ce4..da3c801 100644
--- a/arch/x86/include/asm/futex.h
+++ b/arch/x86/include/asm/futex.h
@@ -19,7 +19,8 @@
                     "\t.previous\n"                            \
                     _ASM_EXTABLE(1b, 3b)                       \
                     : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \
-                    : "i" (-EFAULT), "0" (oparg), "1" (0))
+                    : "i" (-EFAULT), "0" (oparg), "1" (0)      \
+                    : "memory")

 #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg)    \
        asm volatile("1:\tmovl  %2, %0\n"                       \
@@ -35,7 +36,8 @@
                     _ASM_EXTABLE(2b, 4b)                       \
                     : "=&a" (oldval), "=&r" (ret),             \
                       "+m" (*uaddr), "=&r" (tem)               \
-                    : "r" (oparg), "i" (-EFAULT), "1" (0))
+                    : "r" (oparg), "i" (-EFAULT), "1" (0)      \
+                    : "memory")


Mike
> Thanks for the other hints.
> 
> Mike 
> > Try forcing maximum throttling, then move mouse for like five
> > seconds. If kbc dies, you have same buggy bios, and probably are
> > debugging same problem....
> > 								Pavel
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 



  reply	other threads:[~2009-05-28 23:15 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 16:39 [BUG FIX] Make x86_32 uni-processor Atomic ops, Atomic Michael S. Zick
2009-05-22 18:23 ` Andi Kleen
2009-05-22 18:36 ` Ingo Molnar
2009-05-22 18:59   ` H. Peter Anvin
2009-05-22 19:20     ` Michael S. Zick
2009-05-22 22:21     ` Michael S. Zick
2009-05-22 23:30       ` H. Peter Anvin
2009-05-23  0:45         ` Michael S. Zick
2009-05-23  0:51           ` H. Peter Anvin
2009-05-23 10:44             ` Michael S. Zick
2009-05-23 11:18               ` Michael S. Zick
2009-05-24  7:04               ` Harald Welte
2009-05-24 12:48                 ` Michael S. Zick
2009-05-24 15:43                 ` Michael S. Zick
2009-05-27 22:13               ` Roland Dreier
2009-05-27 22:33                 ` Michael S. Zick
2009-05-23 15:52             ` Michael S. Zick
2009-05-23 18:04             ` Michael S. Zick
2009-05-23 23:44               ` H. Peter Anvin
2009-05-24  6:49                 ` Harald Welte
2009-05-24 12:38                   ` Michael S. Zick
2009-05-24 17:31                     ` Harald Welte
2009-05-27 12:18                   ` Re:[VIA Support] was: " Michael S. Zick
2009-05-27 12:22                     ` [VIA " Michael S. Zick
2009-05-27 12:47                     ` Harald Welte
2009-05-27 13:00                       ` Michael S. Zick
2009-05-29 12:06                     ` Michael S. Zick
2009-05-30 15:48                   ` Michael S. Zick
2009-05-24 12:27                 ` Michael S. Zick
2009-05-24 17:22                   ` Harald Welte
2009-05-24 18:00                   ` H. Peter Anvin
2009-05-24 18:32                     ` Michael S. Zick
2009-05-24 18:46                       ` H. Peter Anvin
2009-05-24 19:09                         ` Michael S. Zick
2009-05-25 19:03                         ` Michael S. Zick
2009-05-25 19:18                           ` Michael S. Zick
2009-05-25 19:46                             ` Michael S. Zick
2009-05-25 21:10                               ` Michael S. Zick
2009-05-25 21:17                                 ` H. Peter Anvin
2009-05-25 23:03                                   ` Michael S. Zick
2009-05-25 23:35                                     ` Michael S. Zick
2009-05-26  0:05                                     ` H. Peter Anvin
2009-05-26 12:37                                       ` Michael S. Zick
2009-05-26 17:13                                         ` H. Peter Anvin
2009-05-25  1:31                       ` i2c-viapro / via-fb drivers on VIA CX700 Harald Welte
2009-05-25 12:54                         ` Michael S. Zick
2009-05-27 13:36                         ` Michael S. Zick
2009-05-25 16:05                       ` [BUG FIX] Make x86_32 uni-processor Atomic ops, Atomic Michael S. Zick
2009-05-28 20:30                     ` Pavel Machek
2009-05-28 20:54                       ` Michael S. Zick
2009-05-28 23:15                         ` Michael S. Zick [this message]
2009-05-29  2:00                           ` [Futex RFC] was " Michael S. Zick
2009-05-27 17:01                 ` LOCK prefix on uni processor has its use (was Re: [BUG FIX] Make x86_32 uni-processor Atomic ops, Atomic) Harald Welte
2009-05-27 17:10                   ` Michael S. Zick
2009-05-27 17:19                   ` Thomas Gleixner
2009-05-27 17:25                     ` Michael S. Zick
2009-05-27 18:08                   ` LOCK prefix on uni processor has its use Andi Kleen
2009-05-27 18:22                     ` Michael S. Zick
2009-05-27 18:33                       ` Michael S. Zick
2009-05-27 18:55                         ` Michael S. Zick
2009-05-27 18:38                       ` Andi Kleen
2009-06-02 12:48                     ` Harald Welte
2009-06-02 13:03                       ` Andi Kleen
2009-06-02 13:26                         ` Michael S. Zick
2009-06-02 13:42                           ` Andi Kleen
2009-06-03 11:46                             ` Michael S. Zick
2009-05-28  2:56                   ` LOCK prefix on uni processor has its use (was Re: [BUG FIX] Make x86_32 uni-processor Atomic ops, Atomic) H. Peter Anvin
2009-05-23 20:51             ` [BUG FIX] Make x86_32 uni-processor Atomic ops, Atomic Michael S. Zick
2009-05-28 12:48       ` Pavel Machek
2009-05-28 13:29         ` Michael S. Zick
2009-05-28 20:50           ` Pavel Machek
2009-05-28 20:58             ` Michael S. Zick
2009-05-28 21:16               ` Pavel Machek
2009-05-28 21:21                 ` Michael S. Zick
2009-05-22 19:17   ` Michael S. Zick
     [not found] ` <200905221343.30638.lkml@morethan.org>
     [not found]   ` <20090522192329.GF846@one.firstfloor.org>
2009-05-22 19:53     ` Michael S. Zick
2009-05-22 20:05       ` Samuel Thibault
2009-05-22 20:32         ` Michael S. Zick
2009-05-22 20:42           ` Andi Kleen
2009-05-22 20:57             ` Michael S. Zick
2009-05-22 20:43           ` Samuel Thibault
2009-05-22 21:59             ` Andi Kleen
2009-05-22 22:00               ` Samuel Thibault
2009-05-22 22:14                 ` Andi Kleen
2009-05-22 22:14                   ` Samuel Thibault
2009-05-22 20:45           ` Roland Dreier
2009-05-24 18:59           ` Robert Hancock

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=200905281815.36728.lkml@morethan.org \
    --to=lkml@morethan.org \
    --cc=HaraldWelte@viatech.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.