On 12/9/21 21:06, Waiman Long wrote:
Direct calls to local_irq_{save/restore}() and preempt_{enable/disable}() are not appropriate for PREEMPT_RT. To provide better PREEMPT_RT support, change local_irq_{save/restore}() to local_lock_irq{save/restore}() and add a local_lock_t to struct memcg_stock_pcp. Also disable the task and interrupt context optimization for obj_stock as there will be no performance gain in the case of PREEMPT_RT. In this case, task obj_stock will be there but remain unused. Signed-off-by: Waiman Long <longman@xxxxxxxxxx> --- mm/memcontrol.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-)
Sorry, this doesn't apply to linux-next as it conflicts with a previous patch that I sent out. Will send out a v2 soon.
-Longman