Skip to content

mempolicy: get_task_policy() cleanups/preparations

Oleg Nesterov linux-fsdevel lkml netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mempolicy: change alloc_pages_vma() to use mpol_cond_put()mm/mempolicy.c+1 -20 replies
1/4mempolicy: introduce __get_vma_policy(), export get_task_policy()include/linux/mempolicy.h mm/mempolicy.c+29 -180 replies
2/4mempolicy: change get_task_policy() to return default_policy rather than NULLmm/mempolicy.c+13 -180 replies
2/4mempolicy: fix show_numa_map() vs exec() + do_set_mempolicy() racefs/proc/task_mmu.c+9 -240 replies
3/4mempolicy: sanitize the usage of get_task_policy()mm/mempolicy.c+14 -110 replies
3/4mempolicy: kill do_set_mempolicy()->down_write(&mm->mmap_sem)mm/mempolicy.c+1 -140 replies
4/4mempolicy: remove the "task" arg of vma_policy_mof() and simplify itinclude/linux/mempolicy.h kernel/sched/fair.c mm/mempolicy.c+13 -160 replies
4/4mempolicy: unexport get_vma_policy() and remove its "task" arginclude/linux/mempolicy.h mm/mempolicy.c+8 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] mempolicy: get_task_policy() cleanups/preparations
Quoted 4 lines · Oleg Nesterov

With this change the only user of proc_maps_private->task is hold_task_mempolicy/release_task_mempolicy. I believe this code is buggy and should die, but this needs the changes in mm/mempolicy.c.

I belive that 9e7814404b77c3e8 "hold task->mempolicy while numa_maps scans" was wrong and it doesn't fix the problem.

I'll try to send the fix tomorrow, could you review the initial preparations? To me, these changes make sense as cleanups in any case, but I don't really understand this code and this was only compile tested.

Oleg.