Bypassing the guest page cache with virtio-pmem

2023-12-19 Thread Marco Wurps
Hi all,

hope this is the right place to ask this.

>From my understanding of virtio-pmem it can be used to bypass the guest
page cache, so that the host is in control of the guest page cache. I have
successfully run QEMU with a virtio-pmem device managing my drive. However,
while testing (e.g. creating files) I still see the guest page cache
growing, the same as without virtio-pmem. I would have expected to not see
the guest page growing, as virtio-pmem is supposed to bypass it. I thought
that the access through the virtio-pmem driver in the guest would
circumvent the normal page cache mechanism.

Does anyone know if my understanding of what virtio-pmem should do is wrong
or is there maybe some guest kernel specific configuration  that I need to
do in order for this to work?

Best Regards,
Marco


Re: How to stop Qemu from resetting terminal?

2023-12-19 Thread Peter Maydell
On Mon, 18 Dec 2023 at 23:56, Dave Blanchard  wrote:
>
> > Hmm. Well, we do put the terminal into raw mode (so that we
> > get stuff like ^C), but that is supposed to be reset when
> > QEMU exits.
>
> Can you please direct me to where in the source code this happens?

It happens in different places depending on what your command
line is, which is why I asked about that. For instance the
ncurses frontend code is all in ui/curses.c. The parts in
chardev/ are for when you set up a chardev that uses
stdio (eg with "-serial stdio"). And there might be some generic
terminal cleanup code somewhere, I forget.

-- PMM