Thread (18 messages) flat view 18 messages, 3 authors, 2021-06-07

Re: [PATCH net-next v7 1/5] mm: add a signature in struct page

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-06-05 14:32:45
Also in: bpf, linux-rdma, lkml, netdev

On Sat, Jun 05, 2021 at 12:59:50AM +0200, Matteo Croce wrote:
On Fri, Jun 4, 2021 at 9:08 PM Matthew Wilcox [off-list ref] wrote:
quoted
On Fri, Jun 04, 2021 at 08:33:45PM +0200, Matteo Croce wrote:
quoted
@@ -130,7 +137,10 @@ struct page {
                      };
              };
              struct {        /* Tail pages of compound page */
-                     unsigned long compound_head;    /* Bit zero is set */
+                     /* Bit zero is set
+                      * Bit one if pfmemalloc page
+                      */
+                     unsigned long compound_head;
I would drop this hunk.  Bit 1 is not used for this purpose in tail
pages; it's used for that purpose in head and base pages.

I suppose we could do something like ...

 static inline void set_page_pfmemalloc(struct page *page)
 {
-       page->index = -1UL;
+       page->lru.next = (void *)2;
 }

if it's causing confusion.
If you prefer, ok for me.
Why not "(void *)BIT(1)"? Just to remark that it's a single bit and
not a magic like value?
I don't have a strong preference.  I'd use '2', but I wouldn't ask
BIT(1) to be changed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help