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=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 49413C433E1 for ; Sat, 11 Jul 2020 23:33:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E60A42070B for ; Sat, 11 Jul 2020 23:33:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="qIl9b9zm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E60A42070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 36B1C6B0002; Sat, 11 Jul 2020 19:33:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 31B8F6B0005; Sat, 11 Jul 2020 19:33:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 20A366B0006; Sat, 11 Jul 2020 19:33:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id 0A2476B0002 for ; Sat, 11 Jul 2020 19:33:47 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6E350180AD81D for ; Sat, 11 Jul 2020 23:33:46 +0000 (UTC) X-FDA: 77027399652.08.copy76_17072b626edb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 457871819E798 for ; Sat, 11 Jul 2020 23:33:46 +0000 (UTC) X-HE-Tag: copy76_17072b626edb X-Filterd-Recvd-Size: 6540 Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Sat, 11 Jul 2020 23:33:45 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id e11so8945079qkm.3 for ; Sat, 11 Jul 2020 16:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7z7xL3EKlTOURA9bJmOChBRDZVPEDiiwDdwRoGoh3tU=; b=qIl9b9zmh8XbF0q286w8Bb/Rp5f+QT1YVrRvjp3Y9+n1lXT15pyXWbNXNkzL0XJ6mA OKDXVRfdHQb173yeYwpNkVXRqypw5lYX9Y0PSvjbeMceKFi6++/t3q2LLKlk2cPos5jW 4gCYisSVRcsDinG3Oz8HOfKRGyBGwziTFY1Kw= 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=7z7xL3EKlTOURA9bJmOChBRDZVPEDiiwDdwRoGoh3tU=; b=afPJsQeSTEhTxuCLQW7gSUbSmHZt+g//fAdH2EC9lKyqDCknU2uBbH8YW1mDDHSvud Ks40H64CLzMcFNpc4CUR9nphIngFiOZgNJE7Ui7kvhG+9pSEmcF/8X6BlbIyby4vfZqo QKhjGsTvzOCBMFZW9dntx6O/U/gmJ4DKARpWoJF0KJ4HXqjyzl8vtFDM0a1cQ9j8b0RX M5pYm+VbMM2ZbUdbu4dK2DEWmlj9kljnRPatPMxI4NBh6NPs05Huq/m1lA1UlOV0YpFD VuPCSJrfEHYeYGf1sibdIA0TzcA15JwpYvOYbi7C0jNRZvHwp+mE+V0mZuMRfVr2MRsy T3uA== X-Gm-Message-State: AOAM531O8D/HFB1FTyueOyYhptUI+iG5ZelDyudxOfBz1Sbd0t0JvPi4 e7wHl0SJkYENjkQankwWiz28gg== X-Google-Smtp-Source: ABdhPJzBXhmcVKPBjv4vWy1ZtmSU6d30YNUnZS4J3IZmJkvxaNowyVwLPDWdMWEwfihLoLS8ivO2Zw== X-Received: by 2002:a37:c40a:: with SMTP id d10mr50674650qki.110.1594510425183; Sat, 11 Jul 2020 16:33:45 -0700 (PDT) Received: from localhost ([2620:15c:6:12:cad3:ffff:feb3:bd59]) by smtp.gmail.com with ESMTPSA id e23sm12603012qkl.55.2020.07.11.16.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jul 2020 16:33:44 -0700 (PDT) Date: Sat, 11 Jul 2020 19:33:44 -0400 From: Joel Fernandes To: Linus Torvalds Cc: Naresh Kamboju , "Kirill A. Shutemov" , William Kucharski , linux- stable , open list , linux-mm , Arnd Bergmann , Andrew Morton , Roman Gushchin , Michal Hocko , lkft-triage@lists.linaro.org, Chris Down , Michel Lespinasse , Fan Yang , Brian Geffon , Anshuman Khandual , Will Deacon , Catalin Marinas , pugaowei@gmail.com, Jerome Glisse , Greg Kroah-Hartman , Mel Gorman , Hugh Dickins , Al Viro , Tejun Heo , Sasha Levin , Oleg Nesterov Subject: Re: WARNING: at mm/mremap.c:211 move_page_tables in i386 Message-ID: <20200711233344.GB2608903@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 457871819E798 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 Sat, Jul 11, 2020 at 11:12:58AM -0700, Linus Torvalds wrote: > On Sat, Jul 11, 2020 at 10:27 AM Naresh Kamboju > wrote: > > > > I have started bisecting this problem and found the first bad commit > > Thanks for the effort. Bisection is often a great tool to figure out > what's wrong. > > Sadly, in this case: > > > commit 9f132f7e145506efc0744426cb338b18a54afc3b > > Author: Joel Fernandes (Google) > > Date: Thu Jan 3 15:28:41 2019 -0800 > > > > mm: select HAVE_MOVE_PMD on x86 for faster mremap > > Yeah, that's just the commit that enables the code, not the commit > that introduces the fundamental problem. > > That said, this is a prime example of why I absolutely detest patch > series that do this kind of thing, and are several patches that create > new functionality, followed by one patch to enable it. > > If you can't get things working incrementally, maybe you shouldn't do > them at all. Doing a big series of "hidden work" and then enabling it > later is wrong. > > In this case, though, the real patch that did the code isn't that kind > of "big series of hidden work" patch series, it's just the (single) > previous commit 2c91bd4a4e2e ("mm: speed up mremap by 20x on large > regions"). > > So your bisection is useful, it's just that it really points to that > previous commit, and it's where this code was introduced. Right, I think I should have squashed the enabling of the config, and the introduction of the feature in the same patch, but as you pointed that probably would not have made a difference with this bisect since this a single patch. > It's also worth noting that that commit doesn't really *break* > anything, since it just falls back to the old behavior when it warns. Agreed, I am also of the opinion that the patch is likely surface an existing issue and not introducing a new one. > So to "fix" your test-case, we could just remove the WARN_ON. > > But the WARN_ON() is still worrisome, because the thing it tests for > really _should_ be true. I'll get some tracing in an emulated i386 environment going and try to figure out exactly what is going on before the warning triggers. thanks for the other debug hints in this thread! thanks, - Joel - Joel