From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751968AbdHBXXU (ORCPT ); Wed, 2 Aug 2017 19:23:20 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:36430 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751944AbdHBXXS (ORCPT ); Wed, 2 Aug 2017 19:23:18 -0400 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.220.163 X-Original-MAILFROM: minchan@kernel.org Date: Thu, 3 Aug 2017 08:23:16 +0900 From: Minchan Kim To: kbuild test robot Cc: Nadav Amit , kbuild-all@01.org, linux-mm@kvack.org, nadav.amit@gmail.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org Subject: Re: [PATCH v6 5/7] mm: make tlb_flush_pending global Message-ID: <20170802232316.GA32020@bbox> References: <20170802000818.4760-6-namit@vmware.com> <201708022224.e3s8yqcJ%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201708022224.e3s8yqcJ%fengguang.wu@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 02, 2017 at 10:28:47PM +0800, kbuild test robot wrote: > Hi Minchan, > > [auto build test WARNING on linus/master] > [also build test WARNING on v4.13-rc3] > [cannot apply to next-20170802] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Nadav-Amit/mm-migrate-prevent-racy-access-to-tlb_flush_pending/20170802-205715 > config: sh-allyesconfig (attached as .config) > compiler: sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 > reproduce: > wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=sh > > All warnings (new ones prefixed by >>): > > In file included from include/linux/printk.h:6:0, > from include/linux/kernel.h:13, > from mm/debug.c:8: > mm/debug.c: In function 'dump_mm': > >> include/linux/kern_levels.h:4:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 40 has type 'int' [-Wformat=] Thanks. lkp. This patch should fix it. >>From 5be44c3cbe0e4149cc8b438f2e3fcad046091a29 Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Tue, 1 Aug 2017 14:04:58 +0900 Subject: [PATCH v6 5/7] mm: make tlb_flush_pending global Currently, tlb_flush_pending is used only for CONFIG_[NUMA_BALANCING| COMPACTION] but upcoming patches to solve subtle TLB flush bacting problem will use it regardless of compaction/numa so this patch doesn't remove the dependency. Cc: Nadav Amit Cc: Mel Gorman Signed-off-by: Minchan Kim --- include/linux/mm_types.h | 21 --------------------- mm/debug.c | 4 ---- 2 files changed, 25 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index c605f2a3a68e..892a7b0196fd 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -487,14 +487,12 @@ struct mm_struct { /* numa_scan_seq prevents two threads setting pte_numa */ int numa_scan_seq; #endif -#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION) /* * An operation with batched TLB flushing is going on. Anything that * can move process memory needs to flush the TLB when moving a * PROT_NONE or PROT_NUMA mapped page. */ atomic_t tlb_flush_pending; -#endif #ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH /* See flush_tlb_batched_pending() */ bool tlb_flush_batched; @@ -528,7 +526,6 @@ extern void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, extern void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end); -#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION) /* * Memory barriers to keep this state in sync are graciously provided by * the page table locks, outside of which no page table modifications happen. @@ -569,24 +566,6 @@ static inline void dec_tlb_flush_pending(struct mm_struct *mm) smp_mb__before_atomic(); atomic_dec(&mm->tlb_flush_pending); } -#else -static inline bool mm_tlb_flush_pending(struct mm_struct *mm) -{ - return false; -} - -static inline void init_tlb_flush_pending(struct mm_struct *mm) -{ -} - -static inline void inc_tlb_flush_pending(struct mm_struct *mm) -{ -} - -static inline void dec_tlb_flush_pending(struct mm_struct *mm) -{ -} -#endif struct vm_fault; diff --git a/mm/debug.c b/mm/debug.c index d70103bb4731..5715448ab0b5 100644 --- a/mm/debug.c +++ b/mm/debug.c @@ -124,9 +124,7 @@ void dump_mm(const struct mm_struct *mm) #ifdef CONFIG_NUMA_BALANCING "numa_next_scan %lu numa_scan_offset %lu numa_scan_seq %d\n" #endif -#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION) "tlb_flush_pending %d\n" -#endif "def_flags: %#lx(%pGv)\n", mm, mm->mmap, mm->vmacache_seqnum, mm->task_size, @@ -158,9 +156,7 @@ void dump_mm(const struct mm_struct *mm) #ifdef CONFIG_NUMA_BALANCING mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq, #endif -#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION) atomic_read(&mm->tlb_flush_pending), -#endif mm->def_flags, &mm->def_flags ); } -- 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f70.google.com (mail-pg0-f70.google.com [74.125.83.70]) by kanga.kvack.org (Postfix) with ESMTP id 8B1CB6B063D for ; Wed, 2 Aug 2017 19:23:19 -0400 (EDT) Received: by mail-pg0-f70.google.com with SMTP id s14so64820458pgs.4 for ; Wed, 02 Aug 2017 16:23:19 -0700 (PDT) Received: from lgeamrelo12.lge.com (LGEAMRELO12.lge.com. [156.147.23.52]) by mx.google.com with ESMTP id z135si20284823pgz.708.2017.08.02.16.23.17 for ; Wed, 02 Aug 2017 16:23:18 -0700 (PDT) Date: Thu, 3 Aug 2017 08:23:16 +0900 From: Minchan Kim Subject: Re: [PATCH v6 5/7] mm: make tlb_flush_pending global Message-ID: <20170802232316.GA32020@bbox> References: <20170802000818.4760-6-namit@vmware.com> <201708022224.e3s8yqcJ%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201708022224.e3s8yqcJ%fengguang.wu@intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: kbuild test robot Cc: Nadav Amit , kbuild-all@01.org, linux-mm@kvack.org, nadav.amit@gmail.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org On Wed, Aug 02, 2017 at 10:28:47PM +0800, kbuild test robot wrote: > Hi Minchan, > > [auto build test WARNING on linus/master] > [also build test WARNING on v4.13-rc3] > [cannot apply to next-20170802] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Nadav-Amit/mm-migrate-prevent-racy-access-to-tlb_flush_pending/20170802-205715 > config: sh-allyesconfig (attached as .config) > compiler: sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 > reproduce: > wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=sh > > All warnings (new ones prefixed by >>): > > In file included from include/linux/printk.h:6:0, > from include/linux/kernel.h:13, > from mm/debug.c:8: > mm/debug.c: In function 'dump_mm': > >> include/linux/kern_levels.h:4:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 40 has type 'int' [-Wformat=] Thanks. lkp. This patch should fix it.