[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86: Add Kconfig option to use a 32bit TLB clock on debug
- To: Jan Beulich <jbeulich@xxxxxxxx>, Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Mon, 12 Jan 2026 14:47:52 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HYoH2pENNa1CA/KKc3Q5DHGXVD+RjMLMytystKpY/m8=; b=quwS/2iSq50QaoJhwUsaNL+xUCvhbtsUT6KayfXulJrMhqKdKIQtIi26djgFXcBQ4eoCTU4XtgQEPohk3HDzXbEWV292YioXUCpAYy6it6UChM4gr9eTIa9B+ZkA1PHo4tbB387NSQhLFQmtdkcsjlexRKdfFMETPJeBfP8Nrz0Umsvgm9pvcrlJ47OY5zhRQqP5IyjpS9vOrTkLGX3b0IqMYVgIPAHcySPccDSWle2wP6UeSzCMZMnPxMo+znHURnnkJQOo+X7LeEY0EuQ2QSdlAFWH9+tWFs/BTpSD9th7dyx7pLmhqqrL7duUE6RQl+MT7ghKARdDGN9Yev1cqw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BRx83vtypfDKFsufgxAvyKJ4lB3sS+Fe4P1DXIhor0lPO3UMbPXlxXA/6piwM2Hd2NhFjk5wfKkSyP01aTUlHkIAUMyNYnBUXUJwkhfElqnxksJto0b71IXyjeDRTy5mCevlkLXZuEs3fuelXwVHmwnOx6xagc/fUbmfqSv/OGQLfZTuertK+8WgsFEG6WFvXJVF1xy92KAC+6s6g8vMm5t2XT8u4cFOdZuK3EZWMK7uIPoPJ+HKirLvDq2viDALg8opYIk5ASsz1DB3ijy+mKdkk+Rirok3KmQCbReI/q8Zix5FUgQuSpVgLvnbVfYcMgzMU1zqBor4KufICNrByQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 12 Jan 2026 14:48:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 12/01/2026 2:43 pm, Jan Beulich wrote:
> On 12.01.2026 15:08, Alejandro Vallejo wrote:
>> Debug builds stress the wrapping logic of the TLB clock by narrowing it
>> down to 10 bits. This is inconvenient to test real time workloads on
>> such builds.
>>
>> Add Kconfig option to be able to selectively use the non-stressed
>> behaviour on debug.
>>
>> Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
> Hmm, yes, why not. However, ...
>
>> --- a/xen/arch/x86/flushtlb.c
>> +++ b/xen/arch/x86/flushtlb.c
>> @@ -20,11 +20,7 @@
>> #include <asm/spec_ctrl.h>
>>
>> /* Debug builds: Wrap frequently to stress-test the wrap logic. */
>> -#ifdef NDEBUG
>> -#define WRAP_MASK (0xFFFFFFFFU)
>> -#else
>> -#define WRAP_MASK (0x000003FFU)
>> -#endif
>> +#define WRAP_MASK (IS_ENABLED(CONFIG_DEBUG_TLB_CLK) ? 0x3FFU : UINT32_MAX)
> ... the comment then will want updating as well, I'd say. It doesn't go
> terribly stale this way, but at least slightly. I'd suggest to minimally
> drop "builds".
I'm suggest just dropping WRAP_MASK.
We've done this locally in the XenServer patchqueue since 2011 or so due
to the overhead, and I don't think it's interesting enough to warrant a
separate option.
~Andrew
|