Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2791879pxa; Tue, 25 Aug 2020 03:29:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+zHIVTUSCCmIuJaE9qeISxcQaq4ukCYxuzVhM/vH58RVz477GJjQWUrEqnbMU0/ES2jxV X-Received: by 2002:a05:6402:168c:: with SMTP id a12mr9172323edv.275.1598351395131; Tue, 25 Aug 2020 03:29:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598351395; cv=none; d=google.com; s=arc-20160816; b=WGFxJf+hjQhf+F41LYF0ipvoK5iBRvp5aZmzdcd42AFTMTNWekv6eMb/J0RU6y/khy epK/fe/vLC2U/dAkzPRmbaeLPMMLY8wqLS7bj3fwN6GZ7Bhxl+FZPtCF+oJ32H4dvwJl e5TJ1w2Kiysl9EXDO1fTlIBhFD/BoYV25NtvDCfBW9taxvPC7m/BxAGzX9nUhuRf51jm UJp3fxqvT0Hgs6LXQTsiQTjvezl05vUAN+Bw2T94E7Tp6xbkFmF+5bMx3QHmJ0R2dwk9 hqSbibAmzz7XzyKvItVrZGPOhzyvQz2eWyLIzu7CLaQcK8qgPb03eQfB10xWwz9ZI2LC iNeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=XGq27nqRzhydXuYXKqM77GLSeoyVZvew8+Gqoyfxaks=; b=jXvssyk3/tVIZu3oIFv62IgBYf45ufg7QFMcwCS56v51RTjHshhxaq72K2meZvnpav 7B0kT14aVD3i9gGsitqgfqiHQbG+AiAfVX2mzyO7K1HweSDeAlQhaGodOWbldsUMZ5An 8wLGjWi0cIlztqFydygjayKhfNsi5wHcARnFmKIpXjpFbrtc/SUlCPOiLuQyfQZ2LxQe JkPBfu74mcTZOLdzqz27JdIgd45DAQo/2DyA/RPS9lBkOnNY/+8OEHzjLEooORIM6MT9 hoEy+eiQY7KlnzzzpxbS0wiNM+9++V07A6rLNtkwwaZieb35/m6J4oXzXAW1kTFt5Xqf sxtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MNRhKl0q; dkim=neutral (no key) header.i=@linutronix.de header.b=vNvYriJp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si4266805ejx.267.2020.08.25.03.29.32; Tue, 25 Aug 2020 03:29:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MNRhKl0q; dkim=neutral (no key) header.i=@linutronix.de header.b=vNvYriJp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729801AbgHYK22 (ORCPT + 99 others); Tue, 25 Aug 2020 06:28:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729458AbgHYK21 (ORCPT ); Tue, 25 Aug 2020 06:28:27 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6CF6C061574 for ; Tue, 25 Aug 2020 03:28:26 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1598351305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XGq27nqRzhydXuYXKqM77GLSeoyVZvew8+Gqoyfxaks=; b=MNRhKl0qJ3SryZLP4eRQmYXdz3FaBYrzxO8W2bXu0lWcKc+pTA4/j4AH05VewuixcxT4Bj 6kjUIAB7SE2EzCnBiVSkqc9aAu5QWjDOGnhGBrGvPncGyM88VwRAboHDAWqsyp58rwHj0D w1RNrKqMqMxeSXq/Ze7MfoxILzclWU1OKQBEtbL+NUyMOI7Y2F0afqjqVcWaGa5RfuV370 UwSPnrv681bmj1Y0juMM6ZYKLFxyB3IqhfX8kNSstLMyfkHTYzjZrL74RVMQZYOctDrr/G BOLpIDt43lmfSvOYBZGc6AQ9bQuFpNHFDruXaAbM3m3/aXKiRkCTLzgKYvLsWw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1598351305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XGq27nqRzhydXuYXKqM77GLSeoyVZvew8+Gqoyfxaks=; b=vNvYriJpXxiCcZDhrSzCuVO1860RkEGwRvJ24kUFCEevngTqJUnCmG3IUNU7idOSE/CJ5E YWArQe2XGyg95+AA== To: Alexander Graf , LKML Cc: Andy Lutomirski , Andrew Cooper , X86 ML , "Paul E. McKenney" , Alexandre Chartre , Frederic Weisbecker , Paolo Bonzini , Sean Christopherson , Masami Hiramatsu , Petr Mladek , Steven Rostedt , Joel Fernandes , Boris Ostrovsky , Juergen Gross , Brian Gerst , Mathieu Desnoyers , Josh Poimboeuf , Will Deacon , Tom Lendacky , Wei Liu , Michael Kelley , Jason Chen CJ , Zhao Yakui , "Peter Zijlstra \(Intel\)" , avi@scylladb.com, "Herrenschmidt\, Benjamin" , robketr@amazon.de, amos@scylladb.com Subject: Re: [patch V9 21/39] x86/irq: Convey vector as argument and not in ptregs In-Reply-To: References: <20200521200513.656533920@linutronix.de> <20200521202118.796915981@linutronix.de> Date: Tue, 25 Aug 2020 12:28:24 +0200 Message-ID: <87a6yj58af.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alex, On Mon, Aug 24 2020 at 19:29, Alexander Graf wrote: > I'm currently trying to understand a performance regression with=20 > ScyllaDB on i3en.3xlarge (KVM based VM on Skylake) which we reliably=20 > bisected down to this commit: > > https://github.com/scylladb/scylla/issues/7036 > > What we're seeing is that syscalls such as membarrier() take forever=20 > (0-10 =C2=B5s would be normal): ... > That again seems to stem from a vastly slowed down=20 > smp_call_function_many_cond(): > > Samples: 218K of event 'cpu-clock', 4000 Hz > Overhead Shared Object Symbol > 94.51% [kernel] [k] smp_call_function_many_cond > 0.76% [kernel] [k] __do_softirq > 0.32% [kernel] [k] native_queued_spin_lock_slowpath > [...] > > which is stuck in > > =E2=94=82 csd_lock_wait(): > =E2=94=82 smp_cond_load_acquire(&csd->flags, !(VAL & > 0.00 =E2=94=82 mov 0x8(%rcx),%edx > 0.00 =E2=94=82 and $0x1,%edx > =E2=94=82 =E2=86=93 je 2b9 > =E2=94=82 rep_nop(): > 0.70 =E2=94=822af: pause > =E2=94=82 csd_lock_wait(): > 92.82 =E2=94=82 mov 0x8(%rcx),%edx > 6.48 =E2=94=82 and $0x1,%edx > 0.00 =E2=94=82 =E2=86=91 jne 2af > 0.00 =E2=94=822b9: =E2=86=91 jmp 282 > > > Given the patch at hand I was expecting lost IPIs, but I can't quite see= =20 > anything getting lost. I have no idea how that patch should be related to IPI and smp function calls. It's changing the way how regular device interrupts and their spurious counterpart are handled and not the way how IPIs are handled. They are handled by direct vectors and do not go through do_IRQ() at all. Aside of that the commit just changes the way how the interrupt vector of a regular device interrupt is stored and conveyed. The extra read and write on the cache hot stack is hardly related to anything IPI. Thanks, tglx