lkml.org 
[lkml]   [2009]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH -mm] vmscan: make mapped executable pages the first class citizen
    From
    Date
    On Thu, 2009-05-07 at 17:10 +0200, Johannes Weiner wrote:

    > > @@ -1269,8 +1270,15 @@ static void shrink_active_list(unsigned
    > >
    > > /* page_referenced clears PageReferenced */
    > > if (page_mapping_inuse(page) &&
    > > - page_referenced(page, 0, sc->mem_cgroup))
    > > + page_referenced(page, 0, sc->mem_cgroup)) {
    > > + struct address_space *mapping = page_mapping(page);
    > > +
    > > pgmoved++;
    > > + if (mapping && test_bit(AS_EXEC, &mapping->flags)) {
    > > + list_add(&page->lru, &l_active);
    > > + continue;
    > > + }
    > > + }
    >
    > Since we walk the VMAs in page_referenced anyway, wouldn't it be
    > better to check if one of them is executable? This would even work
    > for executable anon pages. After all, there are applications that cow
    > executable mappings (sbcl and other language environments that use an
    > executable, run-time modified core image come to mind).

    Hmm, like provide a vm_flags mask along to page_referenced() to only
    account matching vmas... seems like a sensible idea.



    \
     
     \ /
      Last update: 2009-05-07 17:21    [W:0.022 / U:60.184 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site