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

Andrew Morton
2008-11-11T21:02:21Z

On Tue, 11 Nov 2008 21:38:06 +0100
Andrea Arcangeli <aarcange@redhat.com> 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.