Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp488549imm; Fri, 28 Sep 2018 01:45:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV635y306qG4WM2QReNf7AFSYOM8nOl94cOJ1fC99F9F4Nz94+VDim4R8LJ9zL0ZJ8tkFhAa1 X-Received: by 2002:a17:902:b78c:: with SMTP id e12-v6mr15134477pls.67.1538124336471; Fri, 28 Sep 2018 01:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538124336; cv=none; d=google.com; s=arc-20160816; b=hJsmEi+BhdvNtQGPiwExaWKgGMDlFNLc+Vp/i7n+dy3zuzuI8CtR0gwCCd0RianVtB jTQ5bOHHBSG3xNcXV2mVps/GiiQ8qLoy+U77bi07Vw/KIVLfrj8/Ao/xcHERrkhF+bLC zHSul+7WR27AisH0ecri3jrScauAporc0+5hFRsF2+0dahqKYnLKyVjCgCEkBYEflPKk DcO8UTiFwX8TO8TUu19iKuK/rJVEuQZmqxyNan5mMitcfSb90LHf8Q3Z5pHLbd8aMw2u +lU2Tdlbx5nB7tOG91vnAIGDvaw4qtbbZxyFN7GFQ2HlTZiPlGCRHISDytZeWp04zaby LNpg== 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; bh=hgPTyuL/K6XQ+9Dn2zgnf3qSRYQrFEhVoTHJ5knCE5c=; b=0jF4IRCI1AvI42snVR/8oJwR2ghAm1a/2bcJ8AQmqWWA1bSPdX/bS/pQ4uG3t6goXt HOTFcgqATKxb285HwVuvu2p/GsItotfbzjko7my9mAWGv1JUY4rx6Gux3SFh9MyIyUlm n/S/XYvg/qGoR1rO/l2bGe9DkuyhgrVW/lxQ2qBt05nfMTxyozUHtVAbV+Lz6UHtbwa2 dBleSEQ6U1G61rsXtE28fqxbYyMtaM/UexLHA0pGb6bjpEfibidvZGfGiW6beS/wCeQb eylMjx8PVtOKJp5zgKQ0mtYlO5YTlNqelRN7rtvpprYgijnd7ELhMafXi4VHwU/Byj2G D8RA== 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 z5-v6si4291199pgf.561.2018.09.28.01.45.20; Fri, 28 Sep 2018 01:45: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 S1729261AbeI1PHS (ORCPT + 99 others); Fri, 28 Sep 2018 11:07:18 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:36298 "EHLO mail-wm1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728903AbeI1PHS (ORCPT ); Fri, 28 Sep 2018 11:07:18 -0400 Received: by mail-wm1-f47.google.com with SMTP id n23-v6so1339038wmc.1 for ; Fri, 28 Sep 2018 01:44:35 -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=hgPTyuL/K6XQ+9Dn2zgnf3qSRYQrFEhVoTHJ5knCE5c=; b=UWi3UeTlBxGvcbUheaDbB/SWsea0zC+bx+/5gnfuL2PG3x42vwTB36Z3T+D5/Z4PIe eE/Y0gou2tQK05l6jc1wHEq7pYYXI2I8AG+gYAwOrmdK4xDo/u95cxYBzngtq/+RdpvA WA97gKwnUaiiVklxoQ20HagLP5guTKxqukuep8OjrjX32g2iXifpjrVKqezOw6dhGLKb 5bX0IGmIELAMZ/A+Y6bmJs3uO0+Xk4ysPbW7RxuMpLyuE6sCXYwkXtUZHqwUQfK+HIUq kcUHWkSGnboJufoIXuPntUl0aAoUsR8HUvMYULH8nKMzNxOlzTXv2Sk8CjK03x0NIu58 rLqQ== X-Gm-Message-State: ABuFfohz1lHk0+o1fXWYLPNwQfAvr2icUtOUGNS0Vv1t4ZG4uxfoABL3 rHTJO8HEvqfjCW8c0yoMno0= X-Received: by 2002:a1c:8e81:: with SMTP id q123-v6mr1021796wmd.56.1538124274833; Fri, 28 Sep 2018 01:44:34 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id h73-v6sm3988454wma.11.2018.09.28.01.44.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Sep 2018 01:44:33 -0700 (PDT) Received: by techadventures.net (Postfix, from userid 1000) id 3C735125660; Fri, 28 Sep 2018 10:44:33 +0200 (CEST) Date: Fri, 28 Sep 2018 10:44:33 +0200 From: Oscar Salvador To: Michal Hocko Cc: Alexander Duyck , linux-mm@kvack.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, pavel.tatashin@microsoft.com, dave.jiang@intel.com, dave.hansen@intel.com, jglisse@redhat.com, rppt@linux.vnet.ibm.com, dan.j.williams@intel.com, logang@deltatee.com, mingo@kernel.org, kirill.shutemov@linux.intel.com Subject: Re: [PATCH v5 4/4] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap Message-ID: <20180928084433.GB25561@techadventures.net> References: <20180925200551.3576.18755.stgit@localhost.localdomain> <20180925202053.3576.66039.stgit@localhost.localdomain> <20180926075540.GD6278@dhcp22.suse.cz> <6f87a5d7-05e2-00f4-8568-bb3521869cea@linux.intel.com> <20180927110926.GE6278@dhcp22.suse.cz> <20180927122537.GA20378@techadventures.net> <20180927131329.GI6278@dhcp22.suse.cz> <20180928081224.GA25561@techadventures.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180928081224.GA25561@techadventures.net> 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 Fri, Sep 28, 2018 at 10:12:24AM +0200, Oscar Salvador wrote: > Although I am not sure about leaving memmap_init_zone unprotected. > For the normal memory, that is not a problem since the memblock's lock > protects us from touching the same pages at the same time in online/offline_pages, > but for HMM/devm the story is different. > > I am totally unaware of HMM/devm, so I am not sure if its protected somehow. > e.g: what happens if devm_memremap_pages and devm_memremap_pages_release are running > at the same time for the same memory-range (with the assumption that the hotplug-lock > does not protect move_pfn_range_to_zone anymore). I guess that this could not happen since the device is not linked to devm_memremap_pages_release until the end with: devm_add_action(dev, devm_memremap_pages_release, pgmap) -- Oscar Salvador SUSE L3