[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAmzW4NZ3aG6ZOJ1oFxHrB9AK01=5Kt0LsAw3HT14g9L3yyxzQ@mail.gmail.com>
Date: Thu, 23 Jul 2020 10:38:16 +0900
From: Joonsoo Kim <js1304@...il.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Matthew Wilcox <willy@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>, kernel-team@....com,
Christoph Hellwig <hch@...radead.org>,
Roman Gushchin <guro@...com>,
Mike Kravetz <mike.kravetz@...cle.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Michal Hocko <mhocko@...e.com>,
"Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>, stable@...r.kernel.org
Subject: Re: [PATCH] mm/page_alloc: fix memalloc_nocma_{save/restore} APIs
2020년 7월 21일 (화) 오후 9:39, Vlastimil Babka <vbabka@...e.cz>님이 작성:
>
> On 7/21/20 2:05 PM, Matthew Wilcox wrote:
> > On Tue, Jul 21, 2020 at 12:28:49PM +0900, js1304@...il.com wrote:
> >> +static inline unsigned int current_alloc_flags(gfp_t gfp_mask,
> >> + unsigned int alloc_flags)
> >> +{
> >> +#ifdef CONFIG_CMA
> >> + unsigned int pflags = current->flags;
> >> +
> >> + if (!(pflags & PF_MEMALLOC_NOCMA) &&
> >> + gfp_migratetype(gfp_mask) == MIGRATE_MOVABLE)
> >> + alloc_flags |= ALLOC_CMA;
> >
> > Please don't indent by one tab when splitting a line because it looks like
> > the second line and third line are part of the same block. Either do
> > this:
> >
> > if (!(pflags & PF_MEMALLOC_NOCMA) &&
> > gfp_migratetype(gfp_mask) == MIGRATE_MOVABLE)
> > alloc_flags |= ALLOC_CMA;
> >
> > or this:
> > if (!(pflags & PF_MEMALLOC_NOCMA) &&
> > gfp_migratetype(gfp_mask) == MIGRATE_MOVABLE)
> > alloc_flags |= ALLOC_CMA;
>
> Ah, good point.
Will change it.
Thanks.
Powered by blists - more mailing lists