On 19/11/20(Thu) 01:02, Jeremie Courreges-Anglas wrote:
> On Wed, Nov 18 2020, Martin Pieuchot <[email protected]> wrote:
> > While auditing the various uses of the uvmexp fields I came across
> > those under #ifdet notyet. May I delete them so I don't have to give
> > them some MP love? Ok?
>
> ok jca@, but while here shouldn't the rest of cpu_vm_init() go too?
> Unless I'm missing something it doesn't have side effects except
> computing ncolors, and ncolors is meant to be used by the code you're
> removing.
Like that?
Index: arch/amd64//amd64/cpu.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/cpu.c,v
retrieving revision 1.150
diff -u -p -r1.150 cpu.c
--- arch/amd64//amd64/cpu.c 13 Sep 2020 11:53:16 -0000 1.150
+++ arch/amd64//amd64/cpu.c 19 Nov 2020 17:07:37 -0000
@@ -419,44 +419,6 @@ cpu_match(struct device *parent, void *m
return 1;
}
-static void
-cpu_vm_init(struct cpu_info *ci)
-{
- int ncolors = 2, i;
-
- for (i = CAI_ICACHE; i <= CAI_L2CACHE; i++) {
- 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;
- }
- ncolors = max(ncolors, tcolors);
- }
-
-#ifdef notyet
- /*
- * Knowing the size of the largest cache on this CPU, re-color
- * our pages.
- */
- if (ncolors <= uvmexp.ncolors)
- return;
- printf("%s: %d page colors\n", ci->ci_dev->dv_xname, ncolors);
- uvm_page_recolor(ncolors);
-#endif
-}
-
-
void cpu_idle_mwait_cycle(void);
void cpu_init_mwait(struct cpu_softc *);
@@ -689,7 +651,6 @@ cpu_attach(struct device *parent, struct
default:
panic("unknown processor type??");
}
- cpu_vm_init(ci);
#if defined(MULTIPROCESSOR)
if (mp_verbose) {
Index: arch/luna88k/luna88k/isr.c
===================================================================
RCS file: /cvs/src/sys/arch/luna88k/luna88k/isr.c,v
retrieving revision 1.11
diff -u -p -r1.11 isr.c
--- arch/luna88k/luna88k/isr.c 28 Jun 2017 10:31:48 -0000 1.11
+++ arch/luna88k/luna88k/isr.c 18 Nov 2020 13:11:27 -0000
@@ -151,10 +151,6 @@ isrdispatch_autovec(int ipl)
panic("isrdispatch_autovec: bad ipl %d", ipl);
#endif
-#if 0 /* XXX: already counted in machdep.c */
- uvmexp.intrs++;
-#endif
-
list = &isr_autovec[ipl];
if (LIST_EMPTY(list)) {
printf("isrdispatch_autovec: ipl %d unexpected\n", ipl);