|
|
Subscribe / Log in / New account

Fleshing out memory descriptors

Fleshing out memory descriptors

Posted May 27, 2024 16:07 UTC (Mon) by willy (subscriber, #9762)
In reply to: Fleshing out memory descriptors by koverstreet
Parent article: Fleshing out memory descriptors

There is no separately allocated struct buddy. Did you not read the article? Or the wiki pages that are linked?


to post comments

Fleshing out memory descriptors

Posted May 27, 2024 16:09 UTC (Mon) by willy (subscriber, #9762) [Link] (2 responses)

Hm, now I re-read the article, it's a little confusing and I see how someone could come away with the impression that there is.

There is not. I do not propose ever allocating a struct buddy.

That's clear in the wiki pages, I hope. And if it is, then I'll remedy that.

Fleshing out memory descriptors

Posted May 27, 2024 18:29 UTC (Mon) by pbonzini (subscriber, #60935) [Link] (1 responses)

It is clearer in the wiki, yes:
struct page {
    union {
        unsigned long memdesc;
        struct buddy buddy;
    };
};

Would it make sense to tackle the "private" field _last_ (not first) by sticking it in the second word of struct page, that is:

struct page {
    unsigned long memdesc_or_next;
    unsigned long private_or_prev;
};
?

Fleshing out memory descriptors

Posted May 27, 2024 18:56 UTC (Mon) by willy (subscriber, #9762) [Link]

Oh, interesting idea. That's a path to getting us to a 16 byte struct page sooner. I like it. There's various other work to be done to remove the use of page->flags (mostly things like looking up the zone/node/etc), but that needs to happen anyway.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds