lkml.org 
[lkml]   [2009]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: Warn once when a page is freed with PG_mlocked set V2
On Fri, Jul 24, 2009 at 11:36:56AM +0100, Mel Gorman wrote:
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index b8283e8..d3d0707 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -488,6 +488,11 @@ static inline void __free_one_page(struct page *page,
> */
> static inline void free_page_mlock(struct page *page)
> {
> + WARN_ONCE(1, KERN_WARNING
> + "Page flag mlocked set for process %s at pfn:%05lx\n"
> + "page:%p flags:%#lx\n",
> + current->comm, page_to_pfn(page),
> + page, page->flags|__PG_MLOCKED);

I don't think printing page->flags is all too useful after they have
been cleared by free_pages_check().

But it's probably a reasonable trade-off for not having it in the
fast-path.

Acked-by: Johannes Weiner <hannes@cmpxchg.org>


\
 
 \ /
  Last update: 2009-07-24 14:05    [W:0.073 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site