Date: Wed, 04 Dec 2019 17:00:37 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 242427] pmap_remove() sometimes is very slow causing 10+ minutes long reboots Message-ID: <bug-242427-227-RwGEHm3xTD@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-242427-227@https.bugs.freebsd.org/bugzilla/> References: <bug-242427-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242427 --- Comment #3 from Peter Eriksson <pen@lysator.liu.se> --- (In reply to Mark Johnston from comment #1) # sysctl vm.pmap vm.pmap.pdpe.demotions: 3 vm.pmap.pde.promotions: 18422 vm.pmap.pde.p_failures: 1050 vm.pmap.pde.mappings: 11065 vm.pmap.pde.demotions: 1546 vm.pmap.allow_2m_x_ept: 1 vm.pmap.pcid_save_cnt: 2609830 vm.pmap.pti: 1 vm.pmap.invpcid_works: 1 vm.pmap.pcid_enabled: 1 vm.pmap.pg_ps_enabled: 1 vm.pmap.pat_works: 1 As for the questsions from Konstantin: CPU: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz (2100.04-MHz K8-class CPU) FreeBSD/SMP: 2 package(s) x 8 core(s) x 2 hardware threads hw.ncpu: 32 FreeBSD 11.3-RELEASE-p5 The measurements are very simple, one example from sys/vm/vm_kern.c > extern int verbose_shutdown; /* sysctl kern.shutdown.verbose, defined els= ewhere */ > > void > kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size) > { > vm_page_t m, next; > vm_offset_t end, offset; > time_t t0; > int dt; > > KASSERT(object =3D=3D kmem_object || object =3D=3D kernel_object, > ("kmem_unback: only supports kernel objects.")); > > if (verbose_shutdown > 3) > t0 =3D time_second; > > pmap_remove(kernel_pmap, addr, addr + size); > > if (verbose_shutdown > 3) { > dt =3D time_second - t0; > if (dt > 0) > printf("kmem_unback: pmap_remove(kernel_pmap, %lu, %lu) took %= d seconds\n", > (unsigned long) addr, (unsigned long) addr+size, dt); > t0 =3D time_second; > } The printed messages when dt is 1 (or more, but that hasn't happened yet) perfectly matches with the time spent (when measured "higher up" in the call chain and measured by a wall clock). (The resultion of time_second is seconds so probably should change to somet= hing with a bit higher resolution if I'd really wanna know how long time pmap_remove() takes) I haven't tested an INVARIANTS build yet, but will do that... --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-242427-227-RwGEHm3xTD>