Subject: Re: a new pmap_copy_page() and pmap_zero_page()
To: None <port-mips@netbsd.org>
From: Toru Nishimura <locore32@gaea.ocn.ne.jp>
List: port-mips
Date: 10/08/2003 09:05:09
"Rafal Boni" said;

> -> There are possible cases when src VA and dst VA might disagree in cache
> -> slide, for example, fancy address sharing to go.  However, kernel should
> -> have full control in choosing the new VA of these cases, and then diffi-
> -> culties can be avoid.
> 
> I'm not sure full control is possible w/out limiting how users map pages
> via mmap, etc.

I so far recognize two cases.  One is kernel is going to share address
space between user space and in-kernel buffer.  I think this is done when
raw block device address by dump(8).  Kernel is allowed to take into count
the VA of user space to choose KVA for it.   The next case is for mmap(2)
by user programs.   It's a general practice to follow how kernel instructs when
making address space sharing ("use the return value of mmap call").  If users
insist to mmap address as they want, he/she are responsible to
do-the-right-thing probably arbeiting machine specific cachectl calls to go.
That's kernel should know what's the best way for typical cases.

Toru Nishmura/ALKYL Technology