From: Andrea Righi <andrea.righi@canonical.com>
To: Claudio Fontana <cfontana@suse.de>
Cc: libvir-list@redhat.com, Jiri Denemark <jdenemar@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [libvirt RFC] virFile: new VIR_FILE_WRAPPER_BIG_PIPE to improve performance
Date: Mon, 21 Mar 2022 08:55:55 +0100 [thread overview]
Message-ID: <Yjgtw9AWsFy/Ssvr@arighi-desktop> (raw)
In-Reply-To: <737974fa-905c-d171-05b0-ec4df42bc762@suse.de>
On Fri, Mar 18, 2022 at 02:34:29PM +0100, Claudio Fontana wrote:
...
> I have lots of questions here, and I tried to involve Jiri and Andrea Righi here, who a long time ago proposed a POSIX_FADV_NOREUSE implementation.
>
> 1) What is the reason iohelper was introduced?
>
> 2) Was Jiri's comment about the missing linux implementation of POSIX_FADV_NOREUSE?
>
> 3) if using O_DIRECT is the only reason for iohelper to exist (...?), would replacing it with posix_fadvise remove the need for iohelper?
>
> 4) What has stopped Andreas' or another POSIX_FADV_NOREUSE implementation in the kernel?
For what I remember (it was a long time ago sorry) I stopped to pursue
the POSIX_FADV_NOREUSE idea, because we thought that moving to a
memcg-based solution was a better and more flexible approach, assuming
memcg would have given some form of specific page cache control. As of
today I think we still don't have any specific page cache control
feature in memcg, so maybe we could reconsider the FADV_NOREUSE idea (or
something similar)?
Maybe even introduce a separate FADV_<something> flag if we don't want
to bind a specific implementation of this feature to a standard POSIX
flag (even if FADV_NOREUSE is still implemented as a no-op in the
kernel).
The thing that I liked about the fadvise approach is its simplicity from
an application perspective, because it's just a syscall and that's it,
without having to deal with any other subsystems (cgroups, sysfs, and
similar).
-Andrea
>
> Lots of questions..
>
> Thanks for all your insight,
>
> Claudio
>
> >
> > Dave
> >
> >> Ciao,
> >>
> >> C
> >>
> >>>>
> >>>> In the above tests with libvirt, were you using the
> >>>> --bypass-cache flag or not ?
> >>>
> >>> No, I do not. Tests with ramdisk did not show a notable difference for me,
> >>>
> >>> but tests with /dev/null were not possible, since the command line is not accepted:
> >>>
> >>> # virsh save centos7 /dev/null
> >>> Domain 'centos7' saved to /dev/null
> >>> [OK]
> >>>
> >>> # virsh save centos7 /dev/null --bypass-cache
> >>> error: Failed to save domain 'centos7' to /dev/null
> >>> error: Failed to create file '/dev/null': Invalid argument
> >>>
> >>>
> >>>>
> >>>> Hopefully use of O_DIRECT doesn't make a difference for
> >>>> /dev/null, since the I/O is being immediately thrown
> >>>> away and so ought to never go into I/O cache.
> >>>>
> >>>> In terms of the comparison, we still have libvirt iohelper
> >>>> giving QEMU a pipe, while your test above gives QEMU a
> >>>> UNIX socket.
> >>>>
> >>>> So I still wonder if the delta is caused by the pipe vs socket
> >>>> difference, as opposed to netcat vs libvirt iohelper code.
> >>>
> >>> I'll look into this aspect, thanks!
> >>
next prev parent reply other threads:[~2022-03-21 13:21 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220312163001.3811-1-cfontana@suse.de>
[not found] ` <Yi94mQUfrxMVbiLM@redhat.com>
[not found] ` <34eb53b5-78f7-3814-b71e-aa7ac59f9d25@suse.de>
[not found] ` <Yi+ACeaZ+oXTVYjc@redhat.com>
[not found] ` <2d1248d4-ebdf-43f9-e4a7-95f586aade8e@suse.de>
2022-03-17 10:12 ` [libvirt RFC] virFile: new VIR_FILE_WRAPPER_BIG_PIPE to improve performance Claudio Fontana
2022-03-17 10:25 ` Daniel P. Berrangé
2022-03-17 13:41 ` Claudio Fontana
2022-03-17 14:14 ` Claudio Fontana
2022-03-17 15:03 ` Dr. David Alan Gilbert
2022-03-18 13:34 ` Claudio Fontana
2022-03-21 7:55 ` Andrea Righi [this message]
2022-03-25 9:56 ` Claudio Fontana
2022-03-25 10:33 ` Daniel P. Berrangé
2022-03-25 10:56 ` Claudio Fontana
2022-03-25 11:14 ` Daniel P. Berrangé
2022-03-25 11:16 ` Claudio Fontana
2022-04-10 19:58 ` Claudio Fontana
2022-03-25 11:29 ` Daniel P. Berrangé
2022-03-26 15:49 ` Claudio Fontana
2022-03-26 17:38 ` Claudio Fontana
2022-03-28 8:31 ` Daniel P. Berrangé
2022-03-28 9:19 ` Claudio Fontana
2022-03-28 9:41 ` Claudio Fontana
2022-03-28 9:31 ` Claudio Fontana
2022-04-05 8:35 ` Dr. David Alan Gilbert
2022-04-05 9:23 ` Claudio Fontana
2022-04-07 7:11 ` Claudio Fontana
2022-04-07 13:53 ` Dr. David Alan Gilbert
2022-04-07 13:57 ` Claudio Fontana
2022-04-11 18:21 ` Claudio Fontana
2022-04-11 18:53 ` Dr. David Alan Gilbert
2022-04-12 9:04 ` Claudio Fontana
2022-03-28 10:47 ` Claudio Fontana
2022-03-28 13:28 ` Claudio Fontana
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=Yjgtw9AWsFy/Ssvr@arighi-desktop \
--to=andrea.righi@canonical.com \
--cc=cfontana@suse.de \
--cc=dgilbert@redhat.com \
--cc=jdenemar@redhat.com \
--cc=libvir-list@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).