All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Steve Wahl <steve.wahl@hpe.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Dave Hansen <dave.hansen@intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, justin.ernst@hpe.com,
	kyle.meyer@hpe.com, dimitri.sivanich@hpe.com,
	russ.anderson@hpe.com, linux-kernel@vger.kernel.org,
	mhiramat@kernel.org, Matt Mullins <mmullins@fb.com>
Subject: Re: [PATCH] x86: Drop KGDB support
Date: Fri, 30 Oct 2026 16:28:41 +0000	[thread overview]
Message-ID: <20261030162841.23ffeb6b@pumpkin> (raw)
In-Reply-To: <auNnKmfx_2Dp0IxH@swahl-home.5wahls.com>

On Thu, 29 Oct 2026 10:32:58 -0500
Steve Wahl <steve.wahl@hpe.com> wrote:

> On Thu, Oct 29, 2026 at 10:51:21AM +0000, David Laight wrote:
> > On Wed, 28 Oct 2026 14:58:12 -0500
> > Steve Wahl <steve.wahl@hpe.com> wrote:
> >   
> > > On Wed, Oct 28, 2026 at 08:10:54AM -0700, Dave Hansen wrote:  
> > ...  
> > > 
> > > For an example, I recently used this method to discover that at
> > > least one version of Intel's MPI library likes to read up
> > > /proc/kallsyms from each of the processes it starts, and somewhere
> > > north of 1000's of processors the atomic increment on opening
> > > kallsyms, implemented with a compare-exchange, becomes a hot lock
> > > and initialization that takes little time on a smaller number of
> > > processors, suddenly balloons to half an hour.  
> > 
> > I'm guessing that was pre-ARMv8.1 ??  
> 
> x86, not arm.  And it was on a distro kernel, I didn't check the
> current community kernel because it was a situation where it was
> enough to understand what's going on in the distro kernel, and avoid
> the behavior in the application. 

x86 shouldn't have an exponential issue with cas.
Something else must have been going on.

David

> 
> > The LL/SC retry loops for atomics are completely broken for contended
> > operations.
> > The kernel needs to patch them to use the LSE (single instruction
> > atomics) for ARMv8.1 which guarantee that some progress is made.
> > A CAS loop can still get starved on a single CPU, but some CPU
> > do proceed.
> > You really don't want to use LL/LC on a system with hraair CPU.
> > 
> > One CPU (not arm) that implements LL/SC locks the cache line for a
> > few clocks after LL to give a reasonable chance of the associated SC
> > actually succeeding before the cache line is 'stolen' by another CPU
> > doing an LL.  
> 
> Thanks,
> 
> --> Steve  
> 


  reply	other threads:[~2026-10-30 16:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 12:21 [PATCH] x86: Drop KGDB support Peter Zijlstra
2026-10-28 14:15 ` H. Peter Anvin
2026-10-28 14:26   ` Peter Zijlstra
2026-10-28 15:10     ` Dave Hansen
2026-10-28 19:58       ` Steve Wahl
2026-10-29  8:46         ` Peter Zijlstra
2026-10-29 10:34           ` David Laight
2026-10-30  2:00             ` Masami Hiramatsu (Google)
2026-10-30 16:27               ` David Laight
2026-10-29 10:51         ` David Laight
2026-10-29 15:32           ` Steve Wahl
2026-10-30 16:28             ` David Laight [this message]
2026-10-30 20:56               ` Steve Wahl
2026-10-30 22:31                 ` David Laight
2026-11-02 22:14                   ` Steve Wahl
2026-11-02 13:33 ` Breno Leitao

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=20261030162841.23ffeb6b@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dimitri.sivanich@hpe.com \
    --cc=hpa@zytor.com \
    --cc=justin.ernst@hpe.com \
    --cc=kyle.meyer@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mmullins@fb.com \
    --cc=peterz@infradead.org \
    --cc=russ.anderson@hpe.com \
    --cc=steve.wahl@hpe.com \
    --cc=tglx@kernel.org \
    --cc=x86@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 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.