From patchwork Wed Jun 10 06:27:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenwei Tao X-Patchwork-Id: 6576861 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA7D9C0020 for ; Wed, 10 Jun 2015 06:45:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D169B20549 for ; Wed, 10 Jun 2015 06:45:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E798520544 for ; Wed, 10 Jun 2015 06:45:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754113AbbFJGpr (ORCPT ); Wed, 10 Jun 2015 02:45:47 -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 Received: by pdbht2 with SMTP id ht2so7502331pdb.1; Tue, 09 Jun 2015 23:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=41LIgWEJLUZEPRm7jSmjA5tfTT5NFAjsYFjOW/ifF04=; b=zkLsZFNQPavpXryVeJEcJrdavtQg3uBIcR/lTqtpP4ZV9X8OPXUqUYOUEamefSzTbW 4QDc63VTpYQZKMhJ432ecv3eiW4APIk5Z+8zj2USACri8eRkhSGg4uwkhSiPPQu2yRMz Lgp4Qz8OjMt+qiAfwRqgsGGKayhLP0Pp6r0r1/ibYDf0GpA60Ofd+wINUYdPtgRBSflN 4M503N0rpOseUWlG4OmMg2OdMY9yRk5xkjpxeW5AdBy5DEDTnMMfIRP15X1QwUcgUna0 xA7MkfEdtl2+rxltz3RM1bVql27hnht/Bm9o91Iugsdc4peTFHBR+c0HN0UJRs21sfiA mgtw== X-Received: by 10.68.206.7 with SMTP id lk7mr2939990pbc.52.1433917957381; Tue, 09 Jun 2015 23:32:37 -0700 (PDT) Received: from wenweitao01ubtpc.spreadtrum.com ([175.111.195.49]) by mx.google.com with ESMTPSA id ve1sm7425188pbc.52.2015.06.09.23.32.30 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jun 2015 23:32:36 -0700 (PDT) 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;