qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 04/11] migration: split use of MigrationState.to


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 04/11] migration: split use of MigrationState.total_time
Date: Wed, 03 Jan 2018 10:20:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Peter Xu <address@hidden> wrote:
> On Wed, Jan 03, 2018 at 09:58:10AM +0100, Juan Quintela wrote:
>> Peter Xu <address@hidden> wrote:
>> > It was used either to:
>> >
>> > 1. store initial timestamp of migration start, and
>> > 2. store total time used by last migration
>> >
>> > Let's provide two parameters for each of them.  Mix use of the two is
>> > slightly misleading.
>> >
>> > Signed-off-by: Peter Xu <address@hidden>
>> 
>> Reviewed-by: Juan Quintela <address@hidden>
>
> Thanks!
>
>> 
>> If you have to respin, I would like to use the names:
>
> (I think it very possible :-)
>
>> 
>> start_time and total_time, i.e. without the mig_ preffix, because they
>> are in an struct that is clearly named migration O:-)
>
> Oh, it's my bad (or good?) habit of keeping some prefix so that cscope
> won't mix these variables with others.  I think the problem is that
> cscope is always using a global namespace for variables.  Considering
> this do you still like me to change? :) Any suggestions on better
> usage of cscope would be greatly welcomed too!

I only use cscope very ocassionally, so I can't comment about its usage.
As said, I put the reviewed-by anyways.  But if you dont want to use
generic names like start_time/total_time, then please use the full name:

- migration_start_time
- migration_total_time

It is only used a couple of times, and clearer to read.  I normally only
put _prefixes_ if context don't make clear what the variable means.  If
I need *context* I tend to use the full name of things, not
abbreviations.  But yes, not all the code is coherent/consistent.

Later, Juan.


>
> (Sure I can rename that!  It's not a big deal)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]