From: David Laight <David.Laight@ACULAB.COM>
To: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>,
"brouer@redhat.com" <brouer@redhat.com>
Cc: "arnd@kernel.org" <arnd@kernel.org>,
"grygorii.strashko@ti.com" <grygorii.strashko@ti.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"ilias.apalodimas@linaro.org" <ilias.apalodimas@linaro.org>,
"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mhocko@kernel.org" <mhocko@kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"mgorman@suse.de" <mgorman@suse.de>,
"mcroce@linux.microsoft.com" <mcroce@linux.microsoft.com>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"hch@lst.de" <hch@lst.de>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH 2/2] mm: Indicate pfmemalloc pages in compound_head
Date: Sat, 17 Apr 2021 21:13:45 +0000 [thread overview]
Message-ID: <2a531a42f23e4046833e0feb8faef0b5@AcuMS.aculab.com> (raw)
In-Reply-To: <20210416230724.2519198-3-willy@infradead.org>
From: Matthew Wilcox (Oracle) <willy@infradead.org>
> Sent: 17 April 2021 00:07
>
> The net page_pool wants to use a magic value to identify page pool pages.
> The best place to put it is in the first word where it can be clearly a
> non-pointer value. That means shifting dma_addr up to alias with ->index,
> which means we need to find another way to indicate page_is_pfmemalloc().
> Since page_pool doesn't want to set its magic value on pages which are
> pfmemalloc, we can use bit 1 of compound_head to indicate that the page
> came from the memory reserves.
>
...
> struct { /* page_pool used by netstack */
> - /**
> - * @dma_addr: might require a 64-bit value on
> - * 32-bit architectures.
> - */
> + unsigned long pp_magic;
> + unsigned long xmi;
> + unsigned long _pp_mapping_pad;
> unsigned long dma_addr[2];
> };
You've deleted the comment.
I also think there should be a comment that dma_addr[0]
must be aliased to ->index.
(Or whatever all the exact requirements are.)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2021-04-17 21:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 23:07 [PATCH 0/2] Change struct page layout for page_pool Matthew Wilcox (Oracle)
2021-04-16 23:07 ` [PATCH 1/2] mm: Fix struct page layout on 32-bit systems Matthew Wilcox (Oracle)
2021-04-17 1:08 ` kernel test robot
2021-04-17 2:45 ` Matthew Wilcox
2021-04-17 18:32 ` Ilias Apalodimas
2021-04-17 20:22 ` Matthew Wilcox
2021-04-18 11:21 ` Ilias Apalodimas
2021-04-17 21:18 ` David Laight
2021-04-17 22:45 ` Matthew Wilcox
2021-04-20 2:48 ` Vineet Gupta
2021-04-20 3:10 ` Matthew Wilcox
2021-04-20 7:07 ` Arnd Bergmann
2021-04-20 21:14 ` Vineet Gupta
2021-04-20 21:20 ` Arnd Bergmann
2021-04-21 5:50 ` hch
2021-04-21 8:43 ` David Laight
2021-04-21 8:58 ` Arnd Bergmann
2021-04-20 7:39 ` Geert Uytterhoeven
2021-04-20 8:39 ` David Laight
2021-04-20 11:32 ` Matthew Wilcox
2021-04-17 7:34 ` Jesper Dangaard Brouer
2021-04-20 7:21 ` Rasmus Villemoes
2021-04-16 23:07 ` [PATCH 2/2] mm: Indicate pfmemalloc pages in compound_head Matthew Wilcox (Oracle)
2021-04-17 21:13 ` David Laight [this message]
2021-04-17 21:28 ` Matthew Wilcox
2021-04-20 4:03 ` [PATCH 0/2] Change struct page layout for page_pool Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a531a42f23e4046833e0feb8faef0b5@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=arnd@kernel.org \
--cc=brouer@redhat.com \
--cc=grygorii.strashko@ti.com \
--cc=hch@lst.de \
--cc=ilias.apalodimas@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mcroce@linux.microsoft.com \
--cc=mgorman@suse.de \
--cc=mhocko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).