[lkml]   [2003]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: PG_reserved bug
Ok, fair enough.  According to what you say, this behavior won't change in
2.6. So, I'm still left with my second question: since I do access the
pages from several places in my module, and I want to use the refcount field
of the struct page (and not have to wrap the pages in another structure) so
I know when my page is no longer referenced, how can I make sure it's 'safe'
to not use the reserved bit?


-----Original Message-----
From: William Lee Irwin III []
Sent: Wednesday, November 26, 2003 12:18 PM
To: Amir Hermelin
Subject: Re: PG_reserved bug

On Wed, Nov 26, 2003 at 12:09:58PM +0200, Amir Hermelin wrote:
> Hi,
> I've found a bug in the 2.4.20 kernel (might have appeared before),
> that if the PG_reserved flag is set on a page, its reference count
> will be incremented but won't be decremented. This is due to the
> wrong order of lazy if tests in __free_pages(). I have two questions:
> 1. How do I report it? I found no maintainer for MM in MAINTAINERS
> 2. I'm writing a module that gets pages (via __get_free_pages) and holds
> them throughout its lifetime. Where must I check if this page can be
> from under me, without using the reserved bit? In other words, if I want
> make sure the behavior is the same with or without the reserved bit, what
> must I maintain?

Reserved pages are excepted from normal reference counting rules. The
allocators of reserved pages are expected to clear reference counts
themselves before returning them to the system (if they ever do).

-- wli

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:58    [W:0.033 / U:1.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site