lkml.org 
[lkml]   [2009]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 15/22] Do not disable interrupts in free_page_mlock()
    Date
    > > @@ -556,6 +555,7 @@ static void __free_pages_ok(struct page *page, unsigned int order)
    > > unsigned long flags;
    > > int i;
    > > int bad = 0;
    > > + int clearMlocked = PageMlocked(page);
    > >
    > > for (i = 0 ; i < (1 << order) ; ++i)
    > > bad += free_pages_check(page + i);
    > > @@ -571,6 +571,8 @@ static void __free_pages_ok(struct page *page, unsigned int order)
    > > kernel_map_pages(page, 1 << order, 0);
    > >
    > > local_irq_save(flags);
    > > + if (unlikely(clearMlocked))
    > > + free_page_mlock(page);
    >
    > I wonder what the compiler does in the case
    > CONFIG_HAVE_MLOCKED_PAGE_BIT=n. If it is dumb, this patch would cause
    > additional code generation.

    if CONFIG_HAVE_MLOCKED_PAGE_BIT=n, PageMlocked() is {return 0;} then
    gcc can remove following code, I think.
    if (0)
    free_page_mlock(page)





    \
     
     \ /
      Last update: 2009-04-24 02:09    [W:0.028 / U:0.092 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site