From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92C26466B7C for ; Wed, 6 May 2026 12:55:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778072134; cv=none; b=qWxh3nzJi0QrGyeHFRwJtHUGb3740sTmcItC90ZDdmR10Hta5j3G8Uy7F/vrEhWZ9s4XdGDXB2oBhVkhswkdJs1JJbOgX0A9EBcxsFAqH++bsoKXtjDyTP8kZ0IDX2ymbe+buSK4uoulkZtARWVAaHgmsUTHy3GFroE0czbxkBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778072134; c=relaxed/simple; bh=BJQMw0Dh46S8PcBKryF9N9BDyA2dfY6w0ySC4+x6YQc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=EtT0X/ffJcaHIdN2A0zlWEeqCONB3nPsRDiTZPQjAt6rSyD5quO2mj/LZsK/1hjbcBXNyI/FTxc6bS0P5kALWMgUNeBqeZIORuIeVXGY5LZNXLh7C4B5mJzf8j07pTnLtwdieWswxn3wE/6Ivzg9VCYRPAnrRBAKsMS0U70S9kQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=kNNJek/q; arc=none smtp.client-ip=209.85.215.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="kNNJek/q" Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-c7948640854so2856862a12.1 for ; Wed, 06 May 2026 05:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778072126; x=1778676926; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=EcBCFuoSCXIkQ6NjTEoF6df40RIio8PzOnuLVmySm0w=; b=kNNJek/qVwx7B6BdqZ8D2laqugoDxbkmL5kk1wFe1xhK2lfhB0Q4ufGVl0sruYUCic cQRogcTZQRmLEAt86yYmkasdo5X9tZu7FaMG5VqU4t38jN06+OerU2SQjAl51GxDitOI 8PRsobdws6Nn+WrLdUtLiiS/27bpi+szpNLDWQ0W4RYznZbCYgktq/I97Gt/DyLLgwpg JkCgqPE4C72wSXL3YczbT5XDLMBm1zr4da0vWH7MPfs8M26JA4F6rR1V4InauRmkJedt +Caf1O/6zYIb+2TW7Cj0325VcYsxnE+DdTv7WXB3bjQjYHbjWQeCVG084v/toxyxHSei ItBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778072126; x=1778676926; 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=EcBCFuoSCXIkQ6NjTEoF6df40RIio8PzOnuLVmySm0w=; b=Ky1hQyDq2qCMjBxptThiqEvpEYzazXzN83woTEEc60pbq51B483a2yiED/otM94URV hPkAXVixsALttBHmZ/XqjZtWaDi7omTK1Ui9GCVmTAnFID44aO0ks9+//fPtz5U7QMZR hV7/dbDpT2jMknH+YxQ6gxgmPcP5f6jDXcK0ypF3RKLfhUBS0t+yHuyovGtbcwWQ9aSR 4g5mvKglQTD2hKJ9hghRHNISKLi8hUkn98pYgNZxMOwjfdgmts8NxizBdYG2NyVn4mkv wibMSji8Ve/NPr5yOD3dbA//WIlEKHtE2g0P06zQGHXHe2PNVGbCzP3rr2HvT9YmYx6o 6SvA== X-Forwarded-Encrypted: i=1; AFNElJ+dcjmPG8ziJcalyyysUxD6kavxDo4bJRM8pL8+0QyT9FiAITlPwLPESrupbm0V8fMmeenk7qUSZxfENIk=@vger.kernel.org X-Gm-Message-State: AOJu0YzvAh54fo9tUGZZWU/YFc5yFIHp4d7sjIPKvWwKaC4YO/mYR3ad itkSmBTuROF2ma+ZS2eaaeQQcG5WNfEV5iGbSPxu/U2icT2xV0eol+s/ZMasUR/eIR7MJQFtaZc LIRUYAQ== X-Received: from pfbhs6.prod.google.com ([2002:a05:6a00:6906:b0:82e:7f41:df84]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:2990:b0:82f:390a:69df with SMTP id d2e1a72fcca58-83a5dc5df2emr3180240b3a.35.1778072125801; Wed, 06 May 2026 05:55:25 -0700 (PDT) Date: Wed, 6 May 2026 05:55:24 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260409142226.2581-1-lei.chen@smartx.com> Message-ID: Subject: Re: [PATCH v2] KVM: x86: Rate-limit global clock updates on vCPU load From: Sean Christopherson To: Thorsten Leemhuis Cc: Lei Chen , igor@gooddata.com, jan.cipa@gooddata.com, jaroslav.pulchart@gooddata.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, Linux kernel regressions list Content-Type: text/plain; charset="us-ascii" On Wed, May 06, 2026, Thorsten Leemhuis wrote: > On 4/9/26 21:21, Sean Christopherson wrote: > > On Thu, Apr 09, 2026, Lei Chen wrote: > >> commit 446fcce2a52b ("Revert "x86: kvm: rate-limit global clock updates"") > >> dropped the rate limiting for KVM_REQ_GLOBAL_CLOCK_UPDATE. > >> > >> As a result, kvm_arch_vcpu_load() can queue global clock update requests > >> every time a vCPU is scheduled when the master clock is disabled or when > >> the vCPU is loaded for the first time. > >> > >> Restore the throttling with a per-VM ratelimit state and gate > >> KVM_REQ_GLOBAL_CLOCK_UPDATE through __ratelimit(), so frequent vCPU > >> scheduling does not generate a steady stream of redundant clock update > >> requests. > >> > >> Fixes: 446fcce2a52b ("Revert "x86: kvm: rate-limit global clock updates"") > >> Signed-off-by: Lei Chen > >> Reported-by: Jaroslav Pulchart > >> Closes: https://lore.kernel.org/all/CAK8fFZ5gY8_Mw2A=iZVFNVKQNrXQzVsn-HTd+Me9K6ZfmdgA+Q@mail.gmail.com/ > > Was this performance regression ever addressed? Nope, not yet. > Looks like this fall through the cracks, but it's easy to miss something. It's in my list of patches to apply (probably for 7.2?). I didn't want to squeeze it into the initial 7.1 pull request for a variety of reasons.