Re: [patch 1/2] x86: track memtype for RAM in page struct

From: Frans Pop
Date: Sat Sep 13 2008 - 13:24:59 EST


Corrections for a few typos and some suggestions for minor improvements
in the comment.

Cheers,
FJP

Venkatesh Pallipadi wrote:
> --- tip.orig/arch/x86/mm/pat.c 2008-09-12 16:03:33.000000000 -0700
> +++ tip/arch/x86/mm/pat.c 2008-09-12 16:23:33.000000000 -0700
> @@ -211,6 +211,75 @@ static struct memtype *cached_entry;
> static u64 cached_start;
>
> /*
> + * RED-PEN: TODO: Add PageReserved() check aswell here,

"as well"

> + * once we add SetPageReserved() to all the drivers using
> + * set_memory_* or set_pages_*
> + *
> + * This will help prevent accidentally freeing pages
> + * before setting the attribute back to WB.
> + */
> +
> +/*
> + * For RAM pages, mark the pages with non WB attribute using

s/non WB/without the WB/ ?

> + * PG_arch_1. We allow only one set_memory_uc() or set_memory_wc()
> + * on a RAM page at a time before marking it as WB again. This is ok,
> + * because only one(driver) will be owning the page and doing

"one (driver)"
Maybe move "set_memory_*()" to next line (looks better).

> + * set_memory_*() calls.
> + *
> + * For now, we use PG_arch_1 to track that the RAM page is being mapped
> + * as non WB. In future, based on the need we can use one or more flags

s/based on the need/if needed,/

> + * (or some other mechanism in page_struct) to keep track of the actual
> + * attribute that the page is mapped to.
> + */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/