Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Mar 2011 17:18:24 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r219748 - stable/7/sys/kern
Message-ID:  <201103181718.p2IHIOaq075114@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Mar 18 17:18:24 2011
New Revision: 219748
URL: http://svn.freebsd.org/changeset/base/219748

Log:
  MFC 219399:
  When constructing a new cpuset, apply the parent cpuset's mask to the new
  set's mask rather than the root mask.  This was causing the root mask to
  be modified incorrectly.

Modified:
  stable/7/sys/kern/kern_cpuset.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/kern/kern_cpuset.c
==============================================================================
--- stable/7/sys/kern/kern_cpuset.c	Fri Mar 18 17:18:09 2011	(r219747)
+++ stable/7/sys/kern/kern_cpuset.c	Fri Mar 18 17:18:24 2011	(r219748)
@@ -253,7 +253,7 @@ cpuset_lookup(cpusetid_t setid, struct t
  * will have no valid cpu based on restrictions from the parent.
  */
 static int
-_cpuset_create(struct cpuset *set, struct cpuset *parent, cpuset_t *mask,
+_cpuset_create(struct cpuset *set, struct cpuset *parent, const cpuset_t *mask,
     cpusetid_t id)
 {
 
@@ -264,7 +264,7 @@ _cpuset_create(struct cpuset *set, struc
 	refcount_init(&set->cs_ref, 1);
 	set->cs_flags = 0;
 	mtx_lock_spin(&cpuset_lock);
-	CPU_AND(mask, &parent->cs_mask);
+	CPU_AND(&set->cs_mask, &parent->cs_mask);
 	set->cs_id = id;
 	set->cs_parent = cpuset_ref(parent);
 	LIST_INSERT_HEAD(&parent->cs_children, set, cs_siblings);
@@ -281,7 +281,7 @@ _cpuset_create(struct cpuset *set, struc
  * allocated.
  */
 static int
-cpuset_create(struct cpuset **setp, struct cpuset *parent, cpuset_t *mask)
+cpuset_create(struct cpuset **setp, struct cpuset *parent, const cpuset_t *mask)
 {
 	struct cpuset *set;
 	cpusetid_t id;
@@ -501,7 +501,7 @@ cpuset_which(cpuwhich_t which, id_t id, 
  * the new set is a child of 'set'.
  */
 static int
-cpuset_shadow(struct cpuset *set, struct cpuset *fset, cpuset_t *mask)
+cpuset_shadow(struct cpuset *set, struct cpuset *fset, const cpuset_t *mask)
 {
 	struct cpuset *parent;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103181718.p2IHIOaq075114>