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 31C13E7C4DA for ; Wed, 4 Oct 2023 16:12:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243254AbjJDQMP (ORCPT ); Wed, 4 Oct 2023 12:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243299AbjJDQMO (ORCPT ); Wed, 4 Oct 2023 12:12:14 -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 7795111C for ; Wed, 4 Oct 2023 09:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696435886; 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=ch4idYfFdc1ogNK0JbRzZRhPQtV0UOFYl5syEEVgddrPP+JylyjWwg9DeB7do3Ywmt0zN5 wtBBekjntciVftDORkjdpw2T+mHnLfe9ol3HBwVcwEseDOH0qHFzorz7d2LZFEokvWauhY E+A0WXpI0jr7Q225/8BM327c20GadFs= 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 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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