On Wed, 6 Jul 2016 14:09:49 +0000 (UTC) Nathan Whitehorn <nwhiteh...@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 _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"