From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Probir Roy <proy.cse@gmail.com>
Cc: willy@linux.intel.com, kernelnewbies@kernelnewbies.org
Subject: Re: radix_tree_next_chunk: redundant search for next slot in hole
Date: Fri, 03 May 2019 18:38:39 -0400 [thread overview]
Message-ID: <6489.1556923119@turing-police> (raw)
In-Reply-To: <CALe4XzaF3efHzQi0k+gRHXp5ec0kbrtHzo2o_xdk6T5x8vr+-Q@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 722 bytes --]
On Fri, 03 May 2019 16:03:46 -0500, Probir Roy said:
> While searching for next slot in a hole, it walks through the same
> slots over n over.
How did you determine this?
> while (++offset < RADIX_TREE_MAP_SIZE) {
> void *slot = rcu_dereference_raw( /* redundant slot walk */
> node->slots[offset]);
> if (slot)
> break;
> }
Looks to me like the ++offset will walk through each potential slot once,
and break out if it finds one.
I haven't looked at the code closely, perhaps what you're seeing is repeated
scan/merge/rescan behavior? Often, compacting a data structure requires
multiple passes.
[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2019-05-03 22:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 21:03 radix_tree_next_chunk: redundant search for next slot in hole Probir Roy
2019-05-03 22:38 ` Valdis Klētnieks [this message]
2019-05-04 0:00 ` Probir Roy
2019-05-04 0:56 ` Valdis Klētnieks
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=6489.1556923119@turing-police \
--to=valdis.kletnieks@vt.edu \
--cc=kernelnewbies@kernelnewbies.org \
--cc=proy.cse@gmail.com \
--cc=willy@linux.intel.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;
as well as URLs for NNTP newsgroup(s).