"Dr. David Alan Gilbert" <dgilb...@redhat.com> wrote:
> * Juan Quintela (quint...@redhat.com) wrote:
>> "Dr. David Alan Gilbert (git)" <dgilb...@redhat.com> wrote:
>> > From: "Dr. David Alan Gilbert" <dgilb...@redhat.com>
>> >
>> > Record the largest page size in use; we'll need it soon for allocating
>> > temporary buffers.
>> >
>> > Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com>
>> 
>> Not that I object, but .... could we store this in ram_list, and update it
>> it at RAMBlock creation time?  Why searh for the value later when we can
>> store it from the beggining.  Instead of putting it on migration_state,
>> put it on the ram_list itself?
>> 
>
> We could, but the code does get quite a bit more complicated for little gain,
> given that we currently read it exactly once.
> The update at creation time would be easier, but then you have to also
> update at deletion time and that has to run along the list just like this.
> (or cache based on the ram_list.version)

As I am so lazy, I would only update it at creation time, and never at
deletion time.  But I can see that some people could object.  Anyways it
don't matter a lot, it is used only once, and on the other hand, we
don't care a lot if we have a bit bigger than needed buffer.  Just a
case of taste I guess.

Later, Juan.

Reply via email to