Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2712742rdb; Wed, 4 Oct 2023 09:12:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFgoIbgFs2XbWiXzY9OgeJ8EokN66s96X/0annFtGfSkL693aC9mgKoQmHg5mXRnsePbrXR X-Received: by 2002:a05:6a20:3cab:b0:15a:bf8:7dfc with SMTP id b43-20020a056a203cab00b0015a0bf87dfcmr3020559pzj.15.1696435941362; Wed, 04 Oct 2023 09:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696435941; cv=none; d=google.com; s=arc-20160816; b=nLvN87y/8/NY4rHBPIsK2tW9gro9IpnPLsNNcs+NdAupnLgCelNYpQCsSeVu330SA2 u2IotH5xvfR2JUn11clEagpSsVuuVD1nH04bImLr7Ynca1rg6QBiTc8woQn8F+TrqyxE Tq/1FS33skqWuFZwdbSHQ73+0OkrreoPNoH1weQLkfkxhw+kBwT2cHQ2e2GquTxBglKx gNCYPyXi+io+4cxhAWGvw5anMPb1uWyUQim42iKlxQB6rkBAhYcFikun5eahQ5jf6U1C OmmxwvWvRp/kpycmf9AUCl3OSr+Vlqzt7SkXMhO+4bEOFdixiTYfDOl/K1H6lneWJ72h o0og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=XiFNZxESte6xiokxDPwUzmpBYy6wkjDyf6f7P3Qz3QU=; fh=1vvgmxsGI2qdwasAXKm6DxDUpXLS2TYB2xX237C6ghc=; b=sigxWGlDkobpZPz/Reb6/ZYdB+K9fIz6Z9zR2CxzzDPH/PlSrrb+qMhmwh4/rtlFs1 A6pkrwVbCH37M3A9lHKNgmdXZu87Un0KX9/u7pyEaJEok5Los6dGPig02wHnpe1M1Or5 04Onlp/xuAoHqIzKHFYXy1gxDu7duRbLDDx8g0mlf4QoRrKsgDo0wDBtzB1a0wBOmsLx /ch+OXImGSKwrh/QpIVY7lyaOZRTTUMVkmOrXqGPPsK393+MpWnocfW/yAMDbIrQ2zra UuaxkTRs49OYYwIEgUnZULdOPuJNnarVHfr0nOM+OSFwrqIJ3gmBGL+8XoarUkSJkmTa PCeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=REcRXKWb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id o15-20020a637e4f000000b0057c7d7036b8si4097375pgn.389.2023.10.04.09.12.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 09:12:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=REcRXKWb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 751FA83711B9; Wed, 4 Oct 2023 09:12:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243261AbjJDQMS (ORCPT + 99 others); Wed, 4 Oct 2023 12:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243260AbjJDQMR (ORCPT ); Wed, 4 Oct 2023 12:12:17 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB94810EC for ; Wed, 4 Oct 2023 09:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696435875; 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=XiFNZxESte6xiokxDPwUzmpBYy6wkjDyf6f7P3Qz3QU=; b=REcRXKWbeIB/GFRiRv0t9wa6hic8yk1wrqAvF/CN5B2wD34bIrYMQrVAfRH1Jv6DSQh0X1 Ms3loTQF5tqqWeBbMs8gUFzSm9kk7BBs9Mc3PgHZYlzMVW2b/RO6oZHgMOpj9E8ASzrbX7 OUda86CH+JWpgtaIZvbT0i6rP79G9Oo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-117-Zq4VPg1SNhu54lA5yoBgFg-1; Wed, 04 Oct 2023 12:11:07 -0400 X-MC-Unique: Zq4VPg1SNhu54lA5yoBgFg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D8E1B3804068; Wed, 4 Oct 2023 16:11:05 +0000 (UTC) Received: from [10.22.32.136] (unknown [10.22.32.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id A52D51004042; Wed, 4 Oct 2023 16:11:04 +0000 (UTC) Message-ID: <946e6723-9635-1db1-d636-0a7904c40d40@redhat.com> Date: Wed, 4 Oct 2023 12:11:04 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v6 0/4] x86/speculation: Disable IBRS when idle Content-Language: en-US To: Ingo Molnar 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 References: <20230727184600.26768-1-longman@redhat.com> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 09:12:20 -0700 (PDT) On 10/4/23 07:50, Ingo Molnar wrote: > * 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! -Longman