Re: radix_tree_next_chunk: redundant search for next slot in hole

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: pgpvqTUv4wXRp.pgp
Description: PGP signature

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

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux