lkml.org 
[lkml]   [2022]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [External] Re: [RFC] mm: add new syscall pidfd_set_mempolicy()
    From
    >> 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.

    \
     
     \ /
      Last update: 2022-10-13 14:51    [W:3.618 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site