Re: [PATCH 1/4] rmap: add page_wrprotect() function,

From: Andrew Morton
Date: Tue Nov 11 2008 - 16:02:22 EST


On Tue, 11 Nov 2008 21:38:06 +0100
Andrea Arcangeli <aarcange@xxxxxxxxxx> wrote:

> > > + * set all the ptes pointed to a page as read only,
> > > + * odirect_sync is set to 0 in case we cannot protect against race with odirect
> > > + * return the number of ptes that were set as read only
> > > + * (ptes that were read only before this function was called are couned as well)
> > > + */
> >
> > But it isn't.
>
> What isn't?

This code comment had the kerneldoc marker ("/**") but it isn't a
kerneldoc comment.

> > I don't understand this odirect_sync thing. What race? Please expand
> > this comment to make the function of odirect_sync more understandable.
>
> I should have answered this one with the above 3 links.

OK, well can we please update the code so these things are clearer.

(It's a permanent problem I have. I ask "what is this", but I really
mean "the code should be changed so that readers will know what this is")

> > What do you think about making all this new code dependent upon some
> > CONFIG_ switch which CONFIG_KVM can select?
>
> I like that too.
--
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/