Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-11-01 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Wed, Nov 01, 2023 at 09:16:33AM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > >> > So the problem with add-fd is that when requesting a FD, the monitor >> > code masks flags with O_ACCMODE. What if we extended it such that >> > the monitor ma

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-11-01 Thread Daniel P . Berrangé
On Wed, Nov 01, 2023 at 09:16:33AM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > > > So the problem with add-fd is that when requesting a FD, the monitor > > code masks flags with O_ACCMODE. What if we extended it such that > > the monitor masked with O_ACCMODE | O_DIRECT. > > >

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-11-01 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Tue, Oct 31, 2023 at 04:05:46PM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > On Tue, Oct 31, 2023 at 12:52:41PM -0300, Fabiano Rosas wrote: >> >> Daniel P. Berrangé writes: >> >> > >> >> > I guess I'm not seeing the problem still. A single

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-11-01 Thread Daniel P . Berrangé
On Tue, Oct 31, 2023 at 04:05:46PM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > On Tue, Oct 31, 2023 at 12:52:41PM -0300, Fabiano Rosas wrote: > >> Daniel P. Berrangé writes: > >> > > >> > I guess I'm not seeing the problem still. A single FD is passed across > >> > from libvi

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-31 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Tue, Oct 31, 2023 at 12:52:41PM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> > >> > I guess I'm not seeing the problem still. A single FD is passed across >> > from libvirt, but QEMU is free to turn that into *many* FDs for its >> > internal use,

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-31 Thread Daniel P . Berrangé
On Tue, Oct 31, 2023 at 12:52:41PM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > > I guess I'm not seeing the problem still. A single FD is passed across > > from libvirt, but QEMU is free to turn that into *many* FDs for its > > internal use, using dup() and then setting O_DIREC

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-31 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Tue, Oct 31, 2023 at 11:33:24AM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > On Tue, Oct 31, 2023 at 10:05:56AM -0300, Fabiano Rosas wrote: >> >> Daniel P. Berrangé writes: >> >> >> >> > On Mon, Oct 30, 2023 at 07:51:34PM -0300, Fabiano Ros

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-31 Thread Daniel P . Berrangé
On Tue, Oct 31, 2023 at 11:33:24AM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > On Tue, Oct 31, 2023 at 10:05:56AM -0300, Fabiano Rosas wrote: > >> Daniel P. Berrangé writes: > >> > >> > On Mon, Oct 30, 2023 at 07:51:34PM -0300, Fabiano Rosas wrote: > >> >> I could use some ad

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-31 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Tue, Oct 31, 2023 at 10:05:56AM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > On Mon, Oct 30, 2023 at 07:51:34PM -0300, Fabiano Rosas wrote: >> >> I could use some advice on how to solve this situation. The fdset code >> >> at monitor/fds.c an

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-31 Thread Daniel P . Berrangé
On Tue, Oct 31, 2023 at 10:05:56AM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > On Mon, Oct 30, 2023 at 07:51:34PM -0300, Fabiano Rosas wrote: > >> I could use some advice on how to solve this situation. The fdset code > >> at monitor/fds.c and the add-fd command don't seem to b

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-31 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Mon, Oct 30, 2023 at 07:51:34PM -0300, Fabiano Rosas wrote: >> I could use some advice on how to solve this situation. The fdset code >> at monitor/fds.c and the add-fd command don't seem to be usable outside >> the original use-case of passing fds with different o

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-31 Thread Daniel P . Berrangé
On Mon, Oct 30, 2023 at 07:51:34PM -0300, Fabiano Rosas wrote: > I could use some advice on how to solve this situation. The fdset code > at monitor/fds.c and the add-fd command don't seem to be usable outside > the original use-case of passing fds with different open flags. > > There are several

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-30 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Wed, Oct 25, 2023 at 11:32:00AM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > On Tue, Oct 24, 2023 at 04:32:10PM -0300, Fabiano Rosas wrote: >> >> Markus Armbruster writes: >> >> >> >> > Fabiano Rosas writes: >> >> > >> >> >> Add the direct

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-25 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Wed, Oct 25, 2023 at 02:30:01PM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > On Wed, Oct 25, 2023 at 11:32:00AM -0300, Fabiano Rosas wrote: >> >> Daniel P. Berrangé writes: >> >> >> >> > On Tue, Oct 24, 2023 at 04:32:10PM -0300, Fabiano Ros

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-25 Thread Daniel P . Berrangé
On Wed, Oct 25, 2023 at 02:30:01PM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > On Wed, Oct 25, 2023 at 11:32:00AM -0300, Fabiano Rosas wrote: > >> Daniel P. Berrangé writes: > >> > >> > On Tue, Oct 24, 2023 at 04:32:10PM -0300, Fabiano Rosas wrote: > >> >> Markus Armbruster

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-25 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Wed, Oct 25, 2023 at 11:32:00AM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > On Tue, Oct 24, 2023 at 04:32:10PM -0300, Fabiano Rosas wrote: >> >> Markus Armbruster writes: >> >> >> >> > Fabiano Rosas writes: >> >> > >> >> >> Add the direct

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-25 Thread Daniel P . Berrangé
On Wed, Oct 25, 2023 at 11:48:08AM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > On Mon, Oct 23, 2023 at 05:36:07PM -0300, Fabiano Rosas wrote: > >> Add the direct-io migration parameter that tells the migration code to > >> use O_DIRECT when opening the migration stream file whe

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-25 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Mon, Oct 23, 2023 at 05:36:07PM -0300, Fabiano Rosas wrote: >> Add the direct-io migration parameter that tells the migration code to >> use O_DIRECT when opening the migration stream file whenever possible. >> >> This is currently only used for the secondary chan

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-25 Thread Daniel P . Berrangé
On Wed, Oct 25, 2023 at 11:32:00AM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > On Tue, Oct 24, 2023 at 04:32:10PM -0300, Fabiano Rosas wrote: > >> Markus Armbruster writes: > >> > >> > Fabiano Rosas writes: > >> > > >> >> Add the direct-io migration parameter that tells the

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-25 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Tue, Oct 24, 2023 at 04:32:10PM -0300, Fabiano Rosas wrote: >> Markus Armbruster writes: >> >> > Fabiano Rosas writes: >> > >> >> Add the direct-io migration parameter that tells the migration code to >> >> use O_DIRECT when opening the migration stream file whe

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-25 Thread Daniel P . Berrangé
On Mon, Oct 23, 2023 at 05:36:07PM -0300, Fabiano Rosas wrote: > Add the direct-io migration parameter that tells the migration code to > use O_DIRECT when opening the migration stream file whenever possible. > > This is currently only used for the secondary channels of fixed-ram > migration, whic

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-25 Thread Daniel P . Berrangé
On Tue, Oct 24, 2023 at 04:32:10PM -0300, Fabiano Rosas wrote: > Markus Armbruster writes: > > > Fabiano Rosas writes: > > > >> Add the direct-io migration parameter that tells the migration code to > >> use O_DIRECT when opening the migration stream file whenever possible. > >> > >> This is cur

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-24 Thread Markus Armbruster
Fabiano Rosas writes: > Markus Armbruster writes: > >> Fabiano Rosas writes: >> >>> Add the direct-io migration parameter that tells the migration code to >>> use O_DIRECT when opening the migration stream file whenever possible. >>> >>> This is currently only used for the secondary channels of

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-24 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Add the direct-io migration parameter that tells the migration code to >> use O_DIRECT when opening the migration stream file whenever possible. >> >> This is currently only used for the secondary channels of fixed-ram >> migration, which ca

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-24 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Mon, Oct 23, 2023 at 05:36:07PM -0300, Fabiano Rosas wrote: >> Add the direct-io migration parameter that tells the migration code to >> use O_DIRECT when opening the migration stream file whenever possible. >> >> This is currently only used for the secondary chan

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-24 Thread Daniel P . Berrangé
On Mon, Oct 23, 2023 at 05:36:07PM -0300, Fabiano Rosas wrote: > Add the direct-io migration parameter that tells the migration code to > use O_DIRECT when opening the migration stream file whenever possible. > > This is currently only used for the secondary channels of fixed-ram > migration, whic

Re: [PATCH v2 28/29] migration: Add direct-io parameter

2023-10-23 Thread Markus Armbruster
Fabiano Rosas writes: > Add the direct-io migration parameter that tells the migration code to > use O_DIRECT when opening the migration stream file whenever possible. > > This is currently only used for the secondary channels of fixed-ram > migration, which can guarantee that writes are page ali

[PATCH v2 28/29] migration: Add direct-io parameter

2023-10-23 Thread Fabiano Rosas
Add the direct-io migration parameter that tells the migration code to use O_DIRECT when opening the migration stream file whenever possible. This is currently only used for the secondary channels of fixed-ram migration, which can guarantee that writes are page aligned. However the parameter coul