diff options
| author | Daniil Tatianin <d-tatianin@yandex-team.ru> | 2025-02-12 17:39:19 +0300 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2025-02-12 11:36:13 -0500 |
| commit | cd2e472e54a49c13b0a728cdda7c10c50421e23d (patch) | |
| tree | 759c1143fce120ce6c3109b5107d364c9c86bb7f /migration/postcopy-ram.c | |
| parent | cb74f2b8a65cde2eadbcb5574327ac3f49983d8a (diff) | |
| download | focaccia-qemu-cd2e472e54a49c13b0a728cdda7c10c50421e23d.tar.gz focaccia-qemu-cd2e472e54a49c13b0a728cdda7c10c50421e23d.zip | |
system: introduce a new MlockState enum
Replace the boolean value enable_mlock with an enum and add a helper to decide whether we should be calling os_mlock. This is a stepping stone towards introducing a new mlock mode, which will be the third possible state of this enum. Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru> Link: https://lore.kernel.org/r/20250212143920.1269754-4-d-tatianin@yandex-team.ru Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/postcopy-ram.c')
| -rw-r--r-- | migration/postcopy-ram.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index fc4d8a10df..04068ee039 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -651,7 +651,7 @@ int postcopy_ram_incoming_cleanup(MigrationIncomingState *mis) mis->have_fault_thread = false; } - if (enable_mlock) { + if (should_mlock(mlock_state)) { if (os_mlock(false) < 0) { error_report("mlock: %s", strerror(errno)); /* |