From: Richard Henderson <richard.henderson@linaro.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Laurent Vivier <laurent@vivier.eu>
Cc: qemu-devel@nongnu.org, Christian Borntraeger <borntraeger@linux.ibm.com>
Subject: Re: [PING PATCH v2] linux-user: Passthrough MADV_DONTNEED for certain file mappings
Date: Mon, 5 Sep 2022 19:14:32 +0100 [thread overview]
Message-ID: <ccf44208-d67c-f14d-dac3-f7a910309877@linaro.org> (raw)
In-Reply-To: <af00707e90837bfbdf7febae1d3327307948dcd7.camel@linux.ibm.com>
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~
prev parent reply other threads:[~2022-09-05 18:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 12:50 [PATCH v2] linux-user: Passthrough MADV_DONTNEED for certain file mappings Ilya Leoshkevich
2022-08-11 10:28 ` [PING] " Ilya Leoshkevich
2022-09-01 8:45 ` [PING PATCH " Ilya Leoshkevich
2022-09-05 18:14 ` Richard Henderson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ccf44208-d67c-f14d-dac3-f7a910309877@linaro.org \
--to=richard.henderson@linaro.org \
--cc=borntraeger@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=laurent@vivier.eu \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).