All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86: Add Kconfig option to use a 32bit TLB clock on debug
Date: Mon, 12 Jan 2026 16:28:11 +0100	[thread overview]
Message-ID: <DFMPTKU4F4TY.2LF5TKLV8C3RT@amd.com> (raw)
In-Reply-To: <05372ffc-c1b6-4d65-a13b-cd28de6248b5@citrix.com>

On Mon Jan 12, 2026 at 3:47 PM CET, Andrew Cooper wrote:
> 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@amd.com>
>> 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 left the comment because the rationale still holds. Dropping "builds" sounds
good to me.

>
> 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

I don't mind much either way. I need it gone for my needs and I don't care much
how it happens.

Jan + Roger, do you have strong opinions on the matter?

Cheers,
Alejandro


  reply	other threads:[~2026-01-12 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 14:08 [PATCH] x86: Add Kconfig option to use a 32bit TLB clock on debug Alejandro Vallejo
2026-01-12 14:43 ` Jan Beulich
2026-01-12 14:47   ` Andrew Cooper
2026-01-12 15:28     ` Alejandro Vallejo [this message]
2026-01-12 15:41       ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DFMPTKU4F4TY.2LF5TKLV8C3RT@amd.com \
    --to=alejandro.garciavallejo@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.