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 97961C4332F for ; Sat, 15 Oct 2022 00:19:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229661AbiJOAT5 (ORCPT ); Fri, 14 Oct 2022 20:19:57 -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 Precedence: bulk List-ID: X-Mailing-List: linux-doc@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