kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* radix_tree_next_chunk: redundant search for next slot in hole
@ 2019-05-03 21:03 Probir Roy
  2019-05-03 22:38 ` Valdis Klētnieks
  0 siblings, 1 reply; 4+ messages in thread
From: Probir Roy @ 2019-05-03 21:03 UTC (permalink / raw)
  To: kernelnewbies, willy

Hi,

I am running Phoronix-fio benchmark on Linux kernel 4.18.0-rc5. I
observe that radix_tree_next_chunk search shows some form of a
redundant walk while called from radix_tree_for_each_slot iterator.
While searching for next slot in a hole, it walks through the same
slots over n over.

void __rcu **radix_tree_next_chunk(const struct radix_tree_root *root,
                 struct radix_tree_iter *iter, unsigned flags)
{
...
      if ((flags & RADIX_TREE_ITER_TAGGED) ?
                !tag_get(node, tag, offset) : !child) {
         ...
          while (++offset < RADIX_TREE_MAP_SIZE) {
                    void *slot = rcu_dereference_raw(   /* redundant
slot walk */
                            node->slots[offset]);
                    if (slot)
                        break;
                }
        }
...
}

Can you please explain such behavior? Any feedback/recommendation
about this case is very welcome.



-- 
Probir Roy

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, other threads:[~2019-05-04  0:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-05-04  0:00   ` Probir Roy
2019-05-04  0:56     ` Valdis Klētnieks

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