lkml.org 
[lkml]   [2015]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 01/13] mm: support madvise(MADV_FREE)
    Hi Minchan,

    On (11/05/15 08:39), Minchan Kim wrote:
    [..]
    > >
    > > I think it makes sense to update pmd_trans_unstable() and
    > > pmd_none_or_trans_huge_or_clear_bad() comments in asm-generic/pgtable.h
    > > Because they explicitly mention MADV_DONTNEED only. Just a thought.
    >
    > Hmm, When I read comments(but actually I don't understand it 100%), it
    > says pmd disappearing from MADV_DONTNEED with mmap_sem read-side
    > lock. But MADV_FREE doesn't remove the pmd. So, I don't understand
    > what I should add comment. Please suggest if I am missing something.
    >

    Hm, sorry, I need to think about it more, probably my comment is irrelevant.
    Was fantasizing some stupid use cases like doing MADV_DONTNEED and MADV_FREE
    on overlapping addresses from different threads, processes that share mem, etc.

    > > > @@ -379,6 +502,14 @@ madvise_vma(struct vm_area_struct *vma, struct vm_area_struct **prev,
    > > > return madvise_remove(vma, prev, start, end);
    > > > case MADV_WILLNEED:
    > > > return madvise_willneed(vma, prev, start, end);
    > > > + case MADV_FREE:
    > > > + /*
    > > > + * XXX: In this implementation, MADV_FREE works like
    > > ^^^^
    > > XXX
    >
    > What does it mean?

    not much. just a minor note that there is a 'XXX' in "XXX: In this implementation"
    comment.

    -ss


    \
     
     \ /
      Last update: 2015-11-05 05:01    [W:5.408 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site