linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/hugeltb: fix renaming of PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN
@ 2021-03-31 16:38 Mike Rapoport
  2021-04-01 14:26 ` Pavel Tatashin
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2021-03-31 16:38 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mike Kravetz, Mike Rapoport, Mike Rapoport, Pavel Tatashin,
	linux-mm, linux-kernel

From: Mike Rapoport <rppt@linux.ibm.com>

The renaming of PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN missed one occurrence
in mm/hugetlb.c which causes build error:

  CC      mm/hugetlb.o
mm/hugetlb.c: In function ‘dequeue_huge_page_node_exact’:
mm/hugetlb.c:1081:33: error: ‘PF_MEMALLOC_NOCMA’ undeclared (first use in this function); did you mean ‘PF_MEMALLOC_NOFS’?
  bool pin = !!(current->flags & PF_MEMALLOC_NOCMA);
                                 ^~~~~~~~~~~~~~~~~
                                 PF_MEMALLOC_NOFS
mm/hugetlb.c:1081:33: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:273: recipe for target 'mm/hugetlb.o' failed
make[2]: *** [mm/hugetlb.o] Error 1

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
 mm/hugetlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index a5236c2f7bb2..c22111f3da20 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1078,7 +1078,7 @@ static void enqueue_huge_page(struct hstate *h, struct page *page)
 static struct page *dequeue_huge_page_node_exact(struct hstate *h, int nid)
 {
 	struct page *page;
-	bool pin = !!(current->flags & PF_MEMALLOC_NOCMA);
+	bool pin = !!(current->flags & PF_MEMALLOC_PIN);
 
 	lockdep_assert_held(&hugetlb_lock);
 	list_for_each_entry(page, &h->hugepage_freelists[nid], lru) {
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/hugeltb: fix renaming of PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN
  2021-03-31 16:38 [PATCH] mm/hugeltb: fix renaming of PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN Mike Rapoport
@ 2021-04-01 14:26 ` Pavel Tatashin
  2021-04-02  0:17   ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Tatashin @ 2021-04-01 14:26 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: Andrew Morton, Mike Kravetz, Mike Rapoport, linux-mm, LKML

On Wed, Mar 31, 2021 at 12:38 PM Mike Rapoport <rppt@kernel.org> wrote:
>
> From: Mike Rapoport <rppt@linux.ibm.com>
>
> The renaming of PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN missed one occurrence
> in mm/hugetlb.c which causes build error:
>
>   CC      mm/hugetlb.o
> mm/hugetlb.c: In function ‘dequeue_huge_page_node_exact’:
> mm/hugetlb.c:1081:33: error: ‘PF_MEMALLOC_NOCMA’ undeclared (first use in this function); did you mean ‘PF_MEMALLOC_NOFS’?
>   bool pin = !!(current->flags & PF_MEMALLOC_NOCMA);
>                                  ^~~~~~~~~~~~~~~~~
>                                  PF_MEMALLOC_NOFS
> mm/hugetlb.c:1081:33: note: each undeclared identifier is reported only once for each function it appears in
> scripts/Makefile.build:273: recipe for target 'mm/hugetlb.o' failed
> make[2]: *** [mm/hugetlb.o] Error 1
>
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> ---
>  mm/hugetlb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index a5236c2f7bb2..c22111f3da20 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -1078,7 +1078,7 @@ static void enqueue_huge_page(struct hstate *h, struct page *page)
>  static struct page *dequeue_huge_page_node_exact(struct hstate *h, int nid)
>  {
>         struct page *page;
> -       bool pin = !!(current->flags & PF_MEMALLOC_NOCMA);
> +       bool pin = !!(current->flags & PF_MEMALLOC_PIN);

Thank you Mike!

Andrew, since "mm cma: rename PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN" is
not yet in the mainline, should I send a new version of this patch so
we won't have bisecting problems in the future?

Thank you,
Pasha

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/hugeltb: fix renaming of PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN
  2021-04-01 14:26 ` Pavel Tatashin
@ 2021-04-02  0:17   ` Andrew Morton
  2021-04-02  0:24     ` Pavel Tatashin
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2021-04-02  0:17 UTC (permalink / raw)
  To: Pavel Tatashin; +Cc: Mike Rapoport, Mike Kravetz, Mike Rapoport, linux-mm, LKML

On Thu, 1 Apr 2021 10:26:36 -0400 Pavel Tatashin <pasha.tatashin@soleen.com> wrote:

> On Wed, Mar 31, 2021 at 12:38 PM Mike Rapoport <rppt@kernel.org> wrote:
> >
> > From: Mike Rapoport <rppt@linux.ibm.com>
> >
> > The renaming of PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN missed one occurrence
> > in mm/hugetlb.c which causes build error:
> >
> >   CC      mm/hugetlb.o
> > mm/hugetlb.c: In function ‘dequeue_huge_page_node_exact’:
> > mm/hugetlb.c:1081:33: error: ‘PF_MEMALLOC_NOCMA’ undeclared (first use in this function); did you mean ‘PF_MEMALLOC_NOFS’?
> >   bool pin = !!(current->flags & PF_MEMALLOC_NOCMA);
> >                                  ^~~~~~~~~~~~~~~~~
> >                                  PF_MEMALLOC_NOFS
> > mm/hugetlb.c:1081:33: note: each undeclared identifier is reported only once for each function it appears in
> > scripts/Makefile.build:273: recipe for target 'mm/hugetlb.o' failed
> > make[2]: *** [mm/hugetlb.o] Error 1
> >
> > Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> > ---
> >  mm/hugetlb.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> > index a5236c2f7bb2..c22111f3da20 100644
> > --- a/mm/hugetlb.c
> > +++ b/mm/hugetlb.c
> > @@ -1078,7 +1078,7 @@ static void enqueue_huge_page(struct hstate *h, struct page *page)
> >  static struct page *dequeue_huge_page_node_exact(struct hstate *h, int nid)
> >  {
> >         struct page *page;
> > -       bool pin = !!(current->flags & PF_MEMALLOC_NOCMA);
> > +       bool pin = !!(current->flags & PF_MEMALLOC_PIN);
> 
> Thank you Mike!
> 
> Andrew, since "mm cma: rename PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN" is
> not yet in the mainline, should I send a new version of this patch so
> we won't have bisecting problems in the future?

I've already added Mike's fix, as
mm-cma-rename-pf_memalloc_nocma-to-pf_memalloc_pin-fix.patch.  It shall
fold it into mm-cma-rename-pf_memalloc_nocma-to-pf_memalloc_pin.patch
prior to upstreaming, so no bisection issue.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/hugeltb: fix renaming of PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN
  2021-04-02  0:17   ` Andrew Morton
@ 2021-04-02  0:24     ` Pavel Tatashin
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Tatashin @ 2021-04-02  0:24 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Mike Rapoport, Mike Kravetz, Mike Rapoport, linux-mm, LKML

> > Andrew, since "mm cma: rename PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN" is
> > not yet in the mainline, should I send a new version of this patch so
> > we won't have bisecting problems in the future?
>
> I've already added Mike's fix, as
> mm-cma-rename-pf_memalloc_nocma-to-pf_memalloc_pin-fix.patch.  It shall
> fold it into mm-cma-rename-pf_memalloc_nocma-to-pf_memalloc_pin.patch
> prior to upstreaming, so no bisection issue.

Great, thank you!

Pasha

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-02  0:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 16:38 [PATCH] mm/hugeltb: fix renaming of PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN Mike Rapoport
2021-04-01 14:26 ` Pavel Tatashin
2021-04-02  0:17   ` Andrew Morton
2021-04-02  0:24     ` Pavel Tatashin

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).