Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-07 Thread Scott Wood
On Tue, 2015-07-07 at 16:05 +0800, wenwei tao wrote: > Hi Scott > > I understand what you said. > > I will use the function 'is_vm_hugetlb_page()' to hide the bit > combinations according to your comments in the next version of patch > set. > > But for the situation like below, there isn't an

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-07 Thread wenwei tao
Hi Scott I understand what you said. I will use the function 'is_vm_hugetlb_page()' to hide the bit combinations according to your comments in the next version of patch set. But for the situation like below, there isn't an obvious structure 'vma', using 'is_vm_hugetlb_page()' maybe costly or

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-07 Thread wenwei tao
Hi Scott I understand what you said. I will use the function 'is_vm_hugetlb_page()' to hide the bit combinations according to your comments in the next version of patch set. But for the situation like below, there isn't an obvious structure 'vma', using 'is_vm_hugetlb_page()' maybe costly or

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-07 Thread Scott Wood
On Tue, 2015-07-07 at 16:05 +0800, wenwei tao wrote: Hi Scott I understand what you said. I will use the function 'is_vm_hugetlb_page()' to hide the bit combinations according to your comments in the next version of patch set. But for the situation like below, there isn't an obvious

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-06 Thread Scott Wood
On Fri, 2015-07-03 at 16:47 +0800, wenwei tao wrote: > Hi Scott > > Thank you for your comments. > > Kernel already has that function: is_vm_hugetlb_page() , but the > original code didn't use it, > in order to keep the coding style of the original code, I didn't use it > either. > > For the

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-06 Thread Scott Wood
On Fri, 2015-07-03 at 16:47 +0800, wenwei tao wrote: Hi Scott Thank you for your comments. Kernel already has that function: is_vm_hugetlb_page() , but the original code didn't use it, in order to keep the coding style of the original code, I didn't use it either. For the sentence

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-03 Thread wenwei tao
Hi Scott Thank you for your comments. Kernel already has that function: is_vm_hugetlb_page() , but the original code didn't use it, in order to keep the coding style of the original code, I didn't use it either. For the sentence like: "vma->vm_flags & VM_HUGETLB" , hiding it behind

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-03 Thread wenwei tao
Hi Scott Thank you for your comments. Kernel already has that function: is_vm_hugetlb_page() , but the original code didn't use it, in order to keep the coding style of the original code, I didn't use it either. For the sentence like: vma-vm_flags VM_HUGETLB , hiding it behind

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-02 Thread Scott Wood
On Wed, 2015-06-10 at 14:27 +0800, Wenwei Tao wrote: > Hugetlb VMAs are not mergeable, that means a VMA couldn't have VM_HUGETLB > and > VM_MERGEABLE been set in the same time. So we use VM_HUGETLB to indicate new > mergeable VMAs. Because of that a VMA which has VM_HUGETLB been set is a >

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-02 Thread Scott Wood
On Wed, 2015-06-10 at 14:27 +0800, Wenwei Tao wrote: Hugetlb VMAs are not mergeable, that means a VMA couldn't have VM_HUGETLB and VM_MERGEABLE been set in the same time. So we use VM_HUGETLB to indicate new mergeable VMAs. Because of that a VMA which has VM_HUGETLB been set is a hugetlb

[RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
Hugetlb VMAs are not mergeable, that means a VMA couldn't have VM_HUGETLB and VM_MERGEABLE been set in the same time. So we use VM_HUGETLB to indicate new mergeable VMAs. Because of that a VMA which has VM_HUGETLB been set is a hugetlb VMA only if it doesn't have VM_MERGEABLE been set in the same

[RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
Hugetlb VMAs are not mergeable, that means a VMA couldn't have VM_HUGETLB and VM_MERGEABLE been set in the same time. So we use VM_HUGETLB to indicate new mergeable VMAs. Because of that a VMA which has VM_HUGETLB been set is a hugetlb VMA only if it doesn't have VM_MERGEABLE been set in the same