Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2545912rdb; Wed, 4 Oct 2023 04:50:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGH5/Vlk/5Y1REZaG+JeS3StzCznuE1y1D6LY1vhixxCIwhS5q4Wi/elT54VyuME+4oWjak X-Received: by 2002:a05:6358:988d:b0:143:7949:fb2a with SMTP id q13-20020a056358988d00b001437949fb2amr2115261rwa.7.1696420256779; Wed, 04 Oct 2023 04:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696420256; cv=none; d=google.com; s=arc-20160816; b=qdt+Wd+bWv/qEFVt/n59uockseRCL4C7TG+dgwfhH0TiclpBQrecVKTaB1zxGfuMtx G47SiAGztoI07MMKh27md1oCTR+b41yqYDNiO2TO+ZGMT60NTexv7BUFsNfnE8Uk5vZx NsONK5T9/C/0qU53fMAJfuBkMH2oQxna3FkJ1tfce/FRkIUShjZzZuwQvOjniZ5gLRI5 EbsMeAY02uk2AZKBBX5eEFiJR2DLo9o5anu+kITP5FOFLmJAgaX8L3ffpSqIccU3wR2X GIOKx+g1kTzSa1mgFZp5Mo0G+6ksNxJ/WfQb5mCMkzCxzHOx2SrjKS6NxTRwJkR8sXDZ loNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=sxFN1579U8L5KSgdpnL27QtyaBIzDdnGagI0+P77qY8=; fh=SW0JQ0pttGcnIMOxKCVJfHjxbQcTaeU+M94nsippNQA=; b=cUhJq6Y18wKqOBmo6lCbx5CI0rFjSTzsgRQ6jNqiG4DnibKYmyJgtIQOmx/Lnp8smn 3e8KHZ7SW4CbvOqAeRKMN2XJVZeuSGdg8s+1mAZuENsX/pQmqqtCsMgyXHlQ8J9R8QUV ifZRTnlelrmdhLYSBVOosaeT8x9H8ooB02L98y/2Da6TBap+Eo1h+6+0sehigku+fWlD dIZXrES6PNgVE8iHAGSpurT2gjQU3OIlsTmmlxw9//LGWlIxrvQCgQiC0vYntsRUT+gV d5By/gT3gpjI355Gf/hLxx2Bp7haQhww7JF1u4Xo3tYzmQsYbNNHMsP424G6XfFE8D0q llHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=k2wi6IpR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o15-20020a656a4f000000b005440b9f013csi4229114pgu.899.2023.10.04.04.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 04:50:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=k2wi6IpR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6562B80BEB0C; Wed, 4 Oct 2023 04:50:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242280AbjJDLu2 (ORCPT + 99 others); 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-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> X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 04 Oct 2023 04:50:40 -0700 (PDT) * 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