All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/mm: Dump hash table
@ 2017-04-10  2:04 Rashmica Gupta
  2017-04-10  4:02 ` Anshuman Khandual
  2017-04-13 11:23 ` Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Rashmica Gupta @ 2017-04-10  2:04 UTC (permalink / raw)
  To: linuxppc-dev, mpe; +Cc: Rashmica Gupta

Current behaviour assumes that memory in RAM is contiguous and
iterates from the start of RAM to (start + size of memory). When the
memory isn't physically contiguous, this approach doesn't work.

If memory exists at 0-5 GB and 6-10 GB then the current approach will
check if entries exist in the hash table from 0GB to 9GB. This patch
changes the behaviour to iterate up to the end of RAM.

Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
---
 arch/powerpc/mm/dump_hashpagetable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/dump_hashpagetable.c b/arch/powerpc/mm/dump_hashpagetable.c
index d979709..ee07398 100644
--- a/arch/powerpc/mm/dump_hashpagetable.c
+++ b/arch/powerpc/mm/dump_hashpagetable.c
@@ -468,7 +468,7 @@ static void walk_linearmapping(struct pg_state *st)
 	unsigned long psize = 1 << mmu_psize_defs[mmu_linear_psize].shift;
 
 	for (addr = PAGE_OFFSET; addr < PAGE_OFFSET +
-			memblock_phys_mem_size(); addr += psize)
+			memblock_end_of_DRAM(); addr += psize)
 		hpte_find(st, addr, mmu_linear_psize);
 }
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/mm: Dump hash table
  2017-04-10  2:04 [PATCH] powerpc/mm: Dump hash table Rashmica Gupta
@ 2017-04-10  4:02 ` Anshuman Khandual
  2017-04-10  5:14   ` RashmicaGupta
  2017-04-13 11:23 ` Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Anshuman Khandual @ 2017-04-10  4:02 UTC (permalink / raw)
  To: Rashmica Gupta, linuxppc-dev, mpe

On 04/10/2017 07:34 AM, Rashmica Gupta wrote:
> Current behaviour assumes that memory in RAM is contiguous and
> iterates from the start of RAM to (start + size of memory). When the
> memory isn't physically contiguous, this approach doesn't work.

In dis contiguous platform, we just finish up walking linear
mapping prematurely before the end of the RAM ?

> 
> If memory exists at 0-5 GB and 6-10 GB then the current approach will
> check if entries exist in the hash table from 0GB to 9GB. This patch
> changes the behaviour to iterate up to the end of RAM.

So it fixes the commit which added memblock_phys_mem_size().
Hence needs "Fixes: " tag as well.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/mm: Dump hash table
  2017-04-10  4:02 ` Anshuman Khandual
@ 2017-04-10  5:14   ` RashmicaGupta
  0 siblings, 0 replies; 4+ messages in thread
From: RashmicaGupta @ 2017-04-10  5:14 UTC (permalink / raw)
  To: Anshuman Khandual, Rashmica Gupta, linuxppc-dev, mpe



On 10/04/17 14:02, Anshuman Khandual wrote:
> On 04/10/2017 07:34 AM, Rashmica Gupta wrote:
>> Current behaviour assumes that memory in RAM is contiguous and
>> iterates from the start of RAM to (start + size of memory). When the
>> memory isn't physically contiguous, this approach doesn't work.
> In dis contiguous platform, we just finish up walking linear
> mapping prematurely before the end of the RAM ?
Yes, that is what the following example explains.
>
>> If memory exists at 0-5 GB and 6-10 GB then the current approach will
>> check if entries exist in the hash table from 0GB to 9GB. This patch
>> changes the behaviour to iterate up to the end of RAM.
> So it fixes the commit which added memblock_phys_mem_size().
> Hence needs "Fixes: " tag as well.
>
Woops, will add that!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: powerpc/mm: Dump hash table
  2017-04-10  2:04 [PATCH] powerpc/mm: Dump hash table Rashmica Gupta
  2017-04-10  4:02 ` Anshuman Khandual
@ 2017-04-13 11:23 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2017-04-13 11:23 UTC (permalink / raw)
  To: Rashmica Gupta, linuxppc-dev; +Cc: Rashmica Gupta

On Mon, 2017-04-10 at 02:04:04 UTC, Rashmica Gupta wrote:
> Current behaviour assumes that memory in RAM is contiguous and
> iterates from the start of RAM to (start + size of memory). When the
> memory isn't physically contiguous, this approach doesn't work.
> 
> If memory exists at 0-5 GB and 6-10 GB then the current approach will
> check if entries exist in the hash table from 0GB to 9GB. This patch
> changes the behaviour to iterate up to the end of RAM.
> 
> Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/9e4114b3913cff37be509224116b6f

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-13 11:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10  2:04 [PATCH] powerpc/mm: Dump hash table Rashmica Gupta
2017-04-10  4:02 ` Anshuman Khandual
2017-04-10  5:14   ` RashmicaGupta
2017-04-13 11:23 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.