Thread (22 messages) flat view 22 messages, 6 authors, 2022-10-13

Re: [External] Re: [RFC] mm: add new syscall pidfd_set_mempolicy()

From: Zhongkun He <hidden>
Date: 2022-10-13 12:51:15
Also in: linux-doc, linux-mm, lkml

quoted
Hi Michal

Could we try to change the MPOL_F_SHARED flag to MPOL_F_STATIC to
mark static mempolicy which cannot be freed, and mpol_needs_cond_ref
can use MPOL_F_STATIC to avoid freeing  the static mempolicy.
Wouldn't it make more sense to get rid of a different treatment and
treat all memory policies the same way?
I found a case, not sure if it makes sense. If there is no policy
in task->mempolicy, the use of atomic_{inc,dec} can be skiped
according  to MPOL_F_STATIC. Atomic_{inc,dec} in hot path may reduces 
performance.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help