objcache: Cache align magazinedepot and percpu_objcache
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 21 Oct 2012 08:36:37 +0000 (16:36 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 21 Oct 2012 08:36:37 +0000 (16:36 +0800)
sys/kern/kern_objcache.c

index 1a5fbec..d314888 100644 (file)
@@ -85,7 +85,7 @@ struct magazinedepot {
                                                 * return a full magazine to
                                                 * the depot */
        int                     contested;      /* depot contention count */
-};
+} __cachealign;
 
 /*
  * per-cpu object cache
@@ -104,7 +104,7 @@ struct percpu_objcache {
        /* infrequently used fields */
        int             waiting;        /* waiting for a thread on this cpu to
                                         * return an obj to the per-cpu cache */
-};
+} __cachealign;
 
 /* only until we have NUMA cluster topology information XXX */
 #define MAXCLUSTERS 1