Re: [patch 2/2] x86 amd fix cmpxchg read acquire barrier



* Alan Cox (alan@xxxxxxxxxxxxxxxxxxx) wrote:
There is no official AMD bug ID yet, but it seems to be reported in the field
and a fix is present in Solaris code base. The following links shows the current
understanding of the issue.

I would like to know why there isn't an official vendor Bug ID yet
because without that nobody knows what the fix actually is or when it is
needed.

I guess AMD should answer to this.

It's also not going to help much given the user space problem
(and mixed kernel/user stuff like futexes).

Yeah, ideally, unless user-space is completely audited, the kernel
should restrict multi-threaded user-space programs to run on a single
CPU unless they don't share any memory mapping when the kernel finds it
is running on such broken CPU. Or it can simply refuse to bring up more
than one CPU. That would be a very basic gross fix for a gross problem,
but at least there would be no data corruption. If we use this last
solution, then my cmpxchg lfence workaround becomes unneeded.

Second point - it needs to be possible to avoid compiling this stuff in
the first place. I don't see where you arrange CMPXCHNG_LFENCE to come
out as blank when people compile for processors without the bug ?


Good point. I should probably configure this as "nothing" unless

#ifdef CONFIG_X86_64
#if (defined(CONFIG_GENERIC_CPU) || defined(CONFIG_MK8))
...
#endif
#endif

I doubt it's worth adding a "HAVE_MISSING_CMPXCHG_LFENCE" select.

Mathieu

--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • crash on x86_64 - mm related?
    ... You can see the voluminous kernel output below. ... wait for someone to reboot the machine first. ... Trying to fix it up, ... CPU 1 ...
    (Linux-Kernel)
  • Re: computer becomes slow when compiling something
    ... Try the same thing again without INVARIANTS and WITNESS, both of which can consume a lot of CPU in kernel on a very active system, especially if lots of vnodes are being allocated and freed. ... If it's broke, don't fix it. ...
    (freebsd-current)
  • Re: [PATCH] x86: fix wakeup_cpu with numaq/es7000 v2
    ... I encountered boot failure on x86_32 box. ... Subject: x86: genapic: fix missing wakeup_cpu setup ... CPU: Trace cache: 12K uops, ... # Input Device Drivers ...
    (Linux-Kernel)
  • [git pull] scheduler changes for v2.6.27
    ... use a 2-d bitmap for searching lowest-pri CPU ... fix SCHED_OTHER balance iterator to include all tasks ... #ifdef CONFIG_SCHEDSTATS ...
    (Linux-Kernel)
  • Re: Moon Patrol - needs help
    ... Def be something on the video board tho. ... I know that some people (including myself like to be able to fix ... CPU board you need to fallow some simple steps. ... the games, and secondly I enjoy playing, and having others play the ...
    (rec.games.video.arcade.collecting)