[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180828114709.GA13859@techadventures.net>
Date: Tue, 28 Aug 2018 13:47:09 +0200
From: Oscar Salvador <osalvador@...hadventures.net>
To: akpm@...ux-foundation.org
Cc: mhocko@...e.com, dan.j.williams@...el.com, jglisse@...hat.com,
david@...hat.com, jonathan.cameron@...wei.com,
Pavel.Tatashin@...rosoft.com, yasu.isimatu@...il.com,
logang@...tatee.com, dave.jiang@...el.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Oscar Salvador <osalvador@...e.de>
Subject: Re: [RFC v2 0/2] Do not touch pages in remove_memory path
On Fri, Aug 17, 2018 at 05:41:25PM +0200, Oscar Salvador wrote:
> From: Oscar Salvador <osalvador@...e.de>
[...]
>
> The main difficulty I faced here was in regard of HMM/devm, as it really handles
> the hot-add/remove memory particulary, and what is more important,
> also the resources.
>
> I really scratched my head for ideas about how to handle this case, and
> after some fails I came up with the idea that we could check for the
> res->flags.
>
> Memory resources that goes through the "official" memory-hotplug channels
> have the IORESOURCE_SYSTEM_RAM flag.
> This flag is made of (IORESOURCE_MEM|IORESOURCE_SYSRAM).
>
> HMM/devm, on the other hand, request and release the resources
> through devm_request_mem_region/devm_release_mem_region, and
> these resources do not contain the IORESOURCE_SYSRAM flag.
>
> So what I ended up doing is to check for IORESOURCE_SYSRAM
> in release_mem_region_adjustable.
> If we see that a resource does not have such a flag, we know that
> we are dealing with a resource coming from HMM/devm, and so,
> we do not need to do anything as HMM/dev will take care of that part.
>
Jerome/Dan, now that the merge window is closed, and before sending the RFCv3, could you please check
this and see if you see something that is flagrant wrong? (about devm/HMM)
If you prefer I can send v3 spliting up even more.
Maybe this will ease the review.
Thanks
--
Oscar Salvador
SUSE L3
Powered by blists - more mailing lists