From: Takuya Yoshikawa Subject: Re: [PATCH 1/4] KVM: Rename vm_list to kvm_list to avoid confusion Date: Mon, 12 Dec 2011 16:10:34 +0900 Message-ID: <4EE5A8EA.20607@oss.ntt.co.jp> References: <20111212072242.8aaf64a3420608b8204702c7@gmail.com> <20111212072403.fa4040305e37c7cbb5f100ed@gmail.com> <4EE57222.7050402@linux.vnet.ibm.com> <4EE57D67.80906@oss.ntt.co.jp> <4EE58863.5020102@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Takuya Yoshikawa , avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org To: Xiao Guangrong Return-path: Received: from serv2.oss.ntt.co.jp ([222.151.198.100]:57891 "EHLO serv2.oss.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962Ab1LLHJq (ORCPT ); Mon, 12 Dec 2011 02:09:46 -0500 In-Reply-To: <4EE58863.5020102@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: (2011/12/12 13:51), Xiao Guangrong wrote: > On 12/12/2011 12:04 PM, Takuya Yoshikawa wrote: > >> (2011/12/12 12:16), Xiao Guangrong wrote: >>> On 12/12/2011 06:24 AM, Takuya Yoshikawa wrote: >>> >>>> From: Takuya Yoshikawa >>>> >>>> Make it clear that this is not related to virtual memory. >>>> >>> >>> >>> 'vm' means 'virtual machine'... >> >> Of course I know. So I wrote "not related" to virtual memory. >> >> What's your point? >> > > > In the code, we have kvm_create_vm()/kvm_destroy_vm(), then > add/delete the 'vm" to/from the "vm_list", it is really clear, > so i think this name is OK. :) > Some reasons I wanted to change this: - The lock which protects this list is called kvm_lock, not vm_lock - Some architectures are using vm_list for vm region member - The list connects kvm instances (struct kvm) and we are doing list_for_each_entry(kvm, &vm_list, vm_list), not list_for_each_entry(vm, &vm_list, vm_list) In the case of kvm_create_vm(), it creates not only a kvm instance but also does more virtual machine initialization generally. So _vm is reasonable. (I do not mind if it is static in kvm_main.c but it is more widely used.) But I do not mind to drop this patch if other people also want to keep the name. So I will wait some more comments. Thanks, Takuya