[CRIU] [PATCH] mem: Don't track memory changes if --track-mem is not specified
Pavel Emelyanov
xemul at parallels.com
Thu Jan 16 03:07:55 PST 2014
>> @@ -81,6 +77,17 @@ static struct mem_snap_ctx *mem_snap_init(struct parasite_ctl *ctl)
>> int p_fd, pm_fd;
>> PagemapHead *h;
>>
>> + /*
>> + * If we're not tracking memory changes, then it doesn't
>> + * matter whether we have parent images or not. Just
>> + * proceed with full memory dump.
>> + */
>> +
>> + if (!opts.track_mem)
>> + return NULL;
>> +
>> + BUG_ON(!kerndat_has_dirty_track);
>
> Are these BUG_ON really needed? I mean what happen if we drop them?
We will proceed reading pmes with soft-dirty bits containing zeroes,
i.e. -- spoiling the memory dump. Not to do this we ban track_mem
for kernels w/o soft-dirty in kerndat_init() so these bug-ons are
just to reflect that fact.
More information about the CRIU
mailing list