From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97112313295 for ; Tue, 14 Oct 2025 12:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760446691; cv=none; b=VVqfUnkilXAMAOQZsBPf6qVoAIWsdpRYzAjb8+am7mXvAAM17S0ZLGMBlwPjXigO3lYWLgYb6WaVbI+NUu4KEihW/BQY88C/nPoM1dJMm2cUaMOtbKZUcqIUCbZUlfNa7OqTalolr4r5xOFbKBZq6NKPSy07F8oxZ92dbgNUAMM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760446691; c=relaxed/simple; bh=K2g5fcbeoiLEypmxm4zdDfAPkL/Zn3ngXE1+qFzQ0Oc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=p5uX6awmFMRb/06+9eifWaAFv6Ulc1t+G9Vq2aRdIRztpMgSWblcqlrvSKDRfvJvWtn8X2RDr6cb+CJorUu5LypVYnXKnG+ajAXogpFmJjkmqCO8+mrZanlLBOPeu7qwq9X3/HIB2XqGKNIWsDt7/kF72zSMmUKY+JuJxuS9Kwc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=F25wjcbo; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="F25wjcbo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760446688; 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: in-reply-to:in-reply-to:references:references; bh=o+P2Dsj3XLhA6fMrQYgh8OLSwYB2MUOQP3SbJkXqJVA=; b=F25wjcbomtI84IuH63y3uCwMe59HV5IiwauKpiD0sHsUdXIpr1gs8FLbLTlt7g7NNTucDn pxXrgcizjcEAVg5AzEb65bkVPcHPq0tEww1Mu2shf//a/rTUEZQSXBZS3zxgeS0OdkZFag 2sqexAC7GHWcCfQQUcgenQ5DS7xbtiM= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-659-zwT0PllYPNySZ82w_TggHw-1; Tue, 14 Oct 2025 08:58:07 -0400 X-MC-Unique: zwT0PllYPNySZ82w_TggHw-1 X-Mimecast-MFC-AGG-ID: zwT0PllYPNySZ82w_TggHw_1760446686 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3ece0fd841cso4237155f8f.0 for ; Tue, 14 Oct 2025 05:58:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760446686; x=1761051486; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=o+P2Dsj3XLhA6fMrQYgh8OLSwYB2MUOQP3SbJkXqJVA=; b=N0YOGAKlkxNsqsbC62uXNfN2iNIHbu8JrNX2aGgSb1SXlDh3Be+4yOj5ZrwfwNRyzp htXJxDN0keKVpT+Zwd+ab45BbeGyhfDwr8YwAzseRZS8ER9Ffb5f20TSwvBiBaxxoHr/ y51Y6M7dCVVBi5t48I6QZ0NE67W0OVlIEoeQdYNgY+otBVU8k+KV+vegqv36qox7o2tE teLEwMW01P6k3OsJkDe0YySjvvjrmcq7TThJCaQdjkGd9YaQ+aV3qQcB56Y+pGRxBpqm HE2QvDNeDglLkmNmc0FVpNn8MYMphK6/zAJC38XlHd8Xb/WiFRWBHu8a58cc2DpXuUJu OkBA== X-Gm-Message-State: AOJu0YyYYFDbYK7eV4ILL0F8u4T7Nv9uT3Yw1voO1RpjNqhpbL1vFoZn kcvh4JhrwRdCBkD2yvkT7M1dymWdhSJQG1XQBQzLEzmsaeM9Dl2c0zqD6RiSSNKnQhU85jpCRaX vUVPFTp+db0pCCfpyIPiipBxAkZXZoFow9GoQDrc9KjxUf6P1qD4Nlx/dwsWSQOQL4Q== X-Gm-Gg: ASbGncvl99uQYbu2bGwWQ2lgYMYGGmJ2cABFZmmdjhfOmyHHEWF2u8UMZLrlzo+SoIf Xl0JdfLCMfy9JmLk6BsO7FFiY6EaQjzqp5ykHYs6mOyhMrr2byd2p2ikgnD/vmENBrHuPMAUp3H ZZHSQfgGl8tUULY3e5CX+y8ACf0GlY2QPzM99JYE3AGreFDNM6yeZmy5617SyXyy4egaYtKDTzQ edA/r+EyjHJl8oftCM0aSTcedoQ8/aKd8qqJHYpkwWfKd/fMsspoBEB49UnHuILlpegNwpWc1KW AH+WFTSi7eVehXV6h5oKhGAT56d+FPo7psf5VJOdogWEiYXXI8MVKBmvE7ATvB4xNI6vffl0 X-Received: by 2002:a05:6000:1888:b0:401:c52f:62de with SMTP id ffacd0b85a97d-42666ac39fdmr14487420f8f.12.1760446686068; Tue, 14 Oct 2025 05:58:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHAh3YZ5oKpPdr7WASiDkPJn2IILu8/Rh+37A13TS4n2FwBRRVC0ByNWYf0Uu33Aqxt+5Ldeg== X-Received: by 2002:a05:6000:1888:b0:401:c52f:62de with SMTP id ffacd0b85a97d-42666ac39fdmr14487377f8f.12.1760446685024; Tue, 14 Oct 2025 05:58:05 -0700 (PDT) Received: from jlelli-thinkpadt14gen4.remote.csb ([176.206.13.103]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-426ce582abcsm23624651f8f.17.2025.10.14.05.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 05:58:04 -0700 (PDT) Date: Tue, 14 Oct 2025 14:58:01 +0200 From: Juri Lelli To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Arnaldo Carvalho de Melo , Josh Poimboeuf , Paolo Bonzini , Arnd Bergmann , Frederic Weisbecker , "Paul E. McKenney" , Jason Baron , Steven Rostedt , Ard Biesheuvel , Sami Tolvanen , "David S. Miller" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Uladzislau Rezki , Mathieu Desnoyers , Mel Gorman , Andrew Morton , Masahiro Yamada , Han Shen , Rik van Riel , Jann Horn , Dan Carpenter , Oleg Nesterov , Clark Williams , Yair Podemsky , Marcelo Tosatti , Daniel Wagner , Petr Tesarik Subject: Re: [PATCH v6 00/29] context_tracking,x86: Defer some IPIs until a user->kernel transition Message-ID: References: <20251010153839.151763-1-vschneid@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251010153839.151763-1-vschneid@redhat.com> Hello, On 10/10/25 17:38, Valentin Schneider wrote: ... > Performance > +++++++++++ > > Tested by measuring the duration of 10M `syscall(SYS_getpid)` calls on > NOHZ_FULL CPUs, with rteval (hackbench + kernel compilation) running on the > housekeeping CPUs: > > o Xeon E5-2699: base avg 770ns, patched avg 1340ns (74% increase) > o Xeon E7-8890: base avg 1040ns, patched avg 1320ns (27% increase) > o Xeon Gold 6248: base avg 270ns, patched avg 273ns (.1% increase) > > I don't get that last one, I did spend a ridiculous amount of time making sure > the flush was being executed, and AFAICT yes, it was. What I take out of this is > that it can be a pretty massive increase in the entry overhead (for NOHZ_FULL > CPUs), and that's something I want to hear thoughts on > > Noise > +++++ > > Xeon E5-2699 system with SMToff, NOHZ_FULL, isolated CPUs. > RHEL10 userspace. > > Workload is using rteval (kernel compilation + hackbench) on housekeeping CPUs > and a dummy stay-in-userspace loop on the isolated CPUs. The main invocation is: > > $ trace-cmd record -e "ipi_send_cpumask" -f "cpumask & CPUS{$ISOL_CPUS}" \ > -e "ipi_send_cpu" -f "cpu & CPUS{$ISOL_CPUS}" \ > rteval --onlyload --loads-cpulist=$HK_CPUS \ > --hackbench-runlowmem=True --duration=$DURATION > > This only records IPIs sent to isolated CPUs, so any event there is interference > (with a bit of fuzz at the start/end of the workload when spawning the > processes). All tests were done with a duration of 6 hours. > > v6.17 > o ~5400 IPIs received, so about ~200 interfering IPI per isolated CPU > o About one interfering IPI just shy of every 2 minutes > > v6.17 + patches > o Zilch! Nice. :) About performance, can we assume housekeeping CPUs are not affected by the change (they don't seem to use the trick anyway) or do we want/need to collect some numbers on them as well just in case (maybe more throughput oriented)? Thanks, Juri