mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* CPU data cache across reboot/kexec for pmem/dax devices
@ 2024-02-09 19:05 Mathieu Desnoyers
  2024-02-09 20:15 ` Dan Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Desnoyers @ 2024-02-09 19:05 UTC (permalink / raw)
  To: Dan Williams
  Cc: linux-kernel, Dave Hansen, linux-cxl, nvdimm, Vishal Verma,
	Dave Jiang, rostedt, Masami Hiramatsu (Google)

Hi Dan,

In the context of extracting user-space trace data when the kernel crashes,
the LTTng user-space tracer recommends using nvdimm/pmem to reserve an area
of physical (volatile) RAM at boot (memmap=nn[KMG]!ss[KMG]), and use the
resulting device to create/mount a dax-enabled fs (e.g. ext4).

We then use this filesystem to mmap() the shared memory files for the tracer.

I want to make sure that the very last events from the userspace tracer written
to the memory mapped buffers (mmap()) by userspace are present after a
warm-reboot (or kexec/kdump).

Note that the LTTng user-space tracer (LTTng-UST) does *not* issue any clflush
(or equivalent pmem_persist() from libpmem) for performance reasons: ring buffer
data is usually overwritten many times before the system actually crashes, and
the only thing we really need to make sure is that the cache lines are not
invalidated without write back.

So I understand that the main use-case for pmem is nvdimm, and that in order to
guarantee persistence of the data on power off an explicit pmem_persist() is
needed after each "transaction", but for the needs of tracing, is there some
kind of architectural guarantee that the data present in the cpu data cache
is not invalidated prior to write back in each of those scenarios ?

- reboot with bios explicitly not clearing memory,
- kexec/kdump.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-13 20:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 19:05 CPU data cache across reboot/kexec for pmem/dax devices Mathieu Desnoyers
2024-02-09 20:15 ` Dan Williams
2024-02-13 20:56   ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®