lkml.org 
[lkml]   [2005]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Better pagecache statistics ?
    From
    Date

    Badari Pulavarty <pbadari@us.ibm.com> writes:

    > > Can't you add hooks to add_to_page_cache/remove_from_page_cache
    > > to record pagecache activity ?
    >
    > In theory, yes. We already maintain info in "mapping->nrpages".
    > Trick would be to collect all of them, send them to user space.

    If you happened to have a copy of systemtap built, you might run this
    script instead of inserting static hooks into your kernel. (The tool
    has come some way since the OLS '2005 demo.)

    #! stap
    probe kernel.function("add_to_page_cache") {
    printf("pid %d added pages (%d)\n", pid(), $mapping->nrpages)
    }
    probe kernel.function("__remove_from_page_cache") {
    printf("pid %d removed pages (%d)\n", pid(), $page->mapping->nrpages)
    }

    - FChE
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-12-02 23:18    [W:0.045 / U:30.428 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site