Subject: Re: port-mips/15965: NEW_PIPE broken on port-mips
To: Chuck Silvers <chuq@chuq.com>
From: Takao Shinohara <shin@sm.sony.co.jp>
List: netbsd-bugs
Date: 03/24/2002 16:58:05
Chuck Silvers <chuq@chuq.com> writes:
> the "bad" aliases we're generating now should not cause any problems,
> because all mappings of loaned pages are read-only and thus safe to cache
> if all the changes made to the page before the page is loaned are flushed
> to main memory when the loan is created. that's why the cache flush in
> pmap_protect() fixes the problem. are you sure NEW_PIPE still has
> problems on mips?
I couldn't figure out the scenario, but I can confirm that there is
virtual alias wich was detected by hardware(R4400 with S-cache).
My experiment was;
1) tweak pmap.c to enforce virtual alias elimination is enabled for
R4400 with SC.
(it is disabled by default for CPUs with SC.)
2) compile kernel with -DDEBUG.
3) make sure NEW_PIPE is used.
% cat opt_pipe.h
/* option `PIPE_NODIRECT' not defined */
/* option `PIPE_SOCKETPAIR' not defined */
4) boot kernel.
5) make sure VCED_count's are all 0 with ddb.
this means there was no virtual alias (no VCED was detected by hardware).
6) perform simple tar test.
% cd /; tar cf - bin | (cd /tmp; tar xfpv -)
7) examine VCED_count's and see there was virtual alias.
db> x/x VCED_count,12
VCED_count: 0 0 0 0 0 0
VCED_count+0x18: 0 0 c6bc 0 0
VCED_count+0x2c: 0 0 0 0 0
VCED_epc: 8012d83c ca55e7c0
--- Takao Shinohara