Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3177079rwd; Fri, 16 Jun 2023 13:27:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7bVy5UCJUJ8eQlo4fZ+f01+ZAMONHLjmkvYgi5f7jXoIl8Bm4929OdTP9Q1JEJq2d/+Y6k X-Received: by 2002:a17:902:d38d:b0:1b0:6c10:6836 with SMTP id e13-20020a170902d38d00b001b06c106836mr2584618pld.33.1686947261956; Fri, 16 Jun 2023 13:27:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686947261; cv=none; d=google.com; s=arc-20160816; b=MUyVPC3+WigF4glutqz/++ggdsadh2BYgJtMXRCWhs09+N6zja/xIMsbIbw60eVe55 MUU1eqIX+N9jUuu09k2T9Fv9cwcr7V+9iEqtsVXOUyvxgShSubWzNz1Ym57rM1a0IsAl QtoawouCiyNlp7ropDLBdOhhA43Ih+luEnIJUyC0rsLO40ESZUh77VppLYzW75ut1y2Q 2LHEju4MTvxNVg9clX9wN0bhltovlbmStj0M7ChYGODUPeSxCdlpOe245CEEwNX7rIo8 mXnEEypc1Gld+HBneYass8pjJLVeBdsZn3u7KmfnFMB3yNklhoht4WZUYL0+rVAiK8Ck NgNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:cc:subject :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=3JQ9L36hZLZ9TAVM+ypgWl1na6I4Rf+gpRWjrdtaUpE=; b=UQmxiEa6jzpHHnfi6LU4ZHSkR1gAAFhoCNB22gSG3MBlFh8y6sQvZiXXPEW321tl3U sCWaPUpD6vXM0Ffvn3TNKhGSUZy7JCvsvot+Z+wTHEqzkjm/H6Gsfana17oW3o8Cf48I 2+09mUv8I6YQj93z1e8QSeHHp3W5CT7HZNgUVP2uqoIWekABwDEUJ6g6gEdlWhcbxVkc e8OVOE6zt0KzDisjYYLsWEA9rCcYYanzHbB+cZW3byW/WJXBP8Fg3L7WAYS/8ehJDX8r PsowmvmIyAfYjbXQv8V/g0ElU3V/xYJyW0WT4jYA1zn+0zOcPC6pLFlEQzBcOR35L57Z tAMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=GpAdSfVn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020a170902ce8200b0019d038765f6si15949011plg.449.2023.06.16.13.27.26; Fri, 16 Jun 2023 13:27:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=GpAdSfVn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343499AbjFPUPo (ORCPT + 99 others); Fri, 16 Jun 2023 16:15:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235609AbjFPUPm (ORCPT ); Fri, 16 Jun 2023 16:15:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E262035B8 for ; Fri, 16 Jun 2023 13:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686946496; 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=3JQ9L36hZLZ9TAVM+ypgWl1na6I4Rf+gpRWjrdtaUpE=; b=GpAdSfVnVcgNeKzvna2nUA+tTW+KAiwJDYRwXupF4nbEWB4/tPnZcYT67enUKT46k/oSGk vGwJXsKA9uXtdY1k4gcSX6y/tQsNDVKsm1xtZxZ4DbtEcgcjbAAn14XiJtA8KeaTIfLSSU WQlvLTPUg36OECKLVQhqb+eWtXeApwA= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-284-SBjuhV_AOXif94NypaoOtw-1; Fri, 16 Jun 2023 16:14:54 -0400 X-MC-Unique: SBjuhV_AOXif94NypaoOtw-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3f8f8e29771so3653495e9.1 for ; Fri, 16 Jun 2023 13:14:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686946493; x=1689538493; h=in-reply-to:references:to:from:cc:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=3JQ9L36hZLZ9TAVM+ypgWl1na6I4Rf+gpRWjrdtaUpE=; b=a9dVjgPlA0jqOyO9EWWQNj9ZakTLB+5vJ6HUXoD896aYOjlgruj0EcXaPbzXUXJfYC 6WOjdO820rRx+oiz5Bzx5O6pM1tzMFBQzKbUYOOfKWXG72Jol7lodQqdlM9v2zRtMwxr XcF6pQ2zPrn/FgAOTaXStyOzyhgtpmJemiQAkRs/Ndy0/CU91ywDpOHEsHEUl4iaI4o4 WeKMsxQnSVoQSCg8SnPGQmpp9GocxGVCC9fifEcZ/mvfhqy2UTcbbmFHsvM6c3YHmZre jDPGOgXomFTOXOeFEx9xVKSSngM4Ciplg8vIOrCrwTNLdMfQTr4yGdcDb3UkXNfhx/cI ujHA== X-Gm-Message-State: AC+VfDyep3ha/KUpMZQiJWiuK2q8el6Bb1Qrs5ypDp1lu0FxPw/ROSQC C1l/lqdo7pwSg+e8iKJLY9hv3POCH6zcAl8NTsblXrX8yriSh97phYFu0ihBdlvgLgwebVwWmAG 6PuInN1D3xDPXZxRmoP5rEORN X-Received: by 2002:a05:600c:84c3:b0:3f5:a54:9f97 with SMTP id er3-20020a05600c84c300b003f50a549f97mr7826908wmb.0.1686946493366; Fri, 16 Jun 2023 13:14:53 -0700 (PDT) X-Received: by 2002:a05:600c:84c3:b0:3f5:a54:9f97 with SMTP id er3-20020a05600c84c300b003f50a549f97mr7826895wmb.0.1686946493101; Fri, 16 Jun 2023 13:14:53 -0700 (PDT) Received: from localhost (2a01cb000f8b970084d0c0d672c3677c.ipv6.abo.wanadoo.fr. [2a01:cb00:f8b:9700:84d0:c0d6:72c3:677c]) by smtp.gmail.com with ESMTPSA id q9-20020a7bce89000000b003f7cb42fa20sm2969732wmj.42.2023.06.16.13.14.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Jun 2023 13:14:52 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 16 Jun 2023 22:14:52 +0200 Message-Id: Subject: Re: [PATCH 0/5] x86/speculation: Disable IBRS when idle Cc: , , "Joe Mario" From: "Robin Jarry" To: "Waiman Long" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , "H . Peter Anvin , Peter Zijlstra , Josh Poimboeuf , Pawan Gupta , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider" X-Mailer: aerc/0.15.2-49-gd17c48e2f3c0-dirty References: <20230616200003.745742-1-longman@redhat.com> In-Reply-To: <20230616200003.745742-1-longman@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Waiman Long, Jun 16, 2023 at 21:59: > 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. > > This patch series turns off IBRS when in various idle mode to eliminate > the performance impact of the idling thread on its busy sibling thread. Hi Longman, thanks a lot for the quick turnaround on this issue. Tested-by: Robin Jarry