mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-21 22:47:51 -04:00
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:
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user