Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1601802
| From | "Kani, Toshimitsu" <toshi.kani@hpe.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] rework memory hotplug onlining |
| Date | 2017-03-16 00:10 +0100 |
| Message-ID | <tlqdk-6eS-21@gated-at.bofh.it> (permalink) |
| References | <tldg5-5yN-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, 2017-03-15 at 10:13 +0100, Michal Hocko wrote:
:
> @@ -388,39 +389,44 @@ static ssize_t show_valid_zones(struct device
> *dev,
> struct device_attribute *attr, char
> *buf)
> {
> struct memory_block *mem = to_memory_block(dev);
> - unsigned long start_pfn, end_pfn;
> - unsigned long valid_start, valid_end, valid_pages;
> - unsigned long nr_pages = PAGES_PER_SECTION *
> sections_per_block;
> + unsigned long start_pfn, nr_pages;
> + bool append = false;
> struct zone *zone;
> - int zone_shift = 0;
> + int nid;
>
> start_pfn = section_nr_to_pfn(mem->start_section_nr);
> - end_pfn = start_pfn + nr_pages;
> + zone = page_zone(pfn_to_page(start_pfn));
> + nr_pages = PAGES_PER_SECTION * sections_per_block;
>
> - /* The block contains more than one zone can not be
> offlined. */
> - if (!test_pages_in_a_zone(start_pfn, end_pfn, &valid_start,
> &valid_end))
> + /*
> + * The block contains more than one zone can not be
> offlined.
> + * This can happen e.g. for ZONE_DMA and ZONE_DMA32
> + */
> + if (!test_pages_in_a_zone(start_pfn, start_pfn + nr_pages,
> NULL, NULL))
> return sprintf(buf, "none\n");
>
> - zone = page_zone(pfn_to_page(valid_start));
Please do not remove the fix made in a96dfddbcc043. zone needs to be
set from valid_start, not from start_pfn.
Thanks,
-Toshi
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH] rework memory hotplug onlining Michal Hocko <mhocko@kernel.org> - 2017-03-15 10:20 +0100
Re: [RFC PATCH] rework memory hotplug onlining Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-03-15 11:50 +0100
ZONE_NORMAL vs. ZONE_MOVABLE (was: Re: [RFC PATCH] rework memory hotplug onlining) Michal Hocko <mhocko@kernel.org> - 2017-03-15 13:40 +0100
Re: ZONE_NORMAL vs. ZONE_MOVABLE Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-03-15 14:00 +0100
Re: ZONE_NORMAL vs. ZONE_MOVABLE Michal Hocko <mhocko@kernel.org> - 2017-03-15 14:20 +0100
Re: ZONE_NORMAL vs. ZONE_MOVABLE Andrea Arcangeli <aarcange@redhat.com> - 2017-03-15 17:40 +0100
Re: ZONE_NORMAL vs. ZONE_MOVABLE Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2017-03-16 06:40 +0100
Re: ZONE_NORMAL vs. ZONE_MOVABLE Andrea Arcangeli <aarcange@redhat.com> - 2017-03-16 20:20 +0100
Re: ZONE_NORMAL vs. ZONE_MOVABLE Igor Mammedov <imammedo@redhat.com> - 2017-03-17 11:30 +0100
Re: ZONE_NORMAL vs. ZONE_MOVABLE Joonsoo Kim <js1304@gmail.com> - 2017-03-20 07:40 +0100
Re: [RFC PATCH] rework memory hotplug onlining "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-03-16 00:10 +0100
Re: [RFC PATCH] rework memory hotplug onlining Michal Hocko <mhocko@kernel.org> - 2017-03-16 10:00 +0100
Re: [RFC PATCH] rework memory hotplug onlining "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-03-16 18:40 +0100
Re: [RFC PATCH] rework memory hotplug onlining Michal Hocko <mhocko@kernel.org> - 2017-03-16 18:50 +0100
Re: [RFC PATCH] rework memory hotplug onlining Michal Hocko <mhocko@kernel.org> - 2017-03-17 14:40 +0100
Re: [RFC PATCH] rework memory hotplug onlining Dan Williams <dan.j.williams@gmail.com> - 2017-03-21 15:20 +0100
csiph-web