Date: Wed, 6 Jul 2016 17:57:32 +0100 From: Andrew Turner <andrew@fubar.geek.nz> To: Nathan Whitehorn <nwhitehorn@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302372 - in head/sys: amd64/include cddl/compat/opensolaris/sys dev/cpuctl i386/include kern net netinet powerpc/include powerpc/powerpc vm Message-ID: <20160706175732.4a857719@zapp> In-Reply-To: <201607061409.u66E9nfV037939@repo.freebsd.org> References: <201607061409.u66E9nfV037939@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 6 Jul 2016 14:09:49 +0000 (UTC) Nathan Whitehorn <nwhitehorn@FreeBSD.org> wrote: > Author: nwhitehorn > Date: Wed Jul 6 14:09:49 2016 > New Revision: 302372 > URL: https://svnweb.freebsd.org/changeset/base/302372 > > Log: > Replace a number of conflations of mp_ncpus and mp_maxid with either > mp_maxid or CPU_FOREACH() as appropriate. This fixes a number of > places in the kernel that assumed CPU IDs are dense in [0, mp_ncpus) > and would try, for example, to run tasks on CPUs that did not exist > or to allocate too few buffers on systems with sparse CPU IDs in > which there are holes in the range and mp_maxid > mp_ncpus. Such > circumstances generally occur on systems with SMT, but on which SMT > is disabled. This patch restores system operation at least on POWER8 > systems configured in this way. > There are a number of other places in the kernel with potential > problems in these situations, but where sparse CPU IDs are not > currently known to occur, mostly in the ARM machine-dependent code. > These will be fixed in a follow-up commit after the stable/11 branch. > ... > Modified: head/sys/net/flowtable.c > ============================================================================== > --- head/sys/net/flowtable.c Wed Jul 6 10:57:04 2016 > (r302371) +++ head/sys/net/flowtable.c Wed Jul 6 14:09:49 > 2016 (r302372) @@ -746,7 +746,7 @@ flowtable_alloc(struct > flowtable *ft) ft->ft_table[i] = uma_zalloc(pcpu_zone_ptr, M_WAITOK | > M_ZERO); > ft->ft_masks = uma_zalloc(pcpu_zone_ptr, M_WAITOK); > - for (int i = 0; i < mp_ncpus; i++) { > + CPU_FOREACH(i) { This is broken, it removed the declaration of i. Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160706175732.4a857719>