[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bffe90e6-81fa-e8d5-5fb2-b54539f45c5d@redhat.com>
Date: Thu, 20 Jun 2019 18:37:10 +0200
From: David Hildenbrand <david@...hat.com>
To: Nathan Chancellor <natechancellor@...il.com>
Cc: linux-kernel@...r.kernel.org,
Dan Williams <dan.j.williams@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linuxppc-dev@...ts.ozlabs.org, linux-acpi@...r.kernel.org,
linux-mm@...ck.org,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rashmica Gupta <rashmica.g@...il.com>,
Pavel Tatashin <pavel.tatashin@...rosoft.com>,
Anshuman Khandual <anshuman.khandual@....com>,
Michael Neuling <mikey@...ling.org>,
Thomas Gleixner <tglx@...utronix.de>,
Oscar Salvador <osalvador@...e.de>,
Michal Hocko <mhocko@...e.com>,
Wei Yang <richard.weiyang@...il.com>,
Juergen Gross <jgross@...e.com>, Qian Cai <cai@....pw>,
Arun KS <arunks@...eaurora.org>
Subject: Re: [PATCH v2 4/6] mm/memory_hotplug: Rename walk_memory_range() and
pass start+size instead of pfns
On 20.06.19 18:05, Nathan Chancellor wrote:
> On Thu, Jun 20, 2019 at 12:35:18PM +0200, David Hildenbrand wrote:
>> walk_memory_range() was once used to iterate over sections. Now, it
>> iterates over memory blocks. Rename the function, fixup the
>> documentation. Also, pass start+size instead of PFNs, which is what most
>> callers already have at hand. (we'll rework link_mem_sections() most
>> probably soon)
>>
>> Follow-up patches wil rework, simplify, and move walk_memory_blocks() to
>> drivers/base/memory.c.
>>
>> Note: walk_memory_blocks() only works correctly right now if the
>> start_pfn is aligned to a section start. This is the case right now,
>> but we'll generalize the function in a follow up patch so the semantics
>> match the documentation.
>>
>> Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
>> Cc: Paul Mackerras <paulus@...ba.org>
>> Cc: Michael Ellerman <mpe@...erman.id.au>
>> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
>> Cc: Len Brown <lenb@...nel.org>
>> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>> Cc: David Hildenbrand <david@...hat.com>
>> Cc: Rashmica Gupta <rashmica.g@...il.com>
>> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> Cc: Pavel Tatashin <pavel.tatashin@...rosoft.com>
>> Cc: Anshuman Khandual <anshuman.khandual@....com>
>> Cc: Michael Neuling <mikey@...ling.org>
>> Cc: Thomas Gleixner <tglx@...utronix.de>
>> Cc: Oscar Salvador <osalvador@...e.de>
>> Cc: Michal Hocko <mhocko@...e.com>
>> Cc: Wei Yang <richard.weiyang@...il.com>
>> Cc: Juergen Gross <jgross@...e.com>
>> Cc: Qian Cai <cai@....pw>
>> Cc: Arun KS <arunks@...eaurora.org>
>> Signed-off-by: David Hildenbrand <david@...hat.com>
>> ---
>> arch/powerpc/platforms/powernv/memtrace.c | 22 ++++++++++-----------
>> drivers/acpi/acpi_memhotplug.c | 19 ++++--------------
>> drivers/base/node.c | 5 +++--
>> include/linux/memory_hotplug.h | 2 +-
>> mm/memory_hotplug.c | 24 ++++++++++++-----------
>> 5 files changed, 32 insertions(+), 40 deletions(-)
>>
>> diff --git a/arch/powerpc/platforms/powernv/memtrace.c b/arch/powerpc/platforms/powernv/memtrace.c
>> index 5e53c1392d3b..8c82c041afe6 100644
>> --- a/arch/powerpc/platforms/powernv/memtrace.c
>> +++ b/arch/powerpc/platforms/powernv/memtrace.c
>> @@ -70,23 +70,24 @@ static int change_memblock_state(struct memory_block *mem, void *arg)
>> /* called with device_hotplug_lock held */
>> static bool memtrace_offline_pages(u32 nid, u64 start_pfn, u64 nr_pages)
>> {
>> + const unsigned long start = PFN_PHYS(start_pfn);
>> + const unsigned long size = PFN_PHYS(nr_pages);
>> u64 end_pfn = start_pfn + nr_pages - 1;
>
> This variable should be removed:
>
> arch/powerpc/platforms/powernv/memtrace.c:75:6: warning: unused variable 'end_pfn' [-Wunused-variable]
> u64 end_pfn = start_pfn + nr_pages - 1;
> ^
> 1 warning generated.
>
> https://travis-ci.com/ClangBuiltLinux/continuous-integration/jobs/209576737
>
> Cheers,
> Nathan
>
Indeed, thanks!
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists