Date: Tue, 5 Nov 2019 21:38:48 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354367 - head/sys/vm Message-ID: <201911052138.xA5LcmBr034373@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Nov 5 21:38:48 2019 New Revision: 354367 URL: https://svnweb.freebsd.org/changeset/base/354367 Log: Switch cache zones from early counters to real implementation. Early counter mock can be only used on BSP for amd64, when APs try to update it that causes random memory corruption. N.B. This is a temporary patch to plug the corruption for now, while a proper solution for handling cache zones in zone_foreach() is being developed. In collaboration with: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation, Mellanox Technologies Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Nov 5 19:15:43 2019 (r354366) +++ head/sys/vm/uma_core.c Tue Nov 5 21:38:48 2019 (r354367) @@ -2198,6 +2198,7 @@ uma_startup2(void) static void uma_startup3(void) { + uma_zone_t zone; #ifdef INVARIANTS TUNABLE_INT_FETCH("vm.debug.divisor", &dbg_divisor); @@ -2205,6 +2206,8 @@ uma_startup3(void) uma_skip_cnt = counter_u64_alloc(M_WAITOK); #endif zone_foreach(zone_alloc_counters); + LIST_FOREACH(zone, &uma_cachezones, uz_link) + zone_alloc_counters(zone); callout_init(&uma_callout, 1); callout_reset(&uma_callout, UMA_TIMEOUT * hz, uma_timeout, NULL); booted = BOOT_RUNNING;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911052138.xA5LcmBr034373>