[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-port-i386
Subject:    CAI_L3CACHE
From:       SAITOH Masanobu <msaitoh () execsw ! org>
Date:       2013-09-18 10:47:45
Message-ID: 523984D1.6060702 () execsw ! org
[Download RAW message or body]


 Hi.

 Last week, I added some new cache infomation for Intel CPUs.
When I did that, I noticed that CAI_L3CACHE exists and It's
not used for VM initialization.

 See x86/cpu.c::cpu_vm_init()

> cpu_vm_init(struct cpu_info *ci)
> {
> 	int ncolors = 2, i;
> 
> 	for (i = CAI_ICACHE; i <= CAI_L2CACHE; i++) { <===== Here!!!
> 		struct x86_cache_info *cai;
> 		int tcolors;
> 
> 		cai = &ci->ci_cinfo[i];
> 
> 		tcolors = atop(cai->cai_totalsize);
> 		switch(cai->cai_associativity) {
> 		case 0xff:
> 			tcolors = 1; /* fully associative */
> 			break;
> 		case 0:
> 		case 1:
> 			break;
> 		default:
> 			tcolors /= cai->cai_associativity;
> 		}

 Should we change the line to check CAI_L3CACHE, too?

I have no any CPU which has L3 cache, so I can't test it :-(


-- 
-----------------------------------------------
                SAITOH Masanobu (msaitoh@execsw.org
                                 msaitoh@netbsd.org)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic