Re: [Linux-kernel-mentees][PATCH v4 1/1] sgi-gru: Remove *pte_lookup functions

2019-08-09 Thread John Hubbard
On 8/9/19 2:44 AM, Bharath Vedartham wrote: On Thu, Aug 08, 2019 at 04:21:44PM -0700, John Hubbard wrote: On 8/8/19 11:55 AM, Bharath Vedartham wrote: ... static int gru_vtop(struct gru_thread_state *gts, unsigned long vaddr, int write, int atomic, unsigned long *gpa, int

Re: [Linux-kernel-mentees][PATCH v4 1/1] sgi-gru: Remove *pte_lookup functions

2019-08-09 Thread Bharath Vedartham
On Thu, Aug 08, 2019 at 04:21:44PM -0700, John Hubbard wrote: > On 8/8/19 11:55 AM, Bharath Vedartham wrote: > ... > > static int gru_vtop(struct gru_thread_state *gts, unsigned long vaddr, > > int write, int atomic, unsigned long *gpa, int *pageshift) > > { > > struct mm_stru

Re: [Linux-kernel-mentees][PATCH v4 1/1] sgi-gru: Remove *pte_lookup functions

2019-08-09 Thread Bharath Vedartham
On Thu, Aug 08, 2019 at 04:30:48PM -0700, John Hubbard wrote: > On 8/8/19 4:21 PM, John Hubbard wrote: > > On 8/8/19 11:55 AM, Bharath Vedartham wrote: > > ... > >>if (is_gru_paddr(paddr)) > >>goto inval; > >> - paddr = paddr & ~((1UL << ps) - 1); > >> + paddr = paddr & ~((1UL <<

Re: [Linux-kernel-mentees][PATCH v4 1/1] sgi-gru: Remove *pte_lookup functions

2019-08-09 Thread Bharath Vedartham
On Thu, Aug 08, 2019 at 04:21:44PM -0700, John Hubbard wrote: > On 8/8/19 11:55 AM, Bharath Vedartham wrote: > ... > > static int gru_vtop(struct gru_thread_state *gts, unsigned long vaddr, > > int write, int atomic, unsigned long *gpa, int *pageshift) > > { > > struct mm_stru

Re: [Linux-kernel-mentees][PATCH v4 1/1] sgi-gru: Remove *pte_lookup functions

2019-08-08 Thread John Hubbard
On 8/8/19 4:21 PM, John Hubbard wrote: > On 8/8/19 11:55 AM, Bharath Vedartham wrote: > ... >> if (is_gru_paddr(paddr)) >> goto inval; >> -paddr = paddr & ~((1UL << ps) - 1); >> +paddr = paddr & ~((1UL << *pageshift) - 1); >> *gpa = uv_soc_phys_ram_to_gpa(paddr); >> -

Re: [Linux-kernel-mentees][PATCH v4 1/1] sgi-gru: Remove *pte_lookup functions

2019-08-08 Thread John Hubbard
On 8/8/19 11:55 AM, Bharath Vedartham wrote: ... > static int gru_vtop(struct gru_thread_state *gts, unsigned long vaddr, > int write, int atomic, unsigned long *gpa, int *pageshift) > { > struct mm_struct *mm = gts->ts_mm; > struct vm_area_struct *vma; > unsig

[Linux-kernel-mentees][PATCH v4 1/1] sgi-gru: Remove *pte_lookup functions

2019-08-08 Thread Bharath Vedartham
The *pte_lookup functions can be removed and be easily replaced with get_user_pages_fast functions. In the case of atomic lookup, __get_user_pages_fast is used which does not fall back to slow get_user_pages. get_user_pages_fast on the other hand tries to use __get_user_pages_fast but fallbacks to

[Linux-kernel-mentees][PATCH v4 1/1] sgi-gru: Remove *pte_lookup functions

2019-07-30 Thread Bharath Vedartham
The *pte_lookup functions can be removed and be easily replaced with get_user_pages_fast functions. In the case of atomic lookup, __get_user_pages_fast is used which does not fall back to slow get_user_pages. get_user_pages_fast on the other hand tries to use __get_user_pages_fast but fallbacks to