Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4431896ybi; Mon, 3 Jun 2019 10:44:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMDLEIh1J1BhZtHzXIMwRb1EJxS035XOpUFeXcdOE0hP5cBX7+42JJqfFRJfSaHnr6KNVW X-Received: by 2002:a65:6295:: with SMTP id f21mr30837615pgv.416.1559583865123; Mon, 03 Jun 2019 10:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559583865; cv=none; d=google.com; s=arc-20160816; b=gyMf/ybkVmYy0HaxwyU0SFS/jfI8bddJAU6sAOABy5ImeNSoMVncwZnvIs9FYJc0Ud bRG61EsiB/oHfP/7BsM+ezPcxpkQLHtSsUSspLIspWQdPS85Udhoywrj3nhpoGUEuPve GyWx5ijl6rXZcUVNz1lDMRRuhCHB8eBD+0bp6qjOLoEhHdy+G4ARFTyulUUWF+LrlTkQ 1FRV9fobCMohheeeuLe78O1ep5dM3jDvhsnNzRLOZkGkstJBFQJYa25DtlXGrhLNr0gy u9Dpy+eqEtWMfryiJGSGambafyesEZksA8IxZdNZZcoV/wv+CSRPdkGdlOum8XPyDs3g VxEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=Dp0f7RM70f8esYRnlOyhn1PIG0Zw2xqX5j6+lbcs/Ug=; b=qZtD7vEg0JEdh5Bz9FExRQTLCt18g0dEhFg4rZPzhHEeFU0dpmSl2tGg3LDh36B2T9 2kvRR8VjtdLt1gWlGZQ973TJps2l/tUvU8KpW0pSlTr0/b+cNfaCiNgTri0Z09RWd0KE 7HkoeCJz8zaKLsfdaVHonpFr1BdVpGR1/k7CdY8J7G/HLIObpzzU14GQkxRcYEvuxzo4 0nRd6WMkw/aacSzSb8F2dw7q1No4FTTz6M9RcMuRexMiRLKCPKXimjBuYdnuBQIVdWwM LGAaUKw/2EAom7V/81EVTby5uIZbi0zLhHLAA0KgOTmkwd3sowpQJlB5vQRGAkSybSQZ DYSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=ZoKRYuqv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7si15135513pje.56.2019.06.03.10.44.08; Mon, 03 Jun 2019 10:44:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=ZoKRYuqv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729160AbfFCPLc (ORCPT + 99 others); Mon, 3 Jun 2019 11:11:32 -0400 Received: from ozlabs.org ([203.11.71.1]:50211 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729004AbfFCPLc (ORCPT ); Mon, 3 Jun 2019 11:11:32 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 45Hdmv545Hz9s4Y; Tue, 4 Jun 2019 01:11:27 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1559574688; bh=eDuRZMdVYYQROCCGmu+HKfLRFO7Y6eokeOO3l7DvWCo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZoKRYuqvpdEn7yiFycsiV4IDbycT0IPTFEnpBIksDlOrF1XldtLiq+2iloNCVu7Ey 42EgecTyjdqed8SbCbEbfYMj/p0/65mIlJngX8IOIyKbJd4Qd0jh4EKeVX5Fi7KWn8 vboNbS+dur7m6TyeZmY7wvdxsUsume249CrlxODn9R31tYvBiUdYlJrNZHDoqZeLBK zDL9zRUKTqZWCuwO3RoiyergKGDPZm8AIA5NEz7RP1GqBPWLgMdupEiif1PA3OiE64 pJ8Yn3y0KXTDy9VgJjYl9XQsJkt6m7vf0GMQC49wUnE/pcKNFbj00bQYHfzfhHoFhG mz3dWxEa2/9xw== Date: Tue, 4 Jun 2019 01:11:25 +1000 From: Stephen Rothwell To: Krzysztof Kozlowski Cc: Uladzislau Rezki , Andrew Morton , Michal Hocko , linux-mm@kvack.org, Marek Szyprowski , "linux-samsung-soc@vger.kernel.org" , linux-kernel@vger.kernel.org, Hillf Danton , Thomas Gleixner , Tejun Heo , Andrei Vagin Subject: Re: [BUG BISECT] bug mm/vmalloc.c:470 (mm/vmalloc.c: get rid of one single unlink_va() when merge) Message-ID: <20190604011125.266222a8@canb.auug.org.au> In-Reply-To: References: <20190603135939.e2mb7vkxp64qairr@pc636> <20190604003153.76f33dd2@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/ydAB_847pdF8mWcT_YXzIYL"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/ydAB_847pdF8mWcT_YXzIYL Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Krzysztof, On Mon, 3 Jun 2019 16:35:22 +0200 Krzysztof Kozlowski wro= te: > > On Mon, 3 Jun 2019 at 16:32, Stephen Rothwell wrot= e: > > > > On Mon, 3 Jun 2019 16:10:40 +0200 Krzysztof Kozlowski = wrote: =20 > > > > > > Indeed it looks like effect of merge conflict resolution or applying. > > > When I look at MMOTS, it is the same as yours: > > > http://git.cmpxchg.org/cgit.cgi/linux-mmots.git/commit/?id=3Db77b8cce= 67f246109f9d87417a32cd38f0398f2f > > > > > > However in linux-next it is different. > > > > > > Stephen, any thoughts? =20 > > > > Have you had a look at today's linux-next? It looks correct in > > there. Andrew updated his patch series over the weekend. =20 >=20 > Yes, I am looking at today's next. Both the source code and the commit > 728e0fbf263e3ed359c10cb13623390564102881 have wrong "if (merged)" (put > in wrong hunk). OK, I have replaced that commit with this: From: "Uladzislau Rezki (Sony)" Subject: mm/vmalloc.c: get rid of one single unlink_va() when merge It does not make sense to try to "unlink" the node that is definitely not linked with a list nor tree. On the first merge step VA just points to the previously disconnected busy area. On the second step, check if the node has been merged and do "unlink" if so, because now it points to an object that must be linked. Link: http://lkml.kernel.org/r/20190527151843.27416-4-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Hillf Danton Cc: Ingo Molnar Cc: Joel Fernandes Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Roman Gushchin Cc: Steven Rostedt Cc: Tejun Heo Cc: Thomas Garnier Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- mm/vmalloc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) --- a/mm/vmalloc.c~mm-vmap-get-rid-of-one-single-unlink_va-when-merge +++ a/mm/vmalloc.c @@ -719,9 +719,6 @@ merge_or_add_vmap_area(struct vmap_area /* Check and update the tree if needed. */ augment_tree_propagate_from(sibling); =20 - /* Remove this VA, it has been merged. */ - unlink_va(va, root); - /* Free vmap_area object. */ kmem_cache_free(vmap_area_cachep, va); =20 @@ -746,12 +743,11 @@ merge_or_add_vmap_area(struct vmap_area /* Check and update the tree if needed. */ augment_tree_propagate_from(sibling); =20 - /* Remove this VA, it has been merged. */ - unlink_va(va, root); + if (merged) + unlink_va(va, root); =20 /* Free vmap_area object. */ kmem_cache_free(vmap_area_cachep, va); - return; } } _ Which is the patch from mmots but with different line numbers. --=20 Cheers, Stephen Rothwell --Sig_/ydAB_847pdF8mWcT_YXzIYL Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAlz1OJ0ACgkQAVBC80lX 0Gy1Awf8CHdwemQ/KgeILWHLGe2zYZfMlga1K+adEnhVDxrxEryZFGJiRTFghndD y2UPZLjUfSTmwmZwmUydCCNYHem0/M89nP6f6o2GYHtg3wQJKSVzDE7JXssQ0+p/ DMtYxHL8VCKIzTU250tEC2kzxU+9IXwflrLHuLLEaWYmbtgudEpUdFr0xWGbGPh7 17rGAfC7A+rJY3DoomLyJfsGYID6dbHewlghDzEPvNLziVfsAZH35bmzAnwEs3vv hZhB8TZb8Lj5U4e3JT6SqVBON96IAkOj2Ti5QaeEyjXrmrQuyZ57xy+yaZmTpmLj yFnHYZX/pQ2pSj41p4nS1joBmTaVOQ== =XHt+ -----END PGP SIGNATURE----- --Sig_/ydAB_847pdF8mWcT_YXzIYL--