Re: 答复: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2018-02-27 Thread Kani, Toshi
On Tue, 2018-02-27 at 19:59 +, Will Deacon wrote: > On Tue, Feb 27, 2018 at 07:49:42PM +, Kani, Toshi wrote: > > On Mon, 2018-02-26 at 20:53 +0800, Hanjun Guo wrote: > > > On 2018/2/26 19:04, Will Deacon wrote: > > > > On Mon, Feb 26, 2018 at 06:57:20PM +0800, Hanjun Guo wrote: > > > > > Si

Re: 答复: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2018-02-27 Thread Will Deacon
On Tue, Feb 27, 2018 at 07:49:42PM +, Kani, Toshi wrote: > On Mon, 2018-02-26 at 20:53 +0800, Hanjun Guo wrote: > > On 2018/2/26 19:04, Will Deacon wrote: > > > On Mon, Feb 26, 2018 at 06:57:20PM +0800, Hanjun Guo wrote: > > > > Simply do something below at now (before the broken code is fixed)

Re: 答复: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2018-02-27 Thread Kani, Toshi
On Mon, 2018-02-26 at 20:53 +0800, Hanjun Guo wrote: > On 2018/2/26 19:04, Will Deacon wrote: > > On Mon, Feb 26, 2018 at 06:57:20PM +0800, Hanjun Guo wrote: > > > On 2018/2/21 19:57, Will Deacon wrote: > > > > [sorry, trying to deal with top-posting here] > > > > > > > > On Wed, Feb 21, 2018 at 0

Re: 答复: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2018-02-26 Thread Will Deacon
On Mon, Feb 26, 2018 at 06:57:20PM +0800, Hanjun Guo wrote: > On 2018/2/21 19:57, Will Deacon wrote: > > [sorry, trying to deal with top-posting here] > > > > On Wed, Feb 21, 2018 at 07:36:34AM +, Wangxuefeng (E) wrote: > >> The old flow of reuse the 4k page as 2M page does not follow the

Re: 答复: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2018-02-21 Thread Will Deacon
[sorry, trying to deal with top-posting here] On Wed, Feb 21, 2018 at 07:36:34AM +, Wangxuefeng (E) wrote: > The old flow of reuse the 4k page as 2M page does not follow the BBM flow > for page table reconstruction,not only the memory leak problems. If BBM flow > is not followed,the spec

Re: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2018-02-20 Thread Kani, Toshi
On Tue, 2018-02-20 at 14:54 +0530, Chintan Pandya wrote: > > On 12/28/2017 4:54 PM, Hanjun Guo wrote: > > From: Hanjun Guo > > > > When we using iounmap() to free the 4K mapping, it just clear the PTEs > > but leave P4D/PUD/PMD unchanged, also will not free the memory of page > > tables. > > >

Re: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2018-02-20 Thread Chintan Pandya
On 12/28/2017 4:54 PM, Hanjun Guo wrote: From: Hanjun Guo When we using iounmap() to free the 4K mapping, it just clear the PTEs but leave P4D/PUD/PMD unchanged, also will not free the memory of page tables. This will cause issues on ARM64 platform (not sure if other archs have the same issu

Re: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2018-01-08 Thread Kani, Toshi
On Sat, 2018-01-06 at 17:46 +0800, Hanjun Guo wrote: > On 2018/1/6 6:15, Kani, Toshi wrote: > > On Thu, 2017-12-28 at 19:24 +0800, Hanjun Guo wrote: > > > From: Hanjun Guo > > > > > > When we using iounmap() to free the 4K mapping, it just clear the PTEs > > > but leave P4D/PUD/PMD unchanged, als

Re: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2018-01-06 Thread Hanjun Guo
On 2018/1/6 6:15, Kani, Toshi wrote: > On Thu, 2017-12-28 at 19:24 +0800, Hanjun Guo wrote: >> From: Hanjun Guo >> >> When we using iounmap() to free the 4K mapping, it just clear the PTEs >> but leave P4D/PUD/PMD unchanged, also will not free the memory of page >> tables. >> >> This will cause is

Re: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2018-01-05 Thread Kani, Toshi
On Thu, 2017-12-28 at 19:24 +0800, Hanjun Guo wrote: > From: Hanjun Guo > > When we using iounmap() to free the 4K mapping, it just clear the PTEs > but leave P4D/PUD/PMD unchanged, also will not free the memory of page > tables. > > This will cause issues on ARM64 platform (not sure if other ar

Re: [RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2017-12-29 Thread Hanjun Guo
oops, the title of this patch is wrong, should be: ioremap: skip setting up huge I/O mappings when p4d/pud/pmd is zero On 2017/12/28 19:24, Hanjun Guo wrote: > From: Hanjun Guo > > When we using iounmap() to free the 4K mapping, it just clear the PTEs > but leave P4D/PUD/PMD unchanged, also will

[RFC patch] ioremap: don't set up huge I/O mappings when p4d/pud/pmd is zero

2017-12-28 Thread Hanjun Guo
From: Hanjun Guo When we using iounmap() to free the 4K mapping, it just clear the PTEs but leave P4D/PUD/PMD unchanged, also will not free the memory of page tables. This will cause issues on ARM64 platform (not sure if other archs have the same issue) for this case: 1. ioremap a 4K size, vali