Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753545AbbHVKp6 (ORCPT ); Sat, 22 Aug 2015 06:45:58 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:36116 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753457AbbHVKpc (ORCPT ); Sat, 22 Aug 2015 06:45:32 -0400 From: Ingo Molnar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Dave Hansen , Peter Zijlstra , David Rientjes , Rik van Riel , Rasmus Villemoes , Linus Torvalds Subject: [PATCH 2/3] mm/vmalloc: Track vmalloc info changes Date: Sat, 22 Aug 2015 12:44:59 +0200 Message-Id: <1440240300-6206-3-git-send-email-mingo@kernel.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1440240300-6206-1-git-send-email-mingo@kernel.org> References: <1440240300-6206-1-git-send-email-mingo@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1280 Lines: 48 Add a 'vmap_info_changed' flag to track changes to vmalloc() statistics. For simplicity this flag is set every time we unlock the vmap_area_lock. This flag is not yet used. Cc: Linus Torvalds Cc: Andrew Morton Cc: Rik van Riel Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar --- mm/vmalloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 605138083880..d21febaa557a 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -276,7 +276,9 @@ EXPORT_SYMBOL(vmalloc_to_pfn); #define VM_LAZY_FREEING 0x02 #define VM_VM_AREA 0x04 -static DEFINE_SPINLOCK(vmap_area_lock); +static __cacheline_aligned_in_smp DEFINE_SPINLOCK(vmap_area_lock); + +static int vmap_info_changed; static inline void vmap_lock(void) { @@ -285,6 +287,7 @@ static inline void vmap_lock(void) static inline void vmap_unlock(void) { + vmap_info_changed = 1; spin_unlock(&vmap_area_lock); } -- 2.1.4 -- 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/