]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - include/linux/mm_types.h
mm: remove misleading alignment claims
[mirror_ubuntu-jammy-kernel.git] / include / linux / mm_types.h
index 27973166af28c85f41d630b348ceaa8f9cf445ee..c2294e6204e80b48eea45531c6775ca9bc13703b 100644 (file)
@@ -33,11 +33,11 @@ struct hmm;
  * a page, though if it is a pagecache page, rmap structures can tell us
  * who is mapping it.
  *
- * The objects in struct page are organized in double word blocks in
- * order to allows us to use atomic double word operations on portions
- * of struct page. That is currently only used by slub but the arrangement
- * allows the use of atomic double word operations on the flags/mapping
- * and lru list pointers also.
+ * SLUB uses cmpxchg_double() to atomically update its freelist and
+ * counters.  That requires that freelist & counters be adjacent and
+ * double-word aligned.  We align all struct pages to double-word
+ * boundaries, and ensure that 'freelist' is aligned within the
+ * struct.
  */
 #ifdef CONFIG_HAVE_ALIGNED_STRUCT_PAGE
 #define _struct_page_alignment __aligned(2 * sizeof(unsigned long))
@@ -113,8 +113,6 @@ struct page {
        };
 
        /*
-        * Third double word block
-        *
         * WARNING: bit 0 of the first word encode PageTail(). That means
         * the rest users of the storage space MUST NOT use the bit to
         * avoid collision and false-positive PageTail().
@@ -175,7 +173,6 @@ struct page {
 #endif
        };
 
-       /* Remainder is not double word aligned */
        union {
                unsigned long private;          /* Mapping-private opaque data:
                                                 * usually used for buffer_heads