Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp934355rwl; Wed, 29 Mar 2023 10:15:44 -0700 (PDT) X-Google-Smtp-Source: AKy350aFzXnPPGJH+BinVGLobdbznn80v8QBEaeCUIrBpZSF3wzEgkBKME9beFLQogIig28gIxfs X-Received: by 2002:a17:90a:ba08:b0:23d:5196:eca8 with SMTP id s8-20020a17090aba0800b0023d5196eca8mr21000034pjr.20.1680110144586; Wed, 29 Mar 2023 10:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680110144; cv=none; d=google.com; s=arc-20160816; b=jH74gU36fcJGHLWt86Cro0FXrwikmwIye78UKs//RUDcRVyjFRzwq973OvmPLIH2pk UDovkA6yfnR8DUoudxuE+L/uLMryVPQ8x4Psm58+Sufojo8yamt9gogI0l+ZMvZVsN6P FzUHFGyOdgfQzie7NDPko/3f7EwTnheTcd1KmT2gbdoo2Ed4GCstVxpm1d9YIIXnx0GR UdMW+6HEKh83zp77E1zN/2hsq+7Q2uVipDDLxMRsm/wBMnW2T++1fQcqupm2BcSDoB42 jSfUSSAoduZE7tBq49jhNC4nPfq7zcEtGc2rzko7p5jpNTj5ZMOyuWJko8ne0pdbc2iF 4pEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=QhPDqPWOP3GxbtGY8Yn03rtJ4XzWBIS5/u+ePVRvGmo=; b=KmohDTM2V9MwQ1eC9Rd93ELaROMhiGFszSLfEJ5dSi8Z3miMMrPcbFnk28rxESWZsA pNZQBBmPJU0TQndgt5Pkxbkbqc97/jia1aiA/tFzid6i7cSb6p491TTXH/0Za3GFXz4s vFJkalzbLsAgIHx/bctieWzTsP8n7zpA2VXb3nsS9cmJYmK0pHkNt7sUcXn8AHcAhQPv dK04TZi1MCHGlOhW3XIIXW9bZnqJ1kq8b04EenSqxxmPJbyBbF2IDe1Wg0Zwemp6hq23 FMVRAHSgsidVRUlJCMR+EtOgw949CGddOTIaB/4oqbTCs559Nm2lx+VgwH7h9lGUqh2u UbHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=rBpTeL1q; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl15-20020a17090b384f00b0023cff9a12a3si1841755pjb.50.2023.03.29.10.15.32; Wed, 29 Mar 2023 10:15:44 -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=pass header.i=@google.com header.s=20210112 header.b=rBpTeL1q; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231230AbjC2ROc (ORCPT + 99 others); Wed, 29 Mar 2023 13:14:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbjC2ROa (ORCPT ); Wed, 29 Mar 2023 13:14:30 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67008526D for ; Wed, 29 Mar 2023 10:14:27 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id g5-20020a25a485000000b009419f64f6afso16014953ybi.2 for ; Wed, 29 Mar 2023 10:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680110066; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=QhPDqPWOP3GxbtGY8Yn03rtJ4XzWBIS5/u+ePVRvGmo=; b=rBpTeL1qTaNDVySpVYU0dlnLxBvmErVUiSRJDONze1J4bUZgZ3Ms/wv5f7RCoCHAW2 m7am1E2TZ7q0msHh73AHN8t2eM0V8zrs2c9gVYDO0zqWTxsSz3XX0r3w1nOMAg8BFmIU N0c1wxWNbSzpo5EOEPMZJ6DEbY+Has6A+yEjS3QJfC2EvFB1FQplq7r5dRsn6P5CVY5Q 0GEwF6+W6jMvCKlK2SBylFyzc/oiGdsiXiQKKJPH6xxelcpoaMGLUSQ6g8HGBGzPk5bT XSxNxBcUb0oiSbZ8T6ENd0AVG4Eq2RrswHJopvXqhPSQ03FWtvlQrtdCAUp4L4RmffLm vC3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680110066; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QhPDqPWOP3GxbtGY8Yn03rtJ4XzWBIS5/u+ePVRvGmo=; b=SLzNMjobDSLtn+kJhrOqpfHJgAMDa58izE1JVtyW2jifHzKECISR42c22c5neCnbNp cuwtBQ7XLkiSPOIJiYBBVpHCfXqMOa5/iSJXbklB7NksTnTvmlkFnbToYzaMX4WMRgLU uC0BihE+OMjiiamRQzn87nQDdq3MRM6knQZphOJntFYxVnqiq+5BzsrEIOoFMqkqZhbW cAg/16Ovh/tJ/5C4RLndNLQhN3zmAj1RyyKdA3CrQUBMF01Irj8fOcZtfth1AaxR22PA IHEKoh5J8rZegiwzcNdweqTAijO9CyxLwypixPNqP9CW8ajx2bvnfDrisbJMLH+qHM26 BelQ== X-Gm-Message-State: AAQBX9die20eE4pepnBNV0huYWgIyEn798JUVq7ZcowtAWRdkXRO2iN3 Mn4i4K3Y4FJHSysSnOXY5HP/zQ/+FSc= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a81:ac64:0:b0:545:6106:5334 with SMTP id z36-20020a81ac64000000b0054561065334mr9859621ywj.8.1680110066439; Wed, 29 Mar 2023 10:14:26 -0700 (PDT) Date: Wed, 29 Mar 2023 10:14:25 -0700 In-Reply-To: <3ff9f56c-479b-2dbd-9ee6-c7d00c7bd285@igalia.com> Mime-Version: 1.0 References: <20221218234400.795055-1-gpiccoli@igalia.com> <3ff9f56c-479b-2dbd-9ee6-c7d00c7bd285@igalia.com> Message-ID: Subject: Re: [PATCH 6.0.y / 6.1.y] x86/split_lock: Add sysctl to control the misery mode From: Sean Christopherson To: "Guilherme G. Piccoli" Cc: Peter Zijlstra , Greg KH , stable@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net, kernel-dev@igalia.com, kernel@gpiccoli.net, fenghua.yu@intel.com, joshua@froggi.es, pgofman@codeweavers.com, pavel@denx.de, pgriffais@valvesoftware.com, zfigura@codeweavers.com, cristian.ciocaltea@collabora.com, Thomas Gleixner , Dave Hansen , Tony Luck , Andre Almeida , Stas Sergeev Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-7.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 +Stas On Mon, Dec 19, 2022, Guilherme G. Piccoli wrote: > On 19/12/2022 07:59, Peter Zijlstra wrote: > > On Mon, Dec 19, 2022 at 11:17:39AM +0100, Greg KH wrote: > > > >> What specific programs have this problem and what are the exact results > >> of it? > > > > IIRC it was God of War (2018) that triggered this initially. But it's > > possible more games were found to tickle this specific thing. Since it's > > binary only gunk that is unlikely to ever get fixed we need something to > > allow for it. > > > > (slow motion Kratos yelling B...o...y...) > > > >> Also, this is really a new feature and not really a "fix", but one could > >> argue a lot that this is a "resolve a performance problem" if you want > >> to and have the numbers to back it up {hint} > > > > Right, there were some, they should indeed have been included. > > Thanks Peter, that's exactly it - the current report is linked on commit > message. > > About performance numbers, the only "numbers" I have is: game is > unplayable, according to the report "When I launch God of War through > Steam or Lutris I get around 25 fps, on lowest settings and at 10% > resolution scaling", FPS for for games is double of that usually. > > I understand this is not a regular fix in which something is completely > broken, but it does fix a behavior introduced on kernel that prevent > some userspace binaries to properly run, in practice. Ofc some will > argue that we already have the kernel parameter, but it's different - > requires reboot and bootloader understanding. > > If 6.0.y is too much, I'd ask we have it at least for 6.1, which is > long-term, that will help a lot of people for sure. > Thanks, Resurrecting this thread with a concrete use case. dosemu2, which uses KVM to accelerate DOS emulation (stating the obvious), ran into a problem where the hardcoded (prior to this patch) behavior will effectively hang userspace if the 10ms sleep is interrupted, e.g. by a periodic SIGALRM[*]. Alternatively, we could try to figure out a way to ensure forward progress without letting userpace run an end-around on the enforced misery, but backporting this patch to stable kernels seems easier. Stas, do you happen to know what the oldest stable kernel your users use, i.e. how far back this backport would need to go? [*] https://github.com/dosemu2/dosemu2/issues/1968#issuecomment-1486709361