From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752264AbcJLEef (ORCPT ); Wed, 12 Oct 2016 00:34:35 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54375 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751905AbcJLEe2 (ORCPT ); Wed, 12 Oct 2016 00:34:28 -0400 From: "Aneesh Kumar K.V" To: kernel test robot Cc: lkp@01.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org Subject: Re: [mm] c4344e8035: WARNING: CPU: 0 PID: 101 at mm/memory.c:303 __tlb_remove_page_size+0x25/0x99 In-Reply-To: <57fd4fd5.kG/XPlHvJ/oBp+pH%xiaolong.ye@intel.com> References: <57fd4fd5.kG/XPlHvJ/oBp+pH%xiaolong.ye@intel.com> Date: Wed, 12 Oct 2016 10:04:18 +0530 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16101204-0044-0000-0000-0000016F6B46 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005896; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000186; SDB=6.00767204; UDB=6.00367060; IPR=6.00543355; BA=6.00004803; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012956; XFM=3.00000011; UTC=2016-10-12 04:34:25 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16101204-0045-0000-0000-0000059C7944 Message-Id: <87bmyqb2yd.fsf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-12_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=5 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610120074 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kernel test robot writes: > FYI, we noticed the following commit: > > https://github.com/0day-ci/linux Aneesh-Kumar-K-V/mm-Use-the-correct-page-size-when-removing-the-page/20161012-013446 > commit c4344e80359420d7574b3b90fddf53311f1d24e6 ("mm: Remove the page size change check in tlb_remove_page") > > in testcase: boot > > on test machine: qemu-system-i386 -enable-kvm -cpu Haswell,+smep,+smap -m 360M > > caused below changes: > > > +------------------------------------------------+------------+------------+ > | | eff764128d | c4344e8035 | > +------------------------------------------------+------------+------------+ > | boot_successes | 59 | 0 | > | boot_failures | 0 | 43 | > | WARNING:at_mm/memory.c:#__tlb_remove_page_size | 0 | 43 | > | calltrace:SyS_execve | 0 | 43 | > | calltrace:run_init_process | 0 | 21 | > +------------------------------------------------+------------+------------+ > > > > [ 4.096204] Write protecting the kernel text: 3148k > [ 4.096911] Write protecting the kernel read-only data: 1444k > [ 4.120357] ------------[ cut here ]------------ > [ 4.121078] WARNING: CPU: 0 PID: 101 at mm/memory.c:303 __tlb_remove_page_size+0x25/0x99 > [ 4.122380] Modules linked in: > [ 4.122788] CPU: 0 PID: 101 Comm: run-parts Not tainted 4.8.0-mm1-00315-gc4344e8 #5 > [ 4.123956] bd145dc4 b111e5e6 bd145de0 b10320dc 0000012f b10974d1 bd145e70 c4954170 > [ 4.125277] c4954170 bd145df4 b103215f 00000009 00000000 00000000 bd145e04 b10974d1 > [ 4.126424] c4954170 bd145e70 bd145e14 b10263ca bd145e70 bd47bafc bd145e40 b109767a > [ 4.127622] Call Trace: Thanks for the report. The below change should fix this. commit 18c929e7cf672da617dc218c6265366bf78b1644 Author: Aneesh Kumar K.V Date: Wed Oct 12 08:40:41 2016 +0530 update mmu gather page size before flushing page table cache diff --git a/mm/memory.c b/mm/memory.c index 26d1ba8c87e6..7e7eccb82a2b 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -526,7 +526,11 @@ void free_pgd_range(struct mmu_gather *tlb, end -= PMD_SIZE; if (addr > end - 1) return; - + /* + * We add page table cache pages with PAGE_SIZE, + * (see pte_free_tlb()), flush the tlb if we need + */ + tlb_remove_check_page_size_change(tlb, PAGE_SIZE); pgd = pgd_offset(tlb->mm, addr); do { next = pgd_addr_end(addr, end);