Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-15 Thread Greentime Hu
On Fri, Aug 16, 2019 at 12:20 AM Logan Gunthorpe wrote: > > > > On 2019-08-15 3:31 a.m., Greentime Hu wrote: > > Hi Logan, > > > > On Thu, Aug 15, 2019 at 6:21 AM Logan Gunthorpe wrote: > >> > >> Hey, > >> > >> On 2019-08-14 7:35 a.m., Greentime Hu wrote: > >>> How about this fix? Not sure if it

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-15 Thread Logan Gunthorpe
On 2019-08-15 3:31 a.m., Greentime Hu wrote: > Hi Logan, > > On Thu, Aug 15, 2019 at 6:21 AM Logan Gunthorpe wrote: >> >> Hey, >> >> On 2019-08-14 7:35 a.m., Greentime Hu wrote: >>> How about this fix? Not sure if it is good for everyone. >> >> I applied your fix to the patch and it seems ok.

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-15 Thread Greentime Hu
Hi Logan, On Thu, Aug 15, 2019 at 6:21 AM Logan Gunthorpe wrote: > > Hey, > > On 2019-08-14 7:35 a.m., Greentime Hu wrote: > > How about this fix? Not sure if it is good for everyone. > > I applied your fix to the patch and it seems ok. But it doesn't seem to > work on a recent version of the

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-14 Thread Logan Gunthorpe
Hey, On 2019-08-14 7:35 a.m., Greentime Hu wrote: > How about this fix? Not sure if it is good for everyone. I applied your fix to the patch and it seems ok. But it doesn't seem to work on a recent version of the kernel. Have you got it working on v5.3? It seems the following patch breaks

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-14 Thread Paul Walmsley
On Wed, 14 Aug 2019, Logan Gunthorpe wrote: > On 2019-08-14 11:40 a.m., Paul Walmsley wrote: > > On Wed, 14 Aug 2019, Logan Gunthorpe wrote: > > > >> On 2019-08-14 7:35 a.m., Greentime Hu wrote: > >> > >>> Maybe this commit explains why it used HAVE_ARCH_PFN_VALID instead of > >>> SPARSEMEM. >

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-14 Thread Logan Gunthorpe
On 2019-08-14 11:40 a.m., Paul Walmsley wrote: > On Wed, 14 Aug 2019, Logan Gunthorpe wrote: > >> On 2019-08-14 7:35 a.m., Greentime Hu wrote: >> >>> Maybe this commit explains why it used HAVE_ARCH_PFN_VALID instead of >>> SPARSEMEM. >>>

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-14 Thread Paul Walmsley
On Wed, 14 Aug 2019, Logan Gunthorpe wrote: > On 2019-08-14 7:35 a.m., Greentime Hu wrote: > > > Maybe this commit explains why it used HAVE_ARCH_PFN_VALID instead of > > SPARSEMEM. > > https://github.com/torvalds/linux/commit/7b7bf499f79de3f6c85a340c8453a78789523f85 > > > > BTW, I found

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-14 Thread Logan Gunthorpe
On 2019-08-14 7:35 a.m., Greentime Hu wrote: > Logan Gunthorpe 於 2019年8月14日 週三 上午12:50寫道: >> >> On 2019-08-13 10:39 a.m., Paul Walmsley wrote: >>> On Tue, 13 Aug 2019, Logan Gunthorpe wrote: >>> On 2019-08-13 12:04 a.m., Greentime Hu wrote: > Every architecture with mmu defines

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-14 Thread Greentime Hu
Logan Gunthorpe 於 2019年8月14日 週三 上午12:50寫道: > > On 2019-08-13 10:39 a.m., Paul Walmsley wrote: > > On Tue, 13 Aug 2019, Logan Gunthorpe wrote: > > > >> On 2019-08-13 12:04 a.m., Greentime Hu wrote: > >> > >>> Every architecture with mmu defines their own pfn_valid(). > >> > >> Not true. Arm64, for

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-13 Thread Logan Gunthorpe
On 2019-08-13 10:39 a.m., Paul Walmsley wrote: > On Tue, 13 Aug 2019, Logan Gunthorpe wrote: > >> On 2019-08-13 12:04 a.m., Greentime Hu wrote: >> >>> Every architecture with mmu defines their own pfn_valid(). >> >> Not true. Arm64, for example just uses the generic implementation in >> mmzone.h.

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-13 Thread Paul Walmsley
On Tue, 13 Aug 2019, Paul Walmsley wrote: > On Tue, 13 Aug 2019, Logan Gunthorpe wrote: > > > On 2019-08-13 12:04 a.m., Greentime Hu wrote: > > > > > Every architecture with mmu defines their own pfn_valid(). > > > > Not true. Arm64, for example just uses the generic implementation in > >

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-13 Thread Paul Walmsley
On Tue, 13 Aug 2019, Logan Gunthorpe wrote: > On 2019-08-13 12:04 a.m., Greentime Hu wrote: > > > Every architecture with mmu defines their own pfn_valid(). > > Not true. Arm64, for example just uses the generic implementation in > mmzone.h. arm64 seems to define their own:

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-13 Thread Logan Gunthorpe
On 2019-08-13 12:04 a.m., Greentime Hu wrote: > I think flat mem doesn't support memory-with-hole scenario. > In mm/Kconfig, it says > " > For systems that have holes in their physical address > spaces and for features like NUMA and memory hotplug, > choose

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-13 Thread Greentime Hu
Hi Logan, Logan Gunthorpe 於 2019年8月12日 週一 下午11:52寫道: > > > > On 2019-08-11 10:01 p.m., Greentime Hu wrote: > > Hi Logan, > > > > Logan Gunthorpe 於 2019年8月10日 週六 上午3:03寫道: > >> > >> > >> > >> On 2019-08-09 11:01 a.m., Greentime Hu wrote: > >>> Hi Logan, > >>> > >>> Logan Gunthorpe 於 2019年8月9日

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-12 Thread Logan Gunthorpe
On 2019-08-11 10:01 p.m., Greentime Hu wrote: > Hi Logan, > > Logan Gunthorpe 於 2019年8月10日 週六 上午3:03寫道: >> >> >> >> On 2019-08-09 11:01 a.m., Greentime Hu wrote: >>> Hi Logan, >>> >>> Logan Gunthorpe 於 2019年8月9日 週五 下午11:47寫道: On 2019-08-08 10:23 p.m., Greentime Hu wrote:

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-11 Thread Greentime Hu
Hi Logan, Logan Gunthorpe 於 2019年8月10日 週六 上午3:03寫道: > > > > On 2019-08-09 11:01 a.m., Greentime Hu wrote: > > Hi Logan, > > > > Logan Gunthorpe 於 2019年8月9日 週五 下午11:47寫道: > >> > >> > >> > >> On 2019-08-08 10:23 p.m., Greentime Hu wrote: > >>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-09 Thread Logan Gunthorpe
On 2019-08-09 11:01 a.m., Greentime Hu wrote: > Hi Logan, > > Logan Gunthorpe 於 2019年8月9日 週五 下午11:47寫道: >> >> >> >> On 2019-08-08 10:23 p.m., Greentime Hu wrote: >>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig >>> index 3f12b069af1d..208b3e14ccd8 100644 >>> --- a/arch/riscv/Kconfig

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-09 Thread Greentime Hu
Hi Logan, Logan Gunthorpe 於 2019年8月9日 週五 下午11:47寫道: > > > > On 2019-08-08 10:23 p.m., Greentime Hu wrote: > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > > index 3f12b069af1d..208b3e14ccd8 100644 > > --- a/arch/riscv/Kconfig > > +++ b/arch/riscv/Kconfig > > @@ -116,7 +116,8 @@ config

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-08-09 Thread Logan Gunthorpe
On 2019-08-08 10:23 p.m., Greentime Hu wrote: > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index 3f12b069af1d..208b3e14ccd8 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -116,7 +116,8 @@ config PGTABLE_LEVELS >         default 2 > >  config HAVE_ARCH_PFN_VALID >

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-07-31 Thread Greentime Hu
Hi Logan, Logan Gunthorpe 於 2019年8月1日 週四 上午1:08寫道: > > > > On 2019-07-31 12:30 a.m., Greentime Hu wrote: > > I look this issue more closely. > > I found it always sets each memblock region to node 0. Does this make sense? > > I am not sure if I understand this correctly. Do you have any idea for

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-07-31 Thread Logan Gunthorpe
On 2019-07-31 12:30 a.m., Greentime Hu wrote: > I look this issue more closely. > I found it always sets each memblock region to node 0. Does this make sense? > I am not sure if I understand this correctly. Do you have any idea for > this? Thank you. :) Yes, I think this is normal. When we

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-07-31 Thread Greentime Hu
Hi Logan, Logan Gunthorpe 於 2019年1月10日 週四 上午5:07寫道: > > This patch implements sparsemem support for risc-v which helps pave the > way for memory hotplug and eventually P2P support. > > We introduce Kconfig options for virtual and physical address bits which > are used to calculate the size of

Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

2019-01-15 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig