Re: [PATCH v3 3/3] mm/memory.c: Add memory read privilege before filling PTE entry

2020-05-27 Thread maobibo
On 05/28/2020 04:55 AM, Hugh Dickins wrote: > On Tue, 19 May 2020, maobibo wrote: >> On 05/19/2020 04:57 AM, Andrew Morton wrote: >>> On Mon, 18 May 2020 13:08:49 +0800 Bibo Mao wrote: >>> On mips platform, hw PTE entry valid bit is set in pte_mkyoung function, it is used to set

Re: [PATCH v3 3/3] mm/memory.c: Add memory read privilege before filling PTE entry

2020-05-27 Thread Hugh Dickins
On Tue, 19 May 2020, maobibo wrote: > On 05/19/2020 04:57 AM, Andrew Morton wrote: > > On Mon, 18 May 2020 13:08:49 +0800 Bibo Mao wrote: > > > >> On mips platform, hw PTE entry valid bit is set in pte_mkyoung > >> function, it is used to set physical page with readable privilege. > > > >

Re: [PATCH v3 3/3] mm/memory.c: Add memory read privilege before filling PTE entry

2020-05-18 Thread Andrew Morton
On Tue, 19 May 2020 11:22:49 +0800 maobibo wrote: > how about adding pte_sw_mkyoung alike function which is a noop on all but > mips? > this function is used to set PAGE_ACCESS bit and PAGE_VALID bit on mips > platform. Sounds good. Please ensure that the interface (roles and

Re: [PATCH v3 3/3] mm/memory.c: Add memory read privilege before filling PTE entry

2020-05-18 Thread maobibo
On 05/19/2020 04:57 AM, Andrew Morton wrote: > On Mon, 18 May 2020 13:08:49 +0800 Bibo Mao wrote: > >> On mips platform, hw PTE entry valid bit is set in pte_mkyoung >> function, it is used to set physical page with readable privilege. > > pte_mkyoung() seems to be a strange place to set the

Re: [PATCH v3 3/3] mm/memory.c: Add memory read privilege before filling PTE entry

2020-05-18 Thread Andrew Morton
On Mon, 18 May 2020 13:08:49 +0800 Bibo Mao wrote: > On mips platform, hw PTE entry valid bit is set in pte_mkyoung > function, it is used to set physical page with readable privilege. pte_mkyoung() seems to be a strange place to set the pte's valid bit. Why is it done there? Can it be done

[PATCH v3 3/3] mm/memory.c: Add memory read privilege before filling PTE entry

2020-05-17 Thread Bibo Mao
On mips platform, hw PTE entry valid bit is set in pte_mkyoung function, it is used to set physical page with readable privilege. Here add pte_mkyoung function to make page readable on MIPS platform during page fault handling. This patch improves page fault latency about 10% on my MIPS machine