From: Yu Zhao <yuzhao@google.com>
To: Charan Teja Kalla <quic_charante@quicinc.com>,
Barry Song <21cnbao@gmail.com>
Cc: lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: [Chapter One] THP zones: the use cases of policy zones
Date: Fri, 1 Nov 2024 10:55:07 -0600 [thread overview]
Message-ID: <CAOUHufZ=MzQG56Y06R2=Zk9PD8tL8N8HCARoJd63WNPfaTWCpA@mail.gmail.com> (raw)
In-Reply-To: <2352282c-e96d-bd17-7591-9012e3b341dd@quicinc.com>
On Thu, Oct 31, 2024 at 8:35 PM Charan Teja Kalla
<quic_charante@quicinc.com> wrote:
>
> Hi Yu,
>
> On 3/1/2024 12:04 AM, Yu Zhao wrote:
> > diff --git a/include/linux/gfp.h b/include/linux/gfp.h
> > index de292a007138..c0f9d21b4d18 100644
> > --- a/include/linux/gfp.h
> > +++ b/include/linux/gfp.h
> > @@ -88,8 +88,8 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags)
> > * GFP_ZONES_SHIFT must be <= 2 on 32 bit platforms.
> > */
> >
> > -#if defined(CONFIG_ZONE_DEVICE) && (MAX_NR_ZONES-1) <= 4
> > -/* ZONE_DEVICE is not a valid GFP zone specifier */
> > +#if MAX_NR_ZONES - 2 - IS_ENABLED(CONFIG_ZONE_DEVICE) <= 4
> > +/* zones beyond ZONE_MOVABLE are not valid GFP zone specifiers */
> > #define GFP_ZONES_SHIFT 2
> > #else
> > #define GFP_ZONES_SHIFT ZONES_SHIFT
> > @@ -135,9 +135,29 @@ static inline enum zone_type gfp_zone(gfp_t flags)
> > z = (GFP_ZONE_TABLE >> (bit * GFP_ZONES_SHIFT)) &
> > ((1 << GFP_ZONES_SHIFT) - 1);
> > VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1);
> > +
> > + if ((flags & (__GFP_MOVABLE | __GFP_COMP)) == (__GFP_MOVABLE | __GFP_COMP))
> > + return LAST_VIRT_ZONE;
> > +
> Not sure If someone had already reported this: With this patch, we allow
> pages to allocate from movable zone(through fallback from
> LAST_VIRT_ZONE) even with out __GFP_HIGHMEM. The commit cc09cb134124a
> ("mm/page_alloc: Add folio allocation functions") sets the __GFP_COMP by
> default and user has just to pass the __GFP_MOVABLE. Please CMIW.
Hi Charan,
I don't remember whether we have this fixed in the Android kernel off
the top of head -- I'll ask Kalesh to take a closer look and follow up
with you.
Thanks!
next prev parent reply other threads:[~2024-11-01 16:55 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 18:34 [LSF/MM/BPF TOPIC] TAO: THP Allocator Optimizations Yu Zhao
2024-02-29 18:34 ` [Chapter One] THP zones: the use cases of policy zones Yu Zhao
2024-02-29 20:28 ` Matthew Wilcox
2024-03-06 3:51 ` Yu Zhao
2024-03-06 4:33 ` Matthew Wilcox
2024-02-29 23:31 ` Yang Shi
2024-03-03 2:47 ` Yu Zhao
2024-03-04 15:19 ` Matthew Wilcox
2024-03-05 17:22 ` Matthew Wilcox
2024-03-05 8:41 ` Barry Song
2024-03-05 10:07 ` Vlastimil Babka
2024-03-05 21:04 ` Barry Song
2024-03-06 3:05 ` Yu Zhao
2024-05-24 8:38 ` Barry Song
2024-11-01 2:35 ` Charan Teja Kalla
2024-11-01 16:55 ` Yu Zhao [this message]
2024-02-29 18:34 ` [Chapter Two] THP shattering: the reverse of collapsing Yu Zhao
2024-02-29 21:55 ` Zi Yan
2024-03-03 1:17 ` Yu Zhao
2024-03-03 1:21 ` Zi Yan
2024-06-11 8:32 ` Barry Song
2024-02-29 18:34 ` [Chapter Three] THP HVO: bring the hugeTLB feature to THP Yu Zhao
2024-02-29 22:54 ` Yang Shi
2024-03-01 15:42 ` David Hildenbrand
2024-03-03 1:46 ` Yu Zhao
2024-02-29 18:34 ` [Epilogue] Profile-Guided Heap Optimization and THP fungibility Yu Zhao
2024-03-05 8:37 ` [LSF/MM/BPF TOPIC] TAO: THP Allocator Optimizations Barry Song
2024-03-06 15:51 ` Johannes Weiner
2024-03-06 16:40 ` Zi Yan
2024-03-13 22:09 ` Kaiyang Zhao
2024-05-15 21:17 ` Yu Zhao
2024-05-15 21:52 ` Yu Zhao
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='CAOUHufZ=MzQG56Y06R2=Zk9PD8tL8N8HCARoJd63WNPfaTWCpA@mail.gmail.com' \
--to=yuzhao@google.com \
--cc=21cnbao@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=quic_charante@quicinc.com \
/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