[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4hY97wL53Pa8oaq4UK6OS4R48_35nJhbY4SYmoMSctQHA@mail.gmail.com>
Date: Fri, 28 Sep 2018 08:50:46 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: osalvador@...hadventures.net
Cc: Michal Hocko <mhocko@...nel.org>,
alexander.h.duyck@...ux.intel.com, Linux MM <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-nvdimm <linux-nvdimm@...ts.01.org>,
Pasha Tatashin <pavel.tatashin@...rosoft.com>,
Dave Jiang <dave.jiang@...el.com>,
Dave Hansen <dave.hansen@...el.com>,
Jérôme Glisse <jglisse@...hat.com>,
rppt@...ux.vnet.ibm.com, Logan Gunthorpe <logang@...tatee.com>,
Ingo Molnar <mingo@...nel.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCH v5 4/4] mm: Defer ZONE_DEVICE page initialization to the
point where we init pgmap
On Fri, Sep 28, 2018 at 1:45 AM Oscar Salvador
<osalvador@...hadventures.net> wrote:
>
> 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)
It's a bug if devm_memremap_pages and devm_memremap_pages_release are
running simultaneously for the same range. This is enforced by the
requirement that the caller has done a successful request_region() on
the range before the call to map pages.
Powered by blists - more mailing lists