From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A623FC2BA17 for ; Thu, 2 Apr 2020 13:38:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 489AE206E9 for ; Thu, 2 Apr 2020 13:38:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="ZtUyWy0R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 489AE206E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 948818E0008; Thu, 2 Apr 2020 09:38:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F9F68E0007; Thu, 2 Apr 2020 09:38:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7E8A18E0008; Thu, 2 Apr 2020 09:38:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0241.hostedemail.com [216.40.44.241]) by kanga.kvack.org (Postfix) with ESMTP id 637868E0007 for ; Thu, 2 Apr 2020 09:38:53 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2995B52B3 for ; Thu, 2 Apr 2020 13:38:53 +0000 (UTC) X-FDA: 76663020546.22.lift51_6aa36af63a73b X-HE-Tag: lift51_6aa36af63a73b X-Filterd-Recvd-Size: 5372 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Apr 2020 13:38:52 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id n17so3247306lji.8 for ; Thu, 02 Apr 2020 06:38:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Exs+wcW8pqgTK370fZw+VgeJY6A05eU9Q6JVvMKSZ5A=; b=ZtUyWy0R2Z5oSIViPZp5LZkLeggJSxUyZnS7rn5QBfuXfMm36UY64CFejQ6rDLK27M ck8f+uK76r+ypnQb1eJ+r2wYJfzjan9U6qOtBrsZMq3xFfGa9VZBO2JSPc9uY//+e8x/ JKda+C2ufhRLa2BYr2vvq3BbYpG/BLEKZoUnabqg/dzTitex1dkSJK4M9AGMjwBXU3vq U8vW18JxWxqvX3y1ts5f2RGJYrp0xV6XHvrN7jh9XmkobXSel3F2PKWjzqIfRz6iIvLZ nDa6+bCrIWFQHWmdv8ICJSpVgdj64W2zx7uDldTa26YxVxR00sH9NOK4VISRbR8+ATsN EqoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Exs+wcW8pqgTK370fZw+VgeJY6A05eU9Q6JVvMKSZ5A=; b=BPsXtFc+cllnOyU+GPBnqtuG0zO2FrMBozIPPUVG2v96fpM0J2eKIDDcQAPHvPAN95 IuAPdo8e1Oo7P2nbfQiasbgG9UzvJ5CGxcfn9bijJt7ZIEVxvidDhKmmOVEbf8Akpoq5 Em6ZCmKwaNYAWh9KTyI+l1OImkmcIsUH1oC3H04JhfenVmkR0zgVZD5UsEjavCjol45w Co6u0SP9pf+ixCp7fHP+GH3Zwn05rryNJkd4jJ6eF4kxdiIQuvGbyKehI1fSq+d576sW L2c1+FWd8aMNahgYbSknI9oENkouRoTQmWOTWW7Wqzp+rN1mUGz7fivM6FBlJoV2OXYp jZRQ== X-Gm-Message-State: AGi0PubRJ97Xvf50gclzFer7SYYSwzzwpoQLGF1OfncPQzqEKvojdC7o PxviN99TFjW7Qn9ISz+u+4i6Qg== X-Google-Smtp-Source: APiQypJKLmrPDaM+SDnr4wmawnXsXtnQLFd7hmufLkhv5z3INZXRH64Iqc60CAZAwjstSbK8pKN4qQ== X-Received: by 2002:a2e:884d:: with SMTP id z13mr2088608ljj.158.1585834731008; Thu, 02 Apr 2020 06:38:51 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id m193sm1960052lfa.39.2020.04.02.06.38.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 06:38:49 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 204491020A6; Thu, 2 Apr 2020 16:38:49 +0300 (+03) Date: Thu, 2 Apr 2020 16:38:49 +0300 From: "Kirill A. Shutemov" To: Naresh Kamboju Cc: Andrew Morton , linux- stable , linux-mm , "Joel Fernandes (Google)" , William Kucharski , Julia Lawall , Michal Hocko , Will Deacon , Greg Kroah-Hartman , lkft-triage@lists.linaro.org, Mike Kravetz , LTP List Subject: Re: mm/mremap.c : WARNING: at mm/mremap.c:211 move_page_tables+0x5b0/0x5d0 Message-ID: <20200402133849.mmkvekzx37kw4nsj@box> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 02, 2020 at 04:49:02PM +0530, Naresh Kamboju wrote: > While running LTP mm thp01 test case on i386 kernel running on x86_64 device > the following kernel warning was noticed multiple times. > > This issue is not new, > we have noticed on stable-rc 5.4, stable-rc 5.5 and stable-rc 5.6 branches. > FYI, CONFIG_HAVE_MOVE_PMD=y is set on > and total memory 2.2G as per free output. > > steps to reproduce: > -------------------- > boot i386 kernel on x86_64 device, > cd /opt/ltp > ./runltp -f mm > thp01.c:98: PASS: system didn't crash. > thp01.c:98: PASS: system didn't crash. > thp01.c:98: PASS: system didn't crash. > > [ 207.317499] ------------[ cut here ]------------ > [ 207.322153] WARNING: CPU: 0 PID: 18963 at mm/mremap.c:211 > move_page_tables+0x5b0/0x5d0 > Kernel config: > https://builds.tuxbuild.com/RJ9BGpsgfPfj3Sfje8oLSw/kernel.config Interesting. I suspect it's related to 2-level page tables in this configuration. But I cannot immediately see how. Could you test if enabling HIGHMEM64 fixes the issue? Below is patch that prints some additional info: diff --git a/mm/mremap.c b/mm/mremap.c index d28f08a36b96..065d5ec3614a 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -208,8 +208,14 @@ static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr, * The destination pmd shouldn't be established, free_pgtables() * should have release it. */ - if (WARN_ON(!pmd_none(*new_pmd))) + if (WARN_ON(!pmd_none(*new_pmd))) { + dump_vma(vma); + printk("old_addr: %#lx, new_addr: %#lx, old_end: %#lx\n", + old_addr, new_addr, old_end); + printk("old_pmd: %#lx", pmd_val(*old_pmd)); + printk("new_pmd: %#lx", pmd_val(*new_pmd)); return false; + } /* * We don't have to worry about the ordering of src and dst -- Kirill A. Shutemov