A plan for supporting PageMovable in 2025

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With the upcoming shrink of struct page to 4 words, we need a plan for
handling PageMovable.  Ideally this does not involve memory allocation,
and is a relatively simple change from what we have now.  To shrink
struct page beyond 4 words, we'll need a better plan, but I think this
will do for the next few months.
 
The current proposed layout for struct page is:

struct page {
    unsigned long flags;
    union {
        struct list_head buddy_list;
        struct list_head pcp_list;
        struct {
            unsigned long memdesc;
            union {
                unsigned long private;
                atomic_t _mapcount;
            };
        };
    };
    int _refcount;
};

My proposal for movable non-folio pages is:

 * memdesc is used to point to struct movable_operations (these will
   need to be aligned to 16 bytes, but I think that's fine)
 * private is used to point to the next page in the list
 * These pages are refcounted
 * We retain a "lock" bit in page->flags

The most disruptive part of this is that we can't use a list_head any
more.  I don't think a singly-linked list is prohibitive, but either
we need to switch folios to also use a singly-linked list, or we need
to handle folios & movable pages separately.  I think the former is
probably best.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux