lkml.org 
[lkml]   [2005]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Some debugging patches on top of -mm
    Alexander,

    This patch, known as page-owner-tracking-leak-detector.patch has
    apparently been sitting in Andrew's *-mm for the last two months.

    I just noticed it now, when reading mm/page_alloc.c.

    I'd like to know if the #ifdef's and CONFIG_PAGE_OWNER specific code
    can be removed from page_alloc.c, and put in a header file. Ideally,
    you patch would add just one line to the __alloc_pages() code - a call
    to set_page_owner() that either became no code (a static inline empty
    function) or a call to your code, if this feature was CONFIG enabled.

    The *.c files are where all the logic comes together, and it is vital
    to the long term readability of these files that we avoid #ifdef's in
    these files. Any one feature can be ifdef'd in, with seeming little
    harm to the readability of the code (especially in the eyes of the
    author of that particular bit of ifdef'd code ;). But imagine what
    a deity-awful mess these files would be if we had all been doing that
    over the years with our various favorite features.

    I am not sure which header file - quite possibly in a new header
    file just for this feature (unless others have the good sense to
    recommend better.) Static inline code that is only called from
    one place should work fine in a header file, at least technically.

    --
    I won't rest till it's the best ...
    Programmer, Linux Scalability
    Paul Jackson <pj@sgi.com> 1.925.600.0401
    -
    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-11-12 12:17    [W:6.322 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site