x86/xen: Drop lazy mode from trace entries

Drop the lazy mode (cpu or mmu) from the xen_mc_batch and xen_mc_issue
trace entries.

This is done in preparation of removing the xen_lazy_mode percpu
variable.

Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20260526150514.129330-2-jgross@suse.com>
This commit is contained in:
Juergen Gross
2026-05-26 17:05:10 +02:00
parent 8a06aedc09
commit 3b8d9415b8
2 changed files with 26 additions and 18 deletions

View File

@@ -98,7 +98,7 @@ static inline void xen_mc_batch(void)
/* need to disable interrupts until this entry is complete */
local_irq_save(flags);
trace_xen_mc_batch(xen_get_lazy_mode());
trace_xen_mc_batch(flags);
__this_cpu_write(xen_mc_irq_flags, flags);
}
@@ -114,13 +114,16 @@ void xen_mc_flush(void);
/* Issue a multicall if we're not in a lazy mode */
static inline void xen_mc_issue(unsigned mode)
{
trace_xen_mc_issue(mode);
bool flush = !(xen_get_lazy_mode() & mode);
unsigned long flags = this_cpu_read(xen_mc_irq_flags);
if ((xen_get_lazy_mode() & mode) == 0)
trace_xen_mc_issue(flush, flags);
if (flush)
xen_mc_flush();
/* restore flags saved in xen_mc_batch */
local_irq_restore(this_cpu_read(xen_mc_irq_flags));
local_irq_restore(flags);
}
/* Set up a callback to be called when the current batch is flushed */

View File

@@ -12,24 +12,29 @@
struct multicall_entry;
/* Multicalls */
DECLARE_EVENT_CLASS(xen_mc__batch,
TP_PROTO(enum xen_lazy_mode mode),
TP_ARGS(mode),
TRACE_EVENT(xen_mc_batch,
TP_PROTO(unsigned long flags),
TP_ARGS(flags),
TP_STRUCT__entry(
__field(enum xen_lazy_mode, mode)
__field(unsigned long, flags)
),
TP_fast_assign(__entry->mode = mode),
TP_printk("start batch LAZY_%s",
(__entry->mode == XEN_LAZY_MMU) ? "MMU" :
(__entry->mode == XEN_LAZY_CPU) ? "CPU" : "NONE")
TP_fast_assign(__entry->flags = flags),
TP_printk("start batch lazy flags %lx", __entry->flags)
);
#define DEFINE_XEN_MC_BATCH(name) \
DEFINE_EVENT(xen_mc__batch, name, \
TP_PROTO(enum xen_lazy_mode mode), \
TP_ARGS(mode))
DEFINE_XEN_MC_BATCH(xen_mc_batch);
DEFINE_XEN_MC_BATCH(xen_mc_issue);
TRACE_EVENT(xen_mc_issue,
TP_PROTO(bool flush, unsigned long flags),
TP_ARGS(flush, flags),
TP_STRUCT__entry(
__field(unsigned long, flags)
__field(bool, flush)
),
TP_fast_assign(__entry->flush = flush;
__entry->flags = flags;
),
TP_printk("flush: %s, flags %lx",
__entry->flush ? "yes" : "no", __entry->flags)
);
TRACE_DEFINE_SIZEOF(ulong);