Re: [PATCH v2] sched, mm: Optimize current_gfp_context()

2020-09-19 Thread Xu, Yanfei
On 9/18/20 11:18 PM, Waiman Long wrote: On 9/18/20 2:44 AM, Xu, Yanfei wrote: Hi Waiman, On 8/12/20 6:29 AM, Andrew Morton wrote: On Thu, 18 Jun 2020 17:29:36 -0400 Waiman Long wrote: The current_gfp_context() converts a number of PF_MEMALLOC_* per-process flags into the corresponding

Re: [PATCH v2] sched, mm: Optimize current_gfp_context()

2020-09-18 Thread Waiman Long
On 9/18/20 2:44 AM, Xu, Yanfei wrote: Hi Waiman, On 8/12/20 6:29 AM, Andrew Morton wrote: On Thu, 18 Jun 2020 17:29:36 -0400 Waiman Long wrote: The current_gfp_context() converts a number of PF_MEMALLOC_* per-process flags into the corresponding GFP_* flags for memory allocation. In that

Re: [PATCH v2] sched, mm: Optimize current_gfp_context()

2020-09-18 Thread Xu, Yanfei
Hi Waiman, On 8/12/20 6:29 AM, Andrew Morton wrote: On Thu, 18 Jun 2020 17:29:36 -0400 Waiman Long wrote: The current_gfp_context() converts a number of PF_MEMALLOC_* per-process flags into the corresponding GFP_* flags for memory allocation. In that function, current->flags is accessed 3

Re: [PATCH v2] sched, mm: Optimize current_gfp_context()

2020-08-11 Thread Waiman Long
On 8/11/20 6:29 PM, Andrew Morton wrote: On Thu, 18 Jun 2020 17:29:36 -0400 Waiman Long wrote: The current_gfp_context() converts a number of PF_MEMALLOC_* per-process flags into the corresponding GFP_* flags for memory allocation. In that function, current->flags is accessed 3 times. That

Re: [PATCH v2] sched, mm: Optimize current_gfp_context()

2020-08-11 Thread Andrew Morton
On Thu, 18 Jun 2020 17:29:36 -0400 Waiman Long wrote: > The current_gfp_context() converts a number of PF_MEMALLOC_* per-process > flags into the corresponding GFP_* flags for memory allocation. In > that function, current->flags is accessed 3 times. That may lead to > duplicated access of the

[PATCH v2] sched, mm: Optimize current_gfp_context()

2020-06-18 Thread Waiman Long
The current_gfp_context() converts a number of PF_MEMALLOC_* per-process flags into the corresponding GFP_* flags for memory allocation. In that function, current->flags is accessed 3 times. That may lead to duplicated access of the same memory location. This is not usually a problem with minimal