Re: what happened to page_mkwrite? - was: Re: page_mkwrite seemsbroken

From: Hugh Dickins
Date: Mon Oct 24 2005 - 15:32:23 EST


On Mon, 24 Oct 2005, Anton Altaparmakov wrote:
> On Mon, 24 Oct 2005, Hugh Dickins wrote:
>
> Now you got me completely confused. Just when I thought I was
> understanding things. (-; Let me repeat what you say with some questions
> thrown in... Please bear with me and help me beat some clue into my
> head... (-:

Sorry for confusing you. I can't answer many of your questions, because
I don't know what you're doing or intending to do. But you expressed an
aversion to allocating pages unnecessarily. Probably that made me think
of memory allocation where you meant disk allocation.

Cutting a lot of questions...

> If your answer above is that the pages are normal page cache pages, then:

Nothing special needs doing if you choose to use normal page cache pages
even for the holes.

> If your answer above was ZERO_PAGE(), then:
>
> Is it to get rid of the zero page and replace it with the _real_, now
> allocated and writable page?

Yes.

> I have now read filemap_xip.c as it is in Linus kernel and see the
> ZERO_PAGE(). I guess that that is what you were talking about above all
> along and not normal page cache pages that happen to be zero. Correct?

Yes.

> In which case am I correct in saying that as long as I use
> filemap_nopage() and filemap_populate(), I can ignore your comment about
> updating mms as ZERO_PAGE() will _never_ be mapped and in fact just
> normal page cache pages containing zeroes will be mapped?

Yes.

> If that is correct then great. Otherwise I have missed the plot and would
> be very grateful if you were to impart some clue upon me. (-:
>
> Thanks a lot for your help! Much appreciated!

Sorry for the confusion: I was just trying to warn you of some difficulties
and their solution, if you were intending to pursue an alternative path.

Hugh
-
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/