I guess the current check for page count during free should catch
this too in general. Possibly PG_partial would be more reliable
because the page count is more susceptible to modification as it
is touched more often ...
>
> An alternative is to just set PG_inuse against _all_ pages
> in rmqueue(), and clear PG_inuse against all pages in
> __free_pages_ok(). Which seems cleaner, and would fix other
> problems, I suspect.
This works well for us. If no one minds the extra flag, and it
is preferable to the option of initializing page count for
higher order pages, we'll go ahead and do this.
BTW, with PG_inuse, we can detect higher order pages too - ones
which are in use, but have a zero page count, i.e. PG_inuse +
zero page count == equivalent to == PG_partial. So it is possible
to locate the main page (or initial page) of the higher order
area, just as with PG_partial.
Likewise, with PG_partial, since this would be set and cleared
during alloc/free, we can figure out if a page is in use by
checking if page count is non-zero or this is a partial page,
i.e. PG_Partial | page_count > 0 == equivalent to == PG_inuse.
We can take any one way and define appropriate macros to
get both effects.
Regards
Suparna
>
> -
-
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/