Skip to content

linux-user: Passthrough MADV_DONTNEED for certain file mappings

Ilya Leoshkevich qemu-devel 5 versions – Applied

Status from this message: Applied to my linux-user-for-7.2 branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 6 repliesApplied
  2. v2 posting 3/31 patch 1 replyApplied
  3. v2 posting 2/31 patch 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/31 patch0 repliesSuperseded
v11 patch3 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5linux-user: Provide MADV_* definitionslinux-user/aarch64/target_mman.h linux-user/alpha/target_mman.h linux-user/arm/target_mman.h +19 more+134 -01 reply
2/5linux-user: Fix madvise(MADV_DONTNEED) on alphalinux-user/mmap.c+2 -11 reply
3/5linux-user: Implement stracing madvise()linux-user/strace.c linux-user/strace.list+42 -11 reply
4/5linux-user: Passthrough MADV_DONTNEED for certain file mappingsaccel/tcg/translate-all.c include/exec/cpu-all.h linux-user/mmap.c+29 -61 reply
5/5tests/tcg/linux-test: Add linux-madvise testtests/tcg/multiarch/linux/linux-madvise.c+70 -01 reply

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRichard Henderson
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] linux-user: Passthrough MADV_DONTNEED for certain file mappings

Hi,

This series is made of patches from [1]. I've added a test and noticed that madvise(MADV_DONTNEED) was broken on alpha, fixing which required adding per-arch MADV_* definitions. This in turn affected the strace patch, so it made sense to make a series out of the results.

Patch 1 adds MADV_* constants for all architectures. Patch 2 fixes the alpha bug.
Patch 3 adds madvise() support to strace. Patch 4 adds MADV_DONTNEED support for file mappings. Patch 5 adds a test.

Best regards,
Ilya

[1] https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg00710.html

Ilya Leoshkevich (5):
linux-user: Provide MADV_* definitions
linux-user: Fix madvise(MADV_DONTNEED) on alpha
linux-user: Implement stracing madvise()
linux-user: Passthrough MADV_DONTNEED for certain file mappings tests/tcg/linux-test: Add linux-madvise test

 accel/tcg/translate-all.c                 |  2 +-
 include/exec/cpu-all.h                    |  6 ++
 linux-user/aarch64/target_mman.h          |  1 +
 linux-user/alpha/target_mman.h            |  8 ++
 linux-user/arm/target_mman.h              |  1 +
 linux-user/cris/target_mman.h             |  1 +
 linux-user/generic/target_mman.h          | 92 +++++++++++++++++++++++
 linux-user/hexagon/target_mman.h          |  1 +
 linux-user/hppa/target_mman.h             | 15 ++++
 linux-user/i386/target_mman.h             |  1 +
 linux-user/loongarch64/target_mman.h      |  1 +
 linux-user/m68k/target_mman.h             |  1 +
 linux-user/microblaze/target_mman.h       |  1 +
 linux-user/mips/target_mman.h             |  1 +
 linux-user/mips64/target_mman.h           |  1 +
 linux-user/mmap.c                         | 30 ++++++--
 linux-user/nios2/target_mman.h            |  1 +
 linux-user/openrisc/target_mman.h         |  1 +
 linux-user/ppc/target_mman.h              |  1 +
 linux-user/riscv/target_mman.h            |  1 +
 linux-user/s390x/target_mman.h            |  1 +
 linux-user/sh4/target_mman.h              |  1 +
 linux-user/sparc/target_mman.h            |  1 +
 linux-user/strace.c                       | 41 ++++++++++
 linux-user/strace.list                    |  2 +-
 linux-user/x86_64/target_mman.h           |  1 +
 linux-user/xtensa/target_mman.h           |  1 +
 tests/tcg/multiarch/linux/linux-madvise.c | 70 +++++++++++++++++
 28 files changed, 277 insertions(+), 8 deletions(-)
 create mode 100644 linux-user/aarch64/target_mman.h
 create mode 100644 linux-user/alpha/target_mman.h
 create mode 100644 linux-user/arm/target_mman.h
 create mode 100644 linux-user/cris/target_mman.h
 create mode 100644 linux-user/generic/target_mman.h
 create mode 100644 linux-user/hexagon/target_mman.h
 create mode 100644 linux-user/hppa/target_mman.h
 create mode 100644 linux-user/i386/target_mman.h
 create mode 100644 linux-user/loongarch64/target_mman.h
 create mode 100644 linux-user/m68k/target_mman.h
 create mode 100644 linux-user/microblaze/target_mman.h
 create mode 100644 linux-user/mips/target_mman.h
 create mode 100644 linux-user/mips64/target_mman.h
 create mode 100644 linux-user/nios2/target_mman.h
 create mode 100644 linux-user/openrisc/target_mman.h
 create mode 100644 linux-user/ppc/target_mman.h
 create mode 100644 linux-user/riscv/target_mman.h
 create mode 100644 linux-user/s390x/target_mman.h
 create mode 100644 linux-user/sh4/target_mman.h
 create mode 100644 linux-user/sparc/target_mman.h
 create mode 100644 linux-user/x86_64/target_mman.h
 create mode 100644 linux-user/xtensa/target_mman.h
 create mode 100644 tests/tcg/multiarch/linux/linux-madvise.c
Signature · 1 line
2.37.2