Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1653286
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [-next] memory hotplug regression |
| Date | 2017-05-30 16:40 +0200 |
| Message-ID | <tMQtr-7f-15@gated-at.bofh.it> (permalink) |
| References | <tKzQ8-8hN-55@gated-at.bofh.it> <tKA9s-8rl-25@gated-at.bofh.it> <tLmxr-5Rf-5@gated-at.bofh.it> <tMOrE-7i1-11@gated-at.bofh.it> <tMOBk-7lm-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue 30-05-17 14:37:24, Heiko Carstens wrote:
> On Tue, May 30, 2017 at 02:18:06PM +0200, Michal Hocko wrote:
> > > So ZONE_DMA ends within ZONE_NORMAL. This shouldn't be possible, unless
> > > this restriction is gone?
> >
> > The patch below should help.
>
> It does fix this specific problem, but introduces a new one:
>
> # echo online_movable > /sys/devices/system/memory/memory16/state
> # cat /sys/devices/system/memory/memory16/valid_zones
> Movable
> # echo offline > /sys/devices/system/memory/memory16/state
> # cat /sys/devices/system/memory/memory16/valid_zones
> <--- no output
>
> Memory block 16 is the only one I onlined and offlineto ZONE_MOVABLE.
Could you test the this on top please?
---
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 792c098e0e5f..a26f9f8e6365 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -937,13 +937,18 @@ void __ref move_pfn_range_to_zone(struct zone *zone,
set_zone_contiguous(zone);
}
+/*
+ * Returns a default kernel memory zone for the given pfn range.
+ * If no kernel zone covers this pfn range it will automatically go
+ * to the ZONE_NORMAL.
+ */
struct zone *default_zone_for_pfn(int nid, unsigned long start_pfn,
unsigned long nr_pages)
{
struct pglist_data *pgdat = NODE_DATA(nid);
int zid;
- for (zid = 0; zid < MAX_NR_ZONES; zid++) {
+ for (zid = 0; zid <= ZONE_NORMAL; zid++) {
struct zone *zone = &pgdat->node_zones[zid];
if (zone_intersects(zone, start_pfn, nr_pages))
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [-next] memory hotplug regression Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-05-26 14:30 +0200
Re: [-next] memory hotplug regression Michal Hocko <mhocko@kernel.org> - 2017-05-29 11:00 +0200
Re: [-next] memory hotplug regression Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-05-29 12:20 +0200
Re: [-next] memory hotplug regression Michal Hocko <mhocko@kernel.org> - 2017-05-29 12:50 +0200
Re: [-next] memory hotplug regression Michal Hocko <mhocko@kernel.org> - 2017-05-30 14:30 +0200
Re: [-next] memory hotplug regression Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-05-30 14:40 +0200
Re: [-next] memory hotplug regression Michal Hocko <mhocko@kernel.org> - 2017-05-30 16:40 +0200
Re: [-next] memory hotplug regression Michal Hocko <mhocko@kernel.org> - 2017-05-30 17:10 +0200
Re: [-next] memory hotplug regression Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-05-30 20:40 +0200
Re: [-next] memory hotplug regression Michal Hocko <mhocko@kernel.org> - 2017-05-31 08:30 +0200
Re: [-next] memory hotplug regression Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-06-01 09:00 +0200
Re: [-next] memory hotplug regression Michal Hocko <mhocko@kernel.org> - 2017-06-01 09:20 +0200
csiph-web