From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65E9BE7B5F5 for ; Wed, 4 Oct 2023 11:50:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242218AbjJDLu2 (ORCPT ); Wed, 4 Oct 2023 07:50:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229687AbjJDLu1 (ORCPT ); Wed, 4 Oct 2023 07:50:27 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 021B390; Wed, 4 Oct 2023 04:50:23 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-533d31a8523so3790427a12.1; Wed, 04 Oct 2023 04:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696420221; x=1697025021; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=sxFN1579U8L5KSgdpnL27QtyaBIzDdnGagI0+P77qY8=; b=k2wi6IpRh/En1tJ4zkWUJIec8VT3cu5hyzL7mrfS/CCEZDUTLfXSEjob1zJQ+5FiMb PTIPl7GsBjCIrki+eJPOMYKvWqFVwdkMouWDpfhxdG4TVdWR+6ReVkQVgEpfI5KOO+7I T+s0qWjHO/joQBSTz/orvVz6/3+vW/K60CgM/LWNcMGmEWl9ilLmSKBdr07d48PkcOqI RRRFj5yRbeyME0cy05RYyw3/o7sZZ0LHfWQKTL99GFqaoFdv9kEj/MNTrEcGUq04vFAd NMjVof3jhbSKhRa6BUNz0656PM93lg7NgyYHmUvDKKWlHIA/pnYyviVowegzoYHUrzwy kNIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696420221; x=1697025021; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sxFN1579U8L5KSgdpnL27QtyaBIzDdnGagI0+P77qY8=; b=UN6ozGoZMNc8h73z14RNiVQ8moR4xbJNJC2+DulAflx05PtbiaclA2DOf9o3U5zgj3 yw30sicaIPjhbT9tmEuehdjHzhoirtgtXYqDJ8NKQf/BqenLbnpjNNmnpsU04oB7UWwM 5NDBVuFQUbY4HJo0Jh1mFY+JmOYMqMYr3Fqh/4TKIKGYLSvOIRERS+H5nfmAS3+ZAhJT pwbm+aS4Mz1USsLYUAN6T/LrR/EtJo4nfY62ByVVROJ6CGzQ/W+9lZKfTxiYDg7EHJEk cSAuT59pE7i78kIOw/VYI7h/nsH2RYrwSVZHbq9SUaW9AkLadsJiH7/99R9LTY/Q0Bx0 17Ng== X-Gm-Message-State: AOJu0YzMQzWvQmHcu1sJhXo4CJHfaWq/2QRNityZBT/MAGIIVFs+cgKe ivE8jadEDWCH80/cYOTE9x0yYsKchik= X-Google-Smtp-Source: AGHT+IH5apXuLQK1NmVSu/nMv7jihtF+iBMpQpy9TiewttB72QC1moRm3RYe5K2C7tpvO3najOrPFw== X-Received: by 2002:aa7:c508:0:b0:534:78a6:36c4 with SMTP id o8-20020aa7c508000000b0053478a636c4mr1867077edq.36.1696420221177; Wed, 04 Oct 2023 04:50:21 -0700 (PDT) Received: from gmail.com (1F2EF530.nat.pool.telekom.hu. [31.46.245.48]) by smtp.gmail.com with ESMTPSA id g24-20020a056402115800b0053629f43083sm2321095edw.57.2023.10.04.04.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 04:50:19 -0700 (PDT) Sender: Ingo Molnar Date: Wed, 4 Oct 2023 13:50:16 +0200 From: Ingo Molnar To: Waiman Long Cc: Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Josh Poimboeuf , Pawan Gupta , Jacob Pan , Len Brown , Jonathan Corbet , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, linux-pm@vger.kernel.org, Robin Jarry , Joe Mario , Randy Dunlap , Linus Torvalds Subject: Re: [PATCH v6 0/4] x86/speculation: Disable IBRS when idle Message-ID: References: <20230727184600.26768-1-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230727184600.26768-1-longman@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org * Waiman Long wrote: > For Intel processors that need to turn on IBRS to protect against > Spectre v2 and Retbleed, the IBRS bit in the SPEC_CTRL MSR affects > the performance of the whole core even if only one thread is turning > it on when running in the kernel. For user space heavy applications, > the performance impact of occasionally turning IBRS on during syscalls > shouldn't be significant. Unfortunately, that is not the case when the > sibling thread is idling in the kernel. In that case, the performance > impact can be significant. > > When DPDK is running on an isolated CPU thread processing network packets > in user space while its sibling thread is idle. The performance of the > busy DPDK thread with IBRS on and off in the sibling idle thread are: > > IBRS on IBRS off > ------- -------- > packets/second: 7.8M 10.4M > avg tsc cycles/packet: 282.26 209.86 > > This is a 25% performance degradation. The test system is a Intel Xeon > 4114 CPU @ 2.20GHz. Ok, that's a solid improvement, and the feature has no obvious downsides, so I've applied your series to tip:sched/core with a few edits here and there. Thanks! Ingo