linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rebecca Mckeever <remckee0@gmail.com>
To: David Hildenbrand <david@redhat.com>
Cc: Mike Rapoport <rppt@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/5] memblock tests: introduce range tests for memblock_alloc_exact_nid_raw
Date: Wed, 2 Nov 2022 23:02:47 -0500	[thread overview]
Message-ID: <20221103040247.GA10663@sophie> (raw)
In-Reply-To: <b60e55de-46b7-3eeb-4ad1-914d8cc5f25b@redhat.com>

On Mon, Oct 31, 2022 at 11:28:15AM +0100, David Hildenbrand wrote:
> On 19.10.22 20:34, Rebecca Mckeever wrote:
> > Add TEST_F_EXACT flag, which specifies that tests should run
> > memblock_alloc_exact_nid_raw(). Introduce range tests for
> > memblock_alloc_exact_nid_raw() by using the TEST_F_EXACT flag to run the
> > range tests in alloc_nid_api.c, since memblock_alloc_exact_nid_raw() and
> > memblock_alloc_try_nid_raw() behave the same way when nid = NUMA_NO_NODE.
> > 
> > Rename tests and other functions in alloc_nid_api.c by removing "_try".
> > Since the test names will be displayed in verbose output, they need to
> > be general enough to refer to any of the memblock functions that the
> > tests may run.
> > 
> > Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
> 
> [...]
> 
> > diff --git a/tools/testing/memblock/tests/alloc_nid_api.c b/tools/testing/memblock/tests/alloc_nid_api.c
> > index 2c2d60f4e3e3..df8e7e038cab 100644
> > --- a/tools/testing/memblock/tests/alloc_nid_api.c
> > +++ b/tools/testing/memblock/tests/alloc_nid_api.c
> > @@ -18,18 +18,27 @@ static const unsigned int node_fractions[] = {
> >   	 625, /* 1/16 */
> >   };
> > -static inline const char * const get_memblock_alloc_try_nid_name(int flags)
> > +static inline const char * const get_memblock_alloc_nid_name(int flags)
> >   {
> > +	if (flags & TEST_F_EXACT)
> > +		return "memblock_alloc_exact_nid_raw";
> >   	if (flags & TEST_F_RAW)
> >   		return "memblock_alloc_try_nid_raw";
> >   	return "memblock_alloc_try_nid";
> >   }
> > -static inline void *run_memblock_alloc_try_nid(phys_addr_t size,
> > -					       phys_addr_t align,
> > -					       phys_addr_t min_addr,
> > -					       phys_addr_t max_addr, int nid)
> > +static inline void *run_memblock_alloc_nid(phys_addr_t size,
> > +					   phys_addr_t align,
> > +					   phys_addr_t min_addr,
> > +					   phys_addr_t max_addr, int nid)
> >   {
> 
> I think we want to assert here that TEST_F_EXACT without TEST_F_RAW is not
> set --- because there is no API to support it.
> 
Good idea. Thanks for pointing this out. I will add an assert.

> Apart from that
> 
> Acked-by: David Hildenbrand <david@redhat.com>
> 
> 
> Thanks!
> 
> -- 
> Thanks,
> 
> David / dhildenb
> 
Thanks,
Rebecca


  reply	other threads:[~2022-11-03  4:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 18:34 [PATCH v3 0/5] memblock tests: add " Rebecca Mckeever
2022-10-19 18:34 ` [PATCH v3 1/5] memblock tests: introduce range " Rebecca Mckeever
2022-10-31 10:28   ` David Hildenbrand
2022-11-03  4:02     ` Rebecca Mckeever [this message]
2022-10-19 18:34 ` [PATCH v3 2/5] memblock tests: add top-down NUMA " Rebecca Mckeever
2022-10-31 10:36   ` David Hildenbrand
2022-10-19 18:34 ` [PATCH v3 3/5] memblock tests: add bottom-up " Rebecca Mckeever
2022-10-31 10:39   ` David Hildenbrand
2022-10-19 18:34 ` [PATCH v3 4/5] memblock tests: add generic " Rebecca Mckeever
2022-10-31 12:42   ` David Hildenbrand
2022-10-19 18:34 ` [PATCH v3 5/5] memblock tests: remove completed TODO item Rebecca Mckeever
2022-10-31  5:00 ` [PATCH v3 0/5] memblock tests: add tests for memblock_alloc_exact_nid_raw Rebecca Mckeever
2022-10-31  8:43   ` Mike Rapoport
2022-10-31 12:43 ` David Hildenbrand

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=20221103040247.GA10663@sophie \
    --to=remckee0@gmail.com \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@kernel.org \
    /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