linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Uladzislau Rezki <urezki@gmail.com>
To: Song Liu <songliubraving@fb.com>
Cc: Song Liu <song@kernel.org>, Linux-MM <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Uladzislau Rezki <urezki@gmail.com>, Baoquan He <bhe@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] mm/vmalloc: Extend find_vmap_lowest_match_check with extra arguments
Date: Tue, 6 Sep 2022 20:27:26 +0200	[thread overview]
Message-ID: <YxeRDjJfYhXp+kE5@pc636> (raw)
In-Reply-To: <75CD7F46-F419-4D93-B59D-A8C0F942BB91@fb.com>

> 
> 
> > On Sep 5, 2022, at 11:05 PM, Song Liu <song@kernel.org> wrote:
> > 
> > find_vmap_lowest_match() is now able to handle different roots. With
> > DEBUG_AUGMENT_LOWEST_MATCH_CHECK enabled as:
> > 
> > diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> > index e68c0081e861..7552f1f8350e 100644
> > --- a/mm/vmalloc.c
> > +++ b/mm/vmalloc.c
> > @@ -713,7 +713,7 @@ EXPORT_SYMBOL(vmalloc_to_pfn);
> > /*** Global kva allocator ***/
> > 
> > -#define DEBUG_AUGMENT_LOWEST_MATCH_CHECK 0
> > +#define DEBUG_AUGMENT_LOWEST_MATCH_CHECK 1
> > 
> > compilation failed as:
> > 
> > mm/vmalloc.c: In function 'find_vmap_lowest_match_check':
> > mm/vmalloc.c:1328:32: warning: passing argument 1 of 'find_vmap_lowest_match' makes pointer from integer without a cast [-Wint-conversion]
> > 1328 |  va_1 = find_vmap_lowest_match(size, align, vstart, false);
> >     |                                ^~~~
> >     |                                |
> >     |                                long unsigned int
> > mm/vmalloc.c:1236:40: note: expected 'struct rb_root *' but argument is of type 'long unsigned int'
> > 1236 | find_vmap_lowest_match(struct rb_root *root, unsigned long size,
> >     |                        ~~~~~~~~~~~~~~~~^~~~
> > mm/vmalloc.c:1328:9: error: too few arguments to function 'find_vmap_lowest_match'
> > 1328 |  va_1 = find_vmap_lowest_match(size, align, vstart, false);
> >     |         ^~~~~~~~~~~~~~~~~~~~~~
> > mm/vmalloc.c:1236:1: note: declared here
> > 1236 | find_vmap_lowest_match(struct rb_root *root, unsigned long size,
> >     | ^~~~~~~~~~~~~~~~~~~~~~
> > 
> > Extend find_vmap_lowest_match_check() and find_vmap_lowest_linear_match()
> > with extra arguments to fix this.
> > 
> > Fixes: f9863be49312 ("mm/vmalloc: extend __alloc_vmap_area() with extra arguments")
> > Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
> > Cc: Baoquan He <bhe@redhat.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Signed-off-by: Song Liu <song@kernel.org>
> 
> Forgot to add the following from v1:
> 
> Reviewed-by: Baoquan He <bhe@redhat.com>
> Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> 

Works great to me. Appreciate it!

--
Uladzislau Rezki


      reply	other threads:[~2022-09-06 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06  6:05 Song Liu
2022-09-06 16:25 ` Song Liu
2022-09-06 18:27   ` Uladzislau Rezki [this message]

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=YxeRDjJfYhXp+kE5@pc636 \
    --to=urezki@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=song@kernel.org \
    --cc=songliubraving@fb.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