lkml.org 
[lkml]   [2021]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 RFC 14/14] mm: speedup page alloc for MPOL_PREFERRED_MANY by adding a NO_SLOWPATH gfp bit
On Wed, Mar 10, 2021 at 10:44:11AM +0100, Michal Hocko wrote:
> On Wed 10-03-21 13:19:47, Feng Tang wrote:
> [...]
> > diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> > index d66c1c0..00b19f7 100644
> > --- a/mm/mempolicy.c
> > +++ b/mm/mempolicy.c
> > @@ -2205,9 +2205,13 @@ static struct page *alloc_pages_policy(struct mempolicy *pol, gfp_t gfp,
> > * | MPOL_PREFERRED_MANY (round 2) | local | NULL |
> > * +-------------------------------+---------------+------------+
> > */
> > - if (pol->mode == MPOL_PREFERRED_MANY)
> > + if (pol->mode == MPOL_PREFERRED_MANY) {
> > gfp_mask |= __GFP_RETRY_MAYFAIL | __GFP_NOWARN;
> >
> > + /* Skip direct reclaim, as there will be a second try */
> > + gfp_mask &= ~__GFP_DIRECT_RECLAIM;
>
> __GFP_RETRY_MAYFAIL is a reclaim modifier which doesn't make any sense
> without __GFP_DIRECT_RECLAIM. Also I think it would be better to have a
> proper allocation flags in the initial patch which implements the
> fallback.

Ok, will remove the __GFP_RETRY_MAYFAIL setting and folder this with
previous patch(8/14).

Thanks,
Feng

> > + }
> > +
> > page = __alloc_pages_nodemask(gfp_mask, order,
> > policy_node(gfp, pol, preferred_nid),
> > policy_nodemask(gfp, pol));
> > --
> > 2.7.4
> >
> >
>
> --
> Michal Hocko
> SUSE Labs

\
 
 \ /
  Last update: 2021-03-10 12:50    [W:0.059 / U:3.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site