Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932116AbbFJGp4 (ORCPT ); Wed, 10 Jun 2015 02:45:56 -0400 Received: from mail-pd0-f194.google.com ([209.85.192.194]:34209 "EHLO mail-pd0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754128AbbFJGpq (ORCPT ); Wed, 10 Jun 2015 02:45:46 -0400 X-Greylist: delayed 788 seconds by postgrey-1.27 at vger.kernel.org; Wed, 10 Jun 2015 02:45:45 EDT From: Wenwei Tao To: izik.eidus@ravellosystems.com, aarcange@redhat.com, chrisw@sous-sol.org, hughd@google.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, viro@zeniv.linux.org.uk Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, wenweitaowenwei@gmail.com Subject: [RFC PATCH 3/6] perf: change the condition of identifying hugetlb vm Date: Wed, 10 Jun 2015 14:27:16 +0800 Message-Id: <1433917639-31699-4-git-send-email-wenweitaowenwei@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1433917639-31699-1-git-send-email-wenweitaowenwei@gmail.com> References: <1433917639-31699-1-git-send-email-wenweitaowenwei@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1171 Lines: 31 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 time. Signed-off-by: Wenwei Tao --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index f04daab..6313bdd 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5624,7 +5624,7 @@ static void perf_event_mmap_event(struct perf_mmap_event *mmap_event) flags |= MAP_EXECUTABLE; if (vma->vm_flags & VM_LOCKED) flags |= MAP_LOCKED; - if (vma->vm_flags & VM_HUGETLB) + if ((vma->vm_flags & (VM_HUGETLB | VM_MERGEABLE)) == VM_HUGETLB) flags |= MAP_HUGETLB; goto got_name; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/