Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1610001ybt; Sat, 11 Jul 2020 16:38:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHQMaenQIbf/cG32dMR9/fHfSb7zVnfKGSip/EtwzSH7xTZkkD2fSjiG2CrHhvHAfXb3Yn X-Received: by 2002:a50:ee84:: with SMTP id f4mr81887544edr.183.1594510708861; Sat, 11 Jul 2020 16:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594510708; cv=none; d=google.com; s=arc-20160816; b=DATLKWGXmMbtMH53FJI9w7nitcPgCm2PphHXiHEsAoQuiRa61YUqaOpBybz1/LEpCE Zl2gYxxcdZ+6lFNFZRxvNmkR9YCI2ovYctH+Jyc/kIbiqBbEpRPeM9zGsKXSAvHSQNNs /NlBcMfOWHhL6oJPCv0+qDPY9tzxw7q+bYBR7bIsLg9WPwlks2wvy94ACV0heDDTAWbD dQuOgmWThc8L5Ipu50ShK3iqiQJjwRPBUzDN833e8uuxxVH6Kcwx3n72Z8U+jjV1I+SX ZnpW8Z81KnIxRdLa7a/A2W5KTGiGnP8UEf71E9Uf5ddIvC8Eya2FSQRRkBYL9/m/uCuJ FxNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=7z7xL3EKlTOURA9bJmOChBRDZVPEDiiwDdwRoGoh3tU=; b=YYkIQckzV9IN1wKdM25tt0FsQVHop7H/zai3MNxoVnXYe5HlZpgdZZKojfhh504NGJ xkhG2FvD9mfcAmyGd2L+XMhPfk9+PGti7RaswwTqROK0f/REFeJCYsxfjwiW1FcyuGOG 8O53j8YiN8oApu0RfM3XPRVCrJCIcypu3CyKwORUF25N5mymlm3bCr/21EBgI7COM5z5 0kuNG70Xv9c29908l5Z8UOrJT1dI3opaFPIOFeu48avYeLOp0TPGkaYLEzPttVQYMPMD yohYDSkoKhfRJolkDYP1i5lKKxoAvcyQbdUdMlOXTFmdrT9ZLnYLblq64eiPjpI/EeAb TyYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=qIl9b9zm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si6676256eds.349.2020.07.11.16.38.06; Sat, 11 Jul 2020 16:38:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=qIl9b9zm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727998AbgGKXdq (ORCPT + 99 others); Sat, 11 Jul 2020 19:33:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726939AbgGKXdq (ORCPT ); Sat, 11 Jul 2020 19:33:46 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24F85C08C5DD for ; Sat, 11 Jul 2020 16:33:46 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id 145so8906596qke.9 for ; Sat, 11 Jul 2020 16:33:46 -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=deBiYSFyQT1Yt6R+QMwYHw5PXAgh5VZcUDJn57WaJizhTDlB96ggm/letBlG8UA9BV 4INzxnyZUI1FiRaXb75Q1pI25uJCShGH3wF99oY4Ns+oLZdSVegyKlgTAzJy7nhVgxaB jsXyqgjim5U1vGkVRTU5bTRmeDAbUWfWDd+OSg22N7EJbH+E6bxtV6O/trp8f8kXJ0JT PsaDKuqMIq83zFLwuQY7aMsF93g7U24NYWoTl7QyIRlrb5XfIuIEh9OSQ9xgI4hS25HX Z7vymJZph/8FThDj5LONer9/mhppWlcHoIHgCaggppUrCnbEDmZdNepkJTqsBTL8sc2L Znow== X-Gm-Message-State: AOAM530JqqapeAW/YwkJ2N+e4+BDp2HYlgXB5+odMxTpJ1EhOOIpBQ71 AIixULUo9VV6vagg8VhXGFWjjg== 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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