Add a generic QIOChannel feature SEEKABLE which would be used by the
qemu_file* apis. For the time being this will be only implemented for
file channels.
Signed-off-by: Nikolay Borisov
---
include/io/channel.h | 1 +
io/channel-file.c| 9 +
2 files changed, 10 insertions(+)
diff
-related helpers from the patch
introducing the io interfaces.
- Added qtests for the file-based migration as well as for the fixed-ram
feature.
[0]
https://lore.kernel.org/qemu-devel/20221004123733.2745519-1-nbori...@suse.com/
Nikolay Borisov (14):
migration: support file: uri for source migration
e dirty
pages for a ramblock follow its header. Since all pages have a fixed
location RAM_SAVE_FLAG_EOS is no longer generated on every migration
iteration but there is effectively a single RAM_SAVE_FLAG_EOS right at
the end.
Signed-off-by: Nikolay Borisov
---
include/exec/ramblock.h | 7 +++
migratio
management applications.
Reviewed-by: Daniel P. Berrangé
Signed-off-by: Nikolay Borisov
---
migration/file.c | 15 +++
migration/file.h | 1 +
migration/migration.c | 2 ++
3 files changed, 18 insertions(+)
diff --git a/migration/file.c b/migration/file.c
index 02896a7cab99
To facilitate easier implementaiton of the 'fixed-ram' migration restore
factor out the code responsible for parsing the ramblocks headers. This
also makes ram_load_precopy easier to comprehend.
Signed-off-by: Nikolay Borisov
---
migration/ram.c | 142
Add basic tests for file-based migration as well as for the 'fixed-ram'
feature.
Signed-off-by: Nikolay Borisov
---
tests/qtest/migration-test.c | 46
1 file changed, 46 insertions(+)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
The upcoming 'fixed-ram' feature would require qemu to write data at
specific offsets of the file. Add a minimal implementation of pwritev
and expose it via the io_pwritev interface.
Signed-off-by: Nikolay Borisov
---
io/channel-file.c | 25 +
1 file changed, 25
Restoring a 'fixed-ram' enabled migration stream would require reading
from specific offsets in the file so add a helper to QEMUFile that uses
the newly introduced qio_channel_file_preadv.
Signed-off-by: Nikolay Borisov
---
migration/qemu-file.c | 23 +++
migration/qemu
file-based migration requires the target to initiate its migration after
the source has finished writing out the data in the file. Currently
there's no easy way to initiate 'migrate-incoming', allow this by
introducing migrate_incoming_qmp helper, similarly to migrate_qmp.
Signed-off-by: Nikolay
: Daniel P. Berrangé
Signed-off-by: Nikolay Borisov
---
migration/file.c | 23 +++
migration/file.h | 9 +
migration/meson.build | 1 +
migration/migration.c | 3 +++
4 files changed, 36 insertions(+)
create mode 100644 migration/file.c
create mode 100644
Add
qemu_file_is_seekable/qemu_put_buffer_at/qemu_set_offset/qemu_get_offset
as those utility methods will be needed when implementing 'fixed-ram'
migration capability.
Signed-off-by: Nikolay Borisov
---
include/migration/qemu-file-types.h | 2 +
migration/qemu-file.c | 59
Introduce basic pwriteve/preadv support in the generic channel layer.
SPecific implementation will follow for the file channel as this is
required in order to support migration streams with fixed location of
each ram page.
Signed-off-by: Nikolay Borisov
---
include/io/channel.h | 49
the configuration object be serialized to json.
Signed-off-by: Nikolay Borisov
---
migration/migration.c| 5
migration/migration.h| 3 +++
migration/savevm.c | 47 ++
scripts/analyze-migration.py | 49 +---
4 files
preadv is going to be needed when 'fixed-ram'-enabled stream are to be
restored. Add a minimal implementation of preadv for file channels and
expose it via the generic io_preadv interface.
Signed-off-by: Nikolay Borisov
---
io/channel-file.c | 27 +++
1 file changed, 27
CTION_(PART|END) flags).
Signed-off-by: Nikolay Borisov
---
migration/migration.h | 2 +
migration/ram.c | 95 ++-
2 files changed, 95 insertions(+), 2 deletions(-)
diff --git a/migration/migration.h b/migration/migration.h
index 9aab1b16f407..7a832d
On 18.10.22 г. 13:06 ч., Daniel P. Berrangé wrote:
On Mon, Oct 10, 2022 at 04:34:00PM +0300, Nikolay Borisov wrote:
This is required so that migration stream configuration is written
to the migration stream. This would allow analyze-migration to
parse enabled capabilities for the migration
On 18.10.22 г. 13:14 ч., Daniel P. Berrangé wrote:
On Mon, Oct 10, 2022 at 04:34:02PM +0300, Nikolay Borisov wrote:
Add a bunch of auxiliarry methods and a feature flag to work with
SEEKABLE channels. Currently the only channel considered seekable is
QIOChannelFile. Also add a bunch
On 18.10.22 г. 12:10 ч., Daniel P. Berrangé wrote:
On Mon, Oct 10, 2022 at 04:33:58PM +0300, Nikolay Borisov wrote:
Implement support for a "file:" uri so that a migration can be initiated
directly to a file from QEMU.
Can we add a reminder here
Unlike other migration protoco
To facilitate easier implementaiton of the 'fixed-ram' migration restore
factor out the code responsible for parsing the ramblocks headers. This
also makes ram_load_precopy easier to comprehend.
Signed-off-by: Nikolay Borisov
---
migration/ram.c | 142
This commit introduces the minimum code necessary to support parsing
migration strems with 'fixed-ram' capability set. The only thing really
missing is the implementation of write_or_dump_fixed_ram() which deals
with '-x'/'-m' options.
Signed-off-by: Nikolay Borisov
---
scripts/analyze
-ram' migration stream feature.
Signed-off-by: Nikolay Borisov
---
include/io/channel.h| 1 +
include/migration/qemu-file-types.h | 2 +
io/channel-file.c | 5 +++
migration/qemu-file.c | 59 +
migration/qemu-file.h
preadv is going to be needed when 'fixed-ram'-enabled stream are to be
restored. Simply add a wrapper around preadv that's specific to
QIOChannelFile.
Signed-off-by: Nikolay Borisov
---
include/io/channel-file.h | 5 +
io/channel-file.c | 26 ++
2 files
-devel/20221004123733.2745519-1-nbori...@suse.com/
Nikolay Borisov (11):
migration: support file: uri for source migration
migration: Add support for 'file:' uri for incoming migration
migration: Make migration json writer part of MigrationState struct
io: add pwritev support
This is a counterpart to the 'file:' uri support for source migration,
now a file can also serve as the source of an incoming migration.
Signed-off-by: Nikolay Borisov
---
migration/file.c | 15 +++
migration/file.h | 1 +
migration/migration.c | 2 ++
3 files changed
seeks.
Signed-off-by: Nikolay Borisov
---
include/io/channel-file.h | 5 +
io/channel-file.c | 24
2 files changed, 29 insertions(+)
diff --git a/include/io/channel-file.h b/include/io/channel-file.h
index 50e8eb113868..0a5d54f5e58e 100644
--- a/include/io
e dirty
pages for a ramblock follow its header. Since all pages have a fixed
location RAM_SAVE_FLAG_EOS is no longer generated on every migration
iteration but there is effectively a single RAM_SAVE_FLAG_EOS right at
the end.
Signed-off-by: Nikolay Borisov
---
include/exec/ramblock.h | 7 +++
migratio
format changes.
Signed-off-by: Nikolay Borisov
---
migration/migration.c | 5 +
migration/migration.h | 3 +++
migration/savevm.c| 38 ++
3 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index
Restoring a 'fixed-ram' enabled migration stream would require reading
from specific offsets in the file so add a helper to QEMUFile that uses
the newly introduced qio_channel_file_preadv.
Signed-off-by: Nikolay Borisov
---
migration/qemu-file.c | 23 +++
migration/qemu
CTION_(PART|END) flags).
Signed-off-by: Nikolay Borisov
---
migration/migration.h | 2 +
migration/ram.c | 95 ++-
2 files changed, 95 insertions(+), 2 deletions(-)
diff --git a/migration/migration.h b/migration/migration.h
index 9aab1b16f407..7a832d
Implement support for a "file:" uri so that a migration can be initiated
directly to a file from QEMU.
Signed-off-by: Nikolay Borisov
---
migration/file.c | 23 +++
migration/file.h | 9 +
migration/meson.build | 1 +
migration/migration.c |
To facilitate easier implementaiton of the 'fixed-ram' migration restore
factor out the code responsible for parsing the ramblocks headers. This
also makes ram_load_precopy easier to comprehend.
Signed-off-by: Nikolay Borisov
---
migration/ram.c | 142
-ram' migration stream feature.
Signed-off-by: Nikolay Borisov
---
include/io/channel.h| 1 +
include/migration/qemu-file-types.h | 2 +
io/channel-file.c | 5 +++
migration/qemu-file.c | 59 +
migration/qemu-file.h
Restoring a 'fixed-ram' enabled migration stream would require reading
from specific offsets in the file so add a helper to QEMUFile that uses
the newly introduced qio_channel_file_preadv.
Signed-off-by: Nikolay Borisov
---
migration/qemu-file.c | 23 +++
migration/qemu
preadv is going to be needed when 'fixed-ram'-enabled stream are to be
restored. Simply add a wrapper around preadv that's specific to
QIOChannelFile.
Signed-off-by: Nikolay Borisov
---
include/io/channel-file.h | 5 +
io/channel-file.c | 26 ++
2 files
This is a counterpart to the 'file:' uri support for source migration,
now a file can also serve as the source of an incoming migration.
Signed-off-by: Nikolay Borisov
---
migration/file.c | 15 +++
migration/file.h | 1 +
migration/migration.c | 2 ++
3 files changed
e dirty
pages for a ramblock follow its header. Since all pages have a fixed
location RAM_SAVE_FLAG_EOS is no longer generated on every migration
iteration but there is effectively a single RAM_SAVE_FLAG_EOS right at
the end.
Signed-off-by: Nikolay Borisov
---
include/exec/ramblock.h | 7 +++
migratio
- Possibly implement the "external fd" support for "fixed-ram" capability.
All feedback is welcome.
Nikolay Borisov (11):
migration: support file: uri for source migration
migration: Add support for 'file:' uri for incoming migration
migration: Make migration json writer part of
seeks.
Signed-off-by: Nikolay Borisov
---
include/io/channel-file.h | 5 +
io/channel-file.c | 24
2 files changed, 29 insertions(+)
diff --git a/include/io/channel-file.h b/include/io/channel-file.h
index 50e8eb113868..0a5d54f5e58e 100644
--- a/include/io
format changes.
Signed-off-by: Nikolay Borisov
---
migration/migration.c | 5 +
migration/migration.h | 3 +++
migration/savevm.c| 38 ++
3 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index
This commit introduces the minimum code necessary to support parsing
migration strems with 'fixed-ram' capability set. The only thing really
missing is the implementation of write_or_dump_fixed_ram() which deals
with '-x'/'-m' options.
Signed-off-by: Nikolay Borisov
---
scripts/analyze
Implement support for a "file:" uri so that a migration can be initiated
directly to a file from QEMU.
Signed-off-by: Nikolay Borisov
---
migration/file.c | 23 +++
migration/file.h | 9 +
migration/meson.build | 1 +
migration/migration.c |
CTION_(PART|END) flags).
Signed-off-by: Nikolay Borisov
---
migration/migration.h | 2 +
migration/ram.c | 86 ++-
2 files changed, 86 insertions(+), 2 deletions(-)
diff --git a/migration/migration.h b/migration/migration.h
index 9aab1b16f407..7a832d
On 22.09.22 г. 20:42 ч., Dr. David Alan Gilbert wrote:
* Nikolay Borisov (nbori...@suse.com) wrote:
During ram initialization for migration dirty/clear bitmaps are
allocated for all migratable blocks, irrespective of their shared
status. However, during ram migration cleanup those bitmaps
to a situation where the bitmaps aren't
freed for such blocks.
Fix this by switching the cleanup code to also free bitmaps for all
migratable blocks.
Signed-off-by: Nikolay Borisov
---
migration/ram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration
Hello,
Based on several discussions I've had in the past 2 days and time spent
looking at the migration stream code I came up with the following
proposal for changes to the stream format. Let me recap what we have
right now:
...()
Where is put only when the current page we are writing
to
On 12.09.22 г. 18:41 ч., Daniel P. Berrangé wrote:
On Thu, Sep 08, 2022 at 01:26:32PM +0300, Nikolay Borisov wrote:
This is a prototype of supporting a 'file:' based uri protocol for
writing out the migration stream of qemu. Currently the code always
opens the file in DIO mode and adheres
ble to upstream
merging. Any ideas/comments would be much appreciated.
Signed-off-by: Nikolay Borisov
---
include/io/channel-file.h | 1 +
include/io/channel.h | 1 +
io/channel-file.c | 17 +++
migration/meson.build | 1 +
migration/migration.c | 4 ++
migration/migratio
On 10.08.22 г. 13:39 ч., Nikolay Borisov wrote:
All pages which are going to be migrated are first added to
MultiFDSendParams::MultiFDPages_t::offset array by the main migration
thread and are subsequently copied to MultiFDSendParams::normal by the
multifd thread. This is really unnecessary
[adding Juan and David to cc as I had missed them. ]
On 11.08.22 г. 16:47 ч., Nikolay Borisov wrote:
Hello,
I'm currently looking into implementing a 'file:' uri for migration save
in qemu. Ideally the solution will be O_DIRECT compatible. I'm aware of
the branch https://gitlab.com/berrange
Hello,
I'm currently looking into implementing a 'file:' uri for migration save
in qemu. Ideally the solution will be O_DIRECT compatible. I'm aware of
the branch https://gitlab.com/berrange/qemu/-/tree/mig-file. In the
process of brainstorming how a solution would like the a couple of
normal/normal_num are no longer used in the multifd
send path.
Signed-off-by: Nikolay Borisov
---
migration/multifd-zlib.c | 6 +++---
migration/multifd-zstd.c | 6 +++---
migration/multifd.c | 25 ++---
3 files changed, 16 insertions(+), 21 deletions(-)
diff --git
51 matches
Mail list logo