diff mbox

Change name of live migration thread

Message ID 1485069471-3680-1-git-send-email-pagupta@redhat.com
State New
Headers show

Commit Message

Pankaj Gupta Jan. 22, 2017, 7:17 a.m. UTC
Change the name of live migration thread from 'migration' 
to 'qemu_vm_migration' to identify it clearly. 'migration'
is a generic word and kernel also has  tasks for process
migration with the name 'migration/cpu#'.

Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
---
 migration/migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Amit Shah Jan. 23, 2017, 5:40 a.m. UTC | #1
On (Sun) 22 Jan 2017 [12:47:51], Pankaj Gupta wrote:
> Change the name of live migration thread from 'migration' 
> to 'qemu_vm_migration' to identify it clearly. 'migration'
> is a generic word and kernel also has  tasks for process
> migration with the name 'migration/cpu#'.

Makes sense.

Reviewed-by: Amit Shah <amit.shah@redhat.com>

		Amit
Juan Quintela Jan. 23, 2017, 8:42 a.m. UTC | #2
Pankaj Gupta <pagupta@redhat.com> wrote:
> Change the name of live migration thread from 'migration' 
> to 'qemu_vm_migration' to identify it clearly. 'migration'
> is a generic word and kernel also has  tasks for process
> migration with the name 'migration/cpu#'.
>
> Signed-off-by: Pankaj Gupta <pagupta@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

Once here, I will change the name of the compression threads.

Thanks, Juan.
Dr. David Alan Gilbert Jan. 23, 2017, 9:17 a.m. UTC | #3
* Pankaj Gupta (pagupta@redhat.com) wrote:
> Change the name of live migration thread from 'migration' 
> to 'qemu_vm_migration' to identify it clearly. 'migration'
> is a generic word and kernel also has  tasks for process
> migration with the name 'migration/cpu#'.
> 
> Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> ---
>  migration/migration.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index f498ab8..6ebd606 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1969,7 +1969,7 @@ void migrate_fd_connect(MigrationState *s)
>      }
>  
>      migrate_compress_threads_create();
> -    qemu_thread_create(&s->thread, "migration", migration_thread, s,
> +    qemu_thread_create(&s->thread, "qemu_vm_migration", migration_thread, s,
>                         QEMU_THREAD_JOINABLE);

Are you sure that works?  For me it doesn't change the name.

There's a maximum length that I think is somewhere around 16 characters and that
name is too long.

Changing it to "qemu_migration" seems to work.

Dave

>      s->migration_thread_running = true;
>  }
> -- 
> 2.7.4
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
Paolo Bonzini Jan. 23, 2017, 9:18 a.m. UTC | #4
On 23/01/2017 06:40, Amit Shah wrote:
> On (Sun) 22 Jan 2017 [12:47:51], Pankaj Gupta wrote:
>> Change the name of live migration thread from 'migration' 
>> to 'qemu_vm_migration' to identify it clearly. 'migration'
>> is a generic word and kernel also has  tasks for process
>> migration with the name 'migration/cpu#'.
> 
> Makes sense.
> 
> Reviewed-by: Amit Shah <amit.shah@redhat.com>

It's a bit ugly that no other thread name has qemu in it, and the limit
is 15 characters---which is more than "qemu_vm_migration"'s length.  So
maybe "live_migration" or "migrate" would be better.

Spaces vs. underscores are also inconsistent.  A patch to fix that would
be helpful!

Paolo
Pankaj Gupta Jan. 23, 2017, 10:58 a.m. UTC | #5
Hi Dave,

> > Change the name of live migration thread from 'migration'
> > to 'qemu_vm_migration' to identify it clearly. 'migration'
> > is a generic word and kernel also has  tasks for process
> > migration with the name 'migration/cpu#'.
> > 
> > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > ---
> >  migration/migration.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/migration/migration.c b/migration/migration.c
> > index f498ab8..6ebd606 100644
> > --- a/migration/migration.c
> > +++ b/migration/migration.c
> > @@ -1969,7 +1969,7 @@ void migrate_fd_connect(MigrationState *s)
> >      }
> >  
> >      migrate_compress_threads_create();
> > -    qemu_thread_create(&s->thread, "migration", migration_thread, s,
> > +    qemu_thread_create(&s->thread, "qemu_vm_migration", migration_thread,
> > s,
> >                         QEMU_THREAD_JOINABLE);
> 
> Are you sure that works?  For me it doesn't change the name.
> 
> There's a maximum length that I think is somewhere around 16 characters and
> that
> name is too long.
> 
> Changing it to "qemu_migration" seems to work.

Thanks for pointing out.
I will send a v2.

> 
> Dave
> 
> >      s->migration_thread_running = true;
> >  }
> > --
> > 2.7.4
> > 
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
>
Pankaj Gupta Jan. 23, 2017, 11:05 a.m. UTC | #6
Hi Paolo,

> > On (Sun) 22 Jan 2017 [12:47:51], Pankaj Gupta wrote:
> >> Change the name of live migration thread from 'migration'
> >> to 'qemu_vm_migration' to identify it clearly. 'migration'
> >> is a generic word and kernel also has  tasks for process
> >> migration with the name 'migration/cpu#'.
> > 
> > Makes sense.
> > 
> > Reviewed-by: Amit Shah <amit.shah@redhat.com>
> 
> It's a bit ugly that no other thread name has qemu in it, and the limit
> is 15 characters---which is more than "qemu_vm_migration"'s length.  So
> maybe "live_migration" or "migrate" would be better.

Thanks for the suggestion.
"live_migration" seems like good option.
> 
> Spaces vs. underscores are also inconsistent.  A patch to fix that would
> be helpful!

Sure, will do that.
> 
> Paolo
>
diff mbox

Patch

diff --git a/migration/migration.c b/migration/migration.c
index f498ab8..6ebd606 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1969,7 +1969,7 @@  void migrate_fd_connect(MigrationState *s)
     }
 
     migrate_compress_threads_create();
-    qemu_thread_create(&s->thread, "migration", migration_thread, s,
+    qemu_thread_create(&s->thread, "qemu_vm_migration", migration_thread, s,
                        QEMU_THREAD_JOINABLE);
     s->migration_thread_running = true;
 }