Re: Struct page proposal

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

 



On Mon, Sep 27, 2021 at 07:48:15PM +0200, Vlastimil Babka wrote:
> On 9/23/21 03:21, Kent Overstreet wrote:
> > So if we have this:
> > 
> > struct page {
> > 	unsigned long	allocator;
> > 	unsigned long	allocatee;
> > };
> > 
> > The allocator field would be used for either a pointer to slab/slub's state, if
> > it's a slab page, or if it's a buddy allocator page it'd encode the order of the
> > allocation - like compound order today, and probably whether or not the
> > (compound group of) pages is free.
> 
> The "free page in buddy allocator" case will be interesting to implement.
> What the buddy allocator uses today is:
> 
> - PageBuddy - determine if page is free; a page_type (part of mapcount
> field) today, could be a bit in "allocator" field that would have to be 0 in
> all other "page is allocated" contexts.
> - nid/zid - to prevent merging accross node/zone boundaries, now part of
> page flags
> - buddy order
> - a list_head (reusing the "lru") to hold the struct page on the appropriate
> free list, which has to be double-linked so page can be taken from the
> middle of the list instantly

That list_head is the problematic one. Why do we need to be able to take a page
from the middle of a freelist?



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux