Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1363060rwi; Fri, 14 Oct 2022 17:48:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4EyMLfCCvrVDn+u5W8BVnkXoxFR1PrehH72IGnqHaUgfSHwGevkiq0Jlh7kl98C1oMGBqN X-Received: by 2002:a17:907:16a7:b0:78d:f586:e446 with SMTP id hc39-20020a17090716a700b0078df586e446mr434883ejc.252.1665794892916; Fri, 14 Oct 2022 17:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665794892; cv=none; d=google.com; s=arc-20160816; b=flWheJzN5gETvPmSmCkkyRb5p3Tid/i7AGa1w9i6+0VWyMluSIl600Qnb1+83gupNB X3Q/mhWyR5aivqrcGMFzOrc1ul2QhsMGXuGTusNzogz84nFMT7lIFY0bKvQlcYCMCghj OOH5rvPLduYV//HeJbinTWNDtV/s2rpwneDeK+/KVZHcaWah1EQwmNX3ob2P6cw+gH1i 8LyqsLvbDyjfFugPHHKNZYDkkoh7PE9tiKbXeRj03mbtK+SsqiGyTHk+HybPudEC4k3r YDPPKNs2rFrgBjsbtPWppzR9O/ERxuhng0SSmTOoOjjDZIcvucDe6Po2QPG01CziXHqT VQPA== 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=o85rBsRwFZ9TSTg6JmGn7UPiClsb/zWZjdP234qWiWk=; b=J74cPqfyla0wTp+DK0snmX+Shyg7js0YH7XgjtOTLNsjNUYJ627xXv0nLVU5wD3K19 UpU2uOayxHfxWnypiF9Bn7GwZLozhsMvrKs2EQrRPA9Lot/30NHFfxkCZuaeh65vGbHd /HaWbeeAfeUak5n+3Taywcmd7m6h1fGrhOIdaKPIa7N0cw1wgRukcXK6lqU4A2QslRs/ 6kqUl+QWjSMdQdB7chqfcvqcPKyU9rzfXoJIBll1AVfiXqlDy4SQPElsi6uvJ2tIqA7H O1wXQaCefbWx1MRkEIcbOA59FBEVAj85vkfk7aXZP56/ayx775vk8FtpIsD/NK/Hmv5f 6TvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=HNaWHeuv; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a056402440f00b00459f6b0fa96si4196670eda.355.2022.10.14.17.47.40; Fri, 14 Oct 2022 17:48:12 -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=@igalia.com header.s=20170329 header.b=HNaWHeuv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229485AbiJOAT6 (ORCPT + 99 others); Fri, 14 Oct 2022 20:19:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbiJOATz (ORCPT ); Fri, 14 Oct 2022 20:19:55 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B898C1C110; Fri, 14 Oct 2022 17:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=o85rBsRwFZ9TSTg6JmGn7UPiClsb/zWZjdP234qWiWk=; b=HNaWHeuvzCAdZCu33ffYgm+Opc Q5o7ioakGrcxElu/MmAhin48C+SEVwS9YwaOUsU+CbopQ5Kdq7VDP64SRRgeFczlLJ20u/wlYWejh Kch8UdZ6qiuz4tpbWvhwwybEvo44qV19v+mxMi9JuDFcwaHRYiQ9OOMNcJ1IIFigJGYHY5547vy7D QgLp1Lg8HZC6kHHPJ8v8OA4NxScwTuZICy8/6EC/TA04UcptoOVP1Ho7AkPrOkwg3uhwiTmJM/kSY qEFqdAhlzst+6vbDiQLT7f+k3wh2LhY21Hz66VuK7aEe2M2/GAqAk7TGuTBpJr7ENI64gJWlEje5C 3dfJbBAg==; Received: from [179.113.159.85] (helo=[192.168.1.60]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1ojUtm-001iQo-Hq; Sat, 15 Oct 2022 02:19:31 +0200 Message-ID: Date: Fri, 14 Oct 2022 21:19:11 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH V2] x86/split_lock: Add sysctl to control the misery mode Content-Language: en-US To: "Luck, Tony" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" Cc: "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "hpa@zytor.com" , "Lutomirski, Andy" , "corbet@lwn.net" , "linux-doc@vger.kernel.org" , "kernel-dev@igalia.com" , "kernel@gpiccoli.net" , Andre Almeida , "Yu, Fenghua" , Joshua Ashton , Melissa Wen , Paul Gofman , Pavel Machek , Pierre-Loup Griffais , Zebediah Figura References: <20221014180506.211592-1-gpiccoli@igalia.com> From: "Guilherme G. Piccoli" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS 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 On 14/10/2022 15:26, Luck, Tony wrote: > Looks reasonable. > > Are these games multi-threaded with split locks happening on multiple CPUs in parallel? > If they are, then skipping both the 10ms delay and the serialization is needed. > > But if split locks are only from one CPU at a time, then possibly it would have > been enough to just have this mitigation skip the: > > + if (msleep_interruptible(10) > 0) > + return; > > Maybe best not to second guess. You have left the default as "mitigation on", > so I'm happy. > > -Tony Hi Tony, thanks for your review! Some games are indeed multi-threaded, so as you said, I think it's better if we skip the whole thing when the sysctl is off - a kind of fallback to the old "warn" mode before the misery was added heh Cheers, Guilherme