[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PING PATCH v2] linux-user: Passthrough MADV_DONTNEED for certain fi
From: |
Richard Henderson |
Subject: |
Re: [PING PATCH v2] linux-user: Passthrough MADV_DONTNEED for certain file mappings |
Date: |
Mon, 5 Sep 2022 19:14:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 9/1/22 09:45, Ilya Leoshkevich wrote:
+/*
+ * For linux-user, indicates that the page is mapped with the same
semantics
+ * in both guest and host.
+ */
+#define PAGE_PASSTHROUGH 0x0800
I would expect a change to PAGE_STICKY in accel/tcg/translate-all.c, so that this bit is
preserved across mprotect. Yes?
@@ -845,7 +861,7 @@ static bool
can_passthrough_madv_dontneed(abi_ulong start, abi_ulong end)
}
for (addr = start; addr < end; addr += TARGET_PAGE_SIZE) {
- if (!(page_get_flags(addr) & PAGE_ANON)) {
+ if (!(page_get_flags(addr) & (PAGE_ANON |
PAGE_PASSTHROUGH))) {
Do you want both PAGE_ANON and PAGE_PASSTHROUGH?
If not, is PAGE_PASSTHOUGH is sufficient by itself, why check PAGE_ANON?
I would like to ping this patch and two others that I used for
debugging it:
[PATCH] linux-user: Fix stracing in-memory mmap arguments
https://patchew.org/QEMU/20220630165901.2459135-1-iii@linux.ibm.com/
Queued to linux-user-next.
[PATCH] linux-user: Implement stracing madvise()
https://patchew.org/QEMU/20220725134440.172892-1-iii@linux.ibm.com/
There are many more MADV_* than just the 5 you list.
r~