Re: [PATCH] mm: fix struct page layout on 32-bit systems

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

 



On Sun, May 16, 2021 at 7:42 PM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> Ah, if you just put one dummy word in front, then dma_addr_t overlaps with
> page->mapping, which used to be fine, but now we can map network queues
> to userspace, page->mapping has to be NULL.

Well, that's a problem in itself. We shouldn't have those kinds of
"oh, it uses one field from one union, and another field from
another".

At least that "low bit of the first word" thing is documented, but
this kind of "oh, it uses dma_addr from one union and mapping from
another" really needs to go away. Because that's just not acceptable.

So that network stack thing should just make the mapping thing explicit then.

Possibly by making mapping/index be the first fields (for both the
page cache and the page_pool thing) and then have the LRU list and the
dma_addr be after that?

> While I've got you on the subject of compound_head ... have you had a look
> at the folio work?  It decreases the number of calls to compound_head()
> by about 25%, as well as shrinking the (compiled size) of the kernel and
> laying the groundwork for supporting things like 32kB anonymous pages
> and adaptive page sizes in the page cache.  Andrew's a bit nervous of
> it, probably because it's such a large change.

I guess I need to take a look. Mind sending me another pointer to the series?

                Linus



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux