From: Yury Norov <yury.norov@gmail.com>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: linux@rasmusvillemoes.dk, willy@infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] radix tree test suite: put definition of bitmap_clear() into lib/bitmap.c
Date: Wed, 10 Jul 2024 09:44:57 -0700 [thread overview]
Message-ID: <Zo66iTOi8548Taxo@yury-ThinkPad> (raw)
In-Reply-To: <20240710163134.a36xircnefbz5m6n@master>
On Wed, Jul 10, 2024 at 04:31:34PM +0000, Wei Yang wrote:
> On Wed, Jul 10, 2024 at 09:17:00AM -0700, Yury Norov wrote:
> >On Wed, Jul 10, 2024 at 09:55:54AM +0000, Wei Yang wrote:
> >> Instead of keeping a bitmap.c in radix-tree own directory, we can use
> >> the common implementation in lib/ directory.
> >>
> >> Just move the definition and link some related libs, no functional
> >> change.
> >>
> >> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
> >> CC: Matthew Wilcox <willy@infradead.org>
> >
> >Hi Wei,
> >
> >bitmap_clear() is not used in radix tests, and in fact not used
> >anywhere in tools at all. Unless you have plans on it, it's
> >better to drop bitmap_clear() from tools, instead of bloating
> >the library.
>
> I guess you didn't try to compile the test. After remove the bitmap_clear(),
> we see this error.
No, I didn't.
> cc -fsanitize=address -fsanitize=undefined main.o xarray.o radix-tree.o idr.o linux.o test.o maple.o slab.o find_bit.o bitmap.o hweight.o vsprintf.o regression1.o regression2.o regression3.o regression4.o tag_check.o multiorder.o idr-test.o iteration_check.o iteration_check_2.o benchmark.o -lpthread -lurcu -o main
> /usr/bin/ld: xarray.o: in function `xas_squash_marks':
> /home/richard/git/linux/tools/testing/radix-tree/../../../lib/xarray.c:139: undefined reference to `bitmap_clear'
Ok then. If xarray userspace test pulls code directly from kernel
part, we still need bitmap_clear.
Since the function was introduced, we wrote an inline version of
it. We usually try to keep tools implementation synced with the
mother kernel, particularly for extra testing coverage.
Can you please send a v2 that syncs tools implementation with the
kernel one, and can you also mention how it is used in the code,
so those lazy folks like me will not get fooled with grep.
Thanks,
Yury
prev parent reply other threads:[~2024-07-10 16:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-10 9:55 [PATCH] radix tree test suite: put definition of bitmap_clear() into lib/bitmap.c Wei Yang
2024-07-10 16:17 ` Yury Norov
2024-07-10 16:31 ` Wei Yang
2024-07-10 16:44 ` Yury Norov [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=Zo66iTOi8548Taxo@yury-ThinkPad \
--to=yury.norov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=richard.weiyang@gmail.com \
--cc=willy@infradead.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