Package: libpmem1
Version: 1.10-1
Severity: grave
Justification: causes data loss

[a fix is coming, filing this bug so the Release Team knows why]

Hi!
Support for arm64 in PMDK is deeply experimental.  As far as I know, it has
never been tested on real hardware nor had been reviewed by someone with
adequate knowledge about ARM.  Yet, enabling arm64 in our packages has been
requested multiple times, and bullseye / buster-backports do include arm64
builds.  This was done with porting in mind, yet it looks like pmem-capable
ARM hardware is coming soon, and will be used in production not long after.

This makes inadequate support for new ARM chips unfortunate to say the least.

In ARMv8.0 and ARMv8.1, the only flushes available were CVAI (to make icache
= dcache, irrelevant for pmem), and CVAC ("flush to coherency").  The latter
was the deepest flush available, and implementors simply had no other option
than to have this instruction request the memory controller to send its data
to actual memory chips.

This changed in ARMv8.2, where a new instruction CVAP ("flush to
persistency") has been added, and CVAC was defined to require coherency only
between "agents" (such as CPU cores, GPU, etc) but not memory.

Yet PMDK knew only about CVAC -- despite asking around, no one of us could
get hold of an ARMv8.2 machine to implement detection/etc.  Such support is
obviously not a priority for Intel nor IBM.

Only recently, I managed to get access to such a box, and implemented
flushes via CVAP.  Without them, an unexpected power loss may result in
recent writes being lost.  This is even worse than with disks -- a typical
filesystem will flush every 5 seconds or so, while there's no time-based
mechanism to flush CPU caches.  If a machine finished its task and became
quiescent, it's possible the kernel and daemons won't actively touch more
than 16-64MB of L3 cache for hours or days.

The new flushes have been merged upstream in 1.11, I'm about to cherry-pick
to 1.10 for Bullseye.


Meow!
-- System Information:
Debian Release: 11.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.13.0-00032-g2fc675a48a0e (SMP w/64 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages libpmem1 depends on:
ii  libc6       2.31-12
ii  libdaxctl1  71.1-1
ii  libndctl6   71.1-1

libpmem1 recommends no packages.

libpmem1 suggests no packages.

-- no debconf information

Reply via email to