Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4404877imd; Tue, 30 Oct 2018 01:06:21 -0700 (PDT) X-Google-Smtp-Source: AJdET5csAOBOMUWU+RDptj10FKSxiRIuDjAykB5vNeNccQox0gqalWrXg3G3RIlsNuJ3MLYTDqVB X-Received: by 2002:a62:6801:: with SMTP id d1-v6mr1894102pfc.7.1540886781413; Tue, 30 Oct 2018 01:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540886781; cv=none; d=google.com; s=arc-20160816; b=K83gozXbo63QcQIxPJyeWgz3TR2kW1dyiB9VINmL2OgD/PkAbI9MrBJHrGwBljJKCg iCwZLSwWxLaRgNnwhUeaur9MnJT0hhzcAoso4TvOw9G3gJR9ASqrTvWbQl0cHO4esQk6 z9wC3KClE83v3fglakmih4PcRvb/iG4WoI0Skp9xJw2IWIz7xXehsbZzdMmQjg8NTgNz 6ZHkFwP3eZy0gTYUoLtnzzakvsV2XP91c2U8WPB+uEDoIJx9/QzIv5thLGlsfQ5vktMt gtEb3oxnGYpt+vrfviJgUPvy/aIK4hmsNoYs/xFFfYIUNDiw/byb0eR2ffIqkojRoTg5 qqUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3hAtsfc7OQxU+0gPWdO5gJRoTMpwnx03O00HTPOgQ98=; b=qgd4Hr0SwKNqnan0piwZS5JLchgDknZRbBbv9Fom2vUwwWyWAs2ITnILk+ooilb6g8 qNKMIHFDot631sTFqK3LsaTM8vndKr4+SsWdpI8UcVLHUXyoAQdhPF18gM/4a4wE/rjX RIzz9KFNL3fZGoLn53mhlPkovR/rvYwbw3Urhtz9jDVF8Xe6HNVh7cgHX/RzK76C032f UCMFC7EmrGIqIMYcDeaE6S6LfhIu0R1iJeTECixBVmQTALG6NIs82P4do3aEncvpmfVJ FXn3+P6XPEIhy+Rzg0ISrmNhZvzf8bQanaPPhJ3GRq1rI+IQry/VkmSD6l5U7nGMfknL Dcbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o2iyJZ6E; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2-v6si9923083pfg.10.2018.10.30.01.06.03; Tue, 30 Oct 2018 01:06:21 -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=@gmail.com header.s=20161025 header.b=o2iyJZ6E; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726336AbeJ3Q6F (ORCPT + 99 others); Tue, 30 Oct 2018 12:58:05 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:33618 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726172AbeJ3Q6F (ORCPT ); Tue, 30 Oct 2018 12:58:05 -0400 Received: by mail-pg1-f193.google.com with SMTP id q5-v6so1542337pgv.0 for ; Tue, 30 Oct 2018 01:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3hAtsfc7OQxU+0gPWdO5gJRoTMpwnx03O00HTPOgQ98=; b=o2iyJZ6ENsVdWU5fYTvdgzoqJGrqffvkJj5LRjWjjyo5ZMNXvvX+lAGmNlEW7oOeBa iweSLp/o5IH1YPhw9w17vqZyU+bmljZePBkMb0Zyy2bfhcIHB8SC1SRLtD2wczR9jVDj 41alpjYy0PpqMTeMJpKicNonIDiiZis156RGFOzuQnl9MPpCMEhpGinKhgZpZld9Ixkp ETGYo/4aije3rFpKbuj6zOp3pPjD7zrTxIUvSgvGS/lNmsVB3pVB/MACLuTXh7NBa+fb x2CEQXzy1yJym4ixlJDBNJCpoEQMyYqzF6E94VCT34XRpJAdBgtOAh/Ah/LbYyVtdjfx uwfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3hAtsfc7OQxU+0gPWdO5gJRoTMpwnx03O00HTPOgQ98=; b=dkrUM5aafYzZM/3SYY1E3pieTsPFmetPf/wRimphLNR+84aaqyYpw2uZK1zMTHj8S0 /tXZS4PcY80w+wNvDtHY/ynX1gJO9ie69BFVo2HycmHuskY2o8XTeI7aaZ8YNsI/oK6L 2c18xfbVb5I3YkJFbIraIb9TCVBg1r1FVfbZ2Ajv6xqdFrYmVlPjHiPY3z16k+/5VwvM ebtTx6H9ppuT2kRC24b9Qx2LMIcy201yNdvb9g+sWuHRwgI1FE9+h8xZ+Qc9KjA3wJtF /7xXbdZFIaPNdKFO4h7rxjTK43wcqJJ5o2FXoqsZIjmGCpJgd6okphDtBh7AoEiqRGjg 2Y1A== X-Gm-Message-State: AGRZ1gIGsO8k6Xwr8XGnz0oUHWBe/w/FEWnHW+FgyDzcoE3MKqsSBdho iUOV6xYwllD/+OR9XiM9CNQHh47qQbE6oSaSGWw= X-Received: by 2002:a62:1d92:: with SMTP id d140-v6mr1846665pfd.157.1540886740179; Tue, 30 Oct 2018 01:05:40 -0700 (PDT) MIME-Version: 1.0 References: <20181011085509.GS5873@dhcp22.suse.cz> <6f32f23c-c21c-9d42-7dda-a1d18613cd3c@linux.intel.com> <20181017075257.GF18839@dhcp22.suse.cz> <971729e6-bcfe-a386-361b-d662951e69a7@linux.intel.com> <20181029141210.GJ32673@dhcp22.suse.cz> <84f09883c16608ddd2ba88103f43ec6a1c649e97.camel@linux.intel.com> <20181029163528.GL32673@dhcp22.suse.cz> <18dfc5a0db11650ff31433311da32c95e19944d9.camel@linux.intel.com> <20181029172415.GM32673@dhcp22.suse.cz> <8e7a4311a240b241822945c0bb4095c9ffe5a14d.camel@linux.intel.com> <20181029181827.GO32673@dhcp22.suse.cz> <3281f3044fa231bbc1b02d5c5efca3502a0d05a8.camel@linux.intel.com> In-Reply-To: <3281f3044fa231bbc1b02d5c5efca3502a0d05a8.camel@linux.intel.com> From: Oscar Salvador Date: Tue, 30 Oct 2018 09:05:27 +0100 Message-ID: Subject: Re: [PATCH v5 4/4] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap To: Alexander Duyck Cc: Michal Hocko , Dan Williams , Linux Memory Management List , Andrew Morton , LKML , linux-nvdimm@lists.01.org, Pavel Tatashin , dave.hansen@intel.com, Jerome Glisse , Mike Rapoport , mingo@kernel.org, "Kirill A. Shutemov" , yi.z.zhang@linux.intel.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Yes, the hotplug lock was part of the original issue. However that > starts to drift into the area I believe Oscar was working on as a part > of his patch set in encapsulating the move_pfn_range_to_zone and other > calls that were contained in the hotplug lock into their own functions. While reworking it for my patchset, I thought that we can move move_pfn_range_to_zone out of hotplug lock. But then I __think__ we would have to move init_currently_empty_zone() within the span lock as zone->zone_start_pfn is being touched there. At least that is what the zone locking rules say about it. Since I saw that Dan was still reworking his patchset about unify HMM/devm code, I just took one step back and I went simpler [1]. The main reason for backing off was I felt a bit demotivated due to the lack of feedback, and I did not want to interfer either with your work or Dan's work. Plus I also was unsure about some other things like whether it is ok calling kasan_add_zero_shadow/kasan_remove_zero_shadow out of the lock. So I decided to make less changes in regard of HMM/devm. Unfortunately, I did not get a lot of feedback there yet. Just some reviews from David and a confirmation that fixes one of the issues Jonathan reported [2]. > > I was hoping to wait until after Dan's HMM patches and Oscar's changes > had been sorted before I get into any further refactor of this specific > code. I plan to ping the series, but I wanted to give more time to people since we are in the merge window now. [1] https://patchwork.kernel.org/cover/10642049/ [2] https://patchwork.kernel.org/patch/10642057/#22275173