lkml.org 
[lkml]   [2022]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] mm: skip reserved page for kmem leak scanning
    On Fri, Aug 26, 2022 at 11:13 AM zhaoyang.huang
    <zhaoyang.huang@unisoc.com> wrote:
    >
    > From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
    >
    > It is no need to scan reserved page, skip it.
    >
    > Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
    > ---
    > mm/kmemleak.c | 2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)
    >
    > diff --git a/mm/kmemleak.c b/mm/kmemleak.c
    > index a182f5d..c546250 100644
    > --- a/mm/kmemleak.c
    > +++ b/mm/kmemleak.c
    > @@ -1471,7 +1471,7 @@ static void kmemleak_scan(void)
    > if (page_zone(page) != zone)
    > continue;
    > /* only scan if page is in use */
    > - if (page_count(page) == 0)
    > + if (page_count(page) == 0 || PageReserved(page))
    Sorry for previous stupid code by my faint, correct it here
    > continue;
    > scan_block(page, page + 1, NULL);
    > if (!(pfn & 63))
    > --
    > 1.9.1
    >

    \
     
     \ /
      Last update: 2022-08-26 05:24    [W:4.315 / U:1.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site