Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp591768imm; Fri, 13 Jul 2018 03:00:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfqbh7KZ+EmhX0HixjZ55xF9gsWlXcNufFLIz29QBqT5m/cZOQzro4SSY59/6/KPJzNus7U X-Received: by 2002:a65:538e:: with SMTP id x14-v6mr5393675pgq.388.1531476036099; Fri, 13 Jul 2018 03:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531476036; cv=none; d=google.com; s=arc-20160816; b=TaQxwv+a5gVHCLHA8LslADeHO9+n34dQVWbdLOfSrIvFZXG8CovMbYM0KwdOQoukqA LBj9u95hs1o4mEXmIGBh+L+t65FVxmv02XubQTLXWSncHe9lqlNd1CVxtrzKBUMCpdHY ad5AwYOTpL4JIlsBA7OgiNbStcJjJEbBQNk7yCKNvE915a6ujT0y+cKRoGvKAEfdwQoJ Q+ha1hWnmKQo6LeRoKkI89Yct3fLtsvgnGQFQkZhQe7oB8ifSGSBXqYW5RRfTZiRxfIS rQhQ7eBeNwNdXAt6pgxNVM2dFNF/heShJTi5XEQHVVHpoHZyh4FnJSd5b7C9RaOa4F9L Ni2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=yd+TJjfYDAfzyk8goi04k6a79sq12zGGSkOEEsysC28=; b=M0PrQXgHNf2JKmlSPaB74WAGLWckd2W7euJPtG/bQCV7sanuc1Pxj1qdjekmA+8Yfe xjOpoW4ReI16N+6Y1vfD7LmGKGi2j4TTS8t3kP1QpCSXtBJdGh2V5zAPIXtMF+OIq1Aq nxEHhbSnXqEtce83gyjcCRIn3duRcD9/PlacZdpEVXdMoEVSCTblXCGXDKZ2Cb4xpoX7 YkwBaRj0CVfPkcFRFVC20GUATeX8b3zIVp6TXm5hl9aCeXGT5blgJv+Gxp8k68/bS4I9 xFOk7qN/l19zFBZeLzkvO5wKX1XXT0R1hq1BiYCwADDgl4xlJ8OnRzQ5qA3gX9IcPLco TBDA== ARC-Authentication-Results: i=1; mx.google.com; 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 f59-v6si23974884plf.500.2018.07.13.03.00.20; Fri, 13 Jul 2018 03:00:36 -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; 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 S1728289AbeGMKNe (ORCPT + 99 others); Fri, 13 Jul 2018 06:13:34 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46483 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727040AbeGMKNe (ORCPT ); Fri, 13 Jul 2018 06:13:34 -0400 Received: by mail-wr1-f65.google.com with SMTP id s11-v6so24508967wra.13 for ; Fri, 13 Jul 2018 02:59:36 -0700 (PDT) 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:user-agent; bh=yd+TJjfYDAfzyk8goi04k6a79sq12zGGSkOEEsysC28=; b=b4GoJ4V1W/AxjsbpU91Z51Xey8bxP4V4ysWH4KFmItJSyqvGZKi0GqsrMLyuLQo4ZQ XInJIXDdNcagYXT82wQHiYNL9tZZe/TTCOVZTbYXVElRhYKsi7XXDR5ZFNIk6MaXjoh1 SoNnwZWDqXBzQ7roiKCAsKicdzMYgO3pUzOJGWAQrKV0TVsRsFz4kseD7okbryTQzyEW M9IkjsM8+p8ake+tvw3Tw6368I6j0tQiHpxLujZ8qZnGsy32njypZb6A+KF4Y5U9lN9V DuIA6me9gtHUSx4CXRYQDDQuV+Q2oY6J+eY/FWY4YPFlzwo9R/dbuL+HxPcH3yWg/L3P ou/Q== X-Gm-Message-State: AOUpUlF66g/zGK0t3WpWGtfQqMEVOncVtgy1aI9rMRaj8xT8mCsNh+ag njupnSk2WzEWHlPxrBC6sHU= X-Received: by 2002:adf:ba12:: with SMTP id o18-v6mr4594173wrg.249.1531475976326; Fri, 13 Jul 2018 02:59:36 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id n8-v6sm34878383wrt.56.2018.07.13.02.59.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 02:59:35 -0700 (PDT) Received: by techadventures.net (Postfix, from userid 1000) id 07E86123EBC; Fri, 13 Jul 2018 11:59:35 +0200 (CEST) Date: Fri, 13 Jul 2018 11:59:34 +0200 From: Oscar Salvador To: Pavel Tatashin Cc: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, mhocko@suse.com, linux-mm@kvack.org, dan.j.williams@intel.com, jack@suse.cz, jglisse@redhat.com, jrdr.linux@gmail.com, bhe@redhat.com, gregkh@linuxfoundation.org, vbabka@suse.cz, richard.weiyang@gmail.com, dave.hansen@intel.com, rientjes@google.com, mingo@kernel.org, abdhalee@linux.vnet.ibm.com, mpe@ellerman.id.au Subject: Re: [PATCH v5 0/5] sparse_init rewrite Message-ID: <20180713095934.GB15039@techadventures.net> References: <20180712203730.8703-1-pasha.tatashin@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180712203730.8703-1-pasha.tatashin@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 12, 2018 at 04:37:25PM -0400, Pavel Tatashin wrote: > Changelog: > v5 - v4 > - Fixed the issue that was reported on ppc64 when > CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER is removed > - Consolidated the new buffer allocation between vmemmap > and non-vmemmap variants of sparse layout. > - Removed all review-by comments, because I had to do > significant amount of changes compared to previous version > and need another round of review. > - I also would appreciate if those who reported problems with > PPC64 could test this change. About PPC64, your patchset fixes the issue as the population gets followed by a sparse_init_one_section(). It can be seen here: Before: kernel: vmemmap_populate f000000000000000..f000000000004000, node 0 kernel: * f000000000000000..f000000000010000 allocated at (____ptrval____) kernel: vmemmap_populate f000000000000000..f000000000008000, node 0 kernel: * f000000000000000..f000000000010000 allocated at (____ptrval____) kernel: vmemmap_populate f000000000000000..f00000000000c000, node 0 kernel: * f000000000000000..f000000000010000 allocated at (____ptrval____) After: kernel: vmemmap_populate f000000000000000..f000000000004000, node 0 kernel: * f000000000000000..f000000000010000 allocated at (____ptrval____) kernel: vmemmap_populate f000000000000000..f000000000008000, node 0 kernel: vmemmap_populate f000000000000000..f00000000000c000, node 0 kernel: vmemmap_populate f000000000000000..f000000000010000, node 0 kernel: vmemmap_populate f000000000010000..f000000000014000, node 0 kernel: * f000000000010000..f000000000020000 allocated at (____ptrval____) As can be seen, before the patchset, we keep calling vmemmap_create_mapping() even if we populated that section already, because of vmemmap_populated() checking for SECTION_HAS_MEM_MAP. After the patchset, since each population is being followed by a call to sparse_init_one_section(), when vmemmap_populated() gets called, we have SECTION_HAS_MEM_MAP already in case the section was populated. -- Oscar Salvador SUSE L3