Page MenuHomeFreeBSD

vm_radix: Add iter lookup_le interface
ClosedPublic

Authored by bnovkov on Oct 10 2024, 9:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 7:18 PM
Unknown Object (File)
Wed, Dec 4, 12:38 AM
Unknown Object (File)
Nov 17 2024, 5:45 AM
Unknown Object (File)
Nov 12 2024, 5:11 PM
Unknown Object (File)
Nov 9 2024, 8:11 PM
Unknown Object (File)
Nov 7 2024, 10:36 PM
Unknown Object (File)
Nov 6 2024, 3:25 AM
Unknown Object (File)
Nov 3 2024, 3:54 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

alc added a subscriber: dougm.

I'm looking at patches from both you and @dougm that define this function. However, each of you adds it in a different location within the file. :-)

There doesn't seem to be any rhyme or reason to the order of the function definitions. Could we please decide on one, and add this function accordingly?

This revision is now accepted and ready to land.Oct 27 2024, 8:44 PM

To be clear, there is no question that this function will get used, so adding it sooner, rather than later, would be okay with me.

In D47046#1078597, @alc wrote:

I'm looking at patches from both you and @dougm that define this function. However, each of you adds it in a different location within the file. :-)

There doesn't seem to be any rhyme or reason to the order of the function definitions. Could we please decide on one, and add this function accordingly?

I don't have a preference, I'm fine with anything as long as the function gets defined :)

In D47036, I put it after vm_radix_iter_step, mostly because PCTRIE_ITER_LOOKUP_LE comes shortly after PCTRIE_ITER_STEP_GE in pctrie.h. 'step' and 'jump' are built on top of lookup_ge, so I kept them grouped with lookup_ge.

I had a comment, and there should be one here for consistency with all the other little functions in this file.

I agree that we should have a sensible order to things, and that we don't. I suggest non-iter before iter, then insert before lookup before remove before replace before disposal, then lookup == before lookup >= before lookup <=.

In D47036, I put it after vm_radix_iter_step, mostly because PCTRIE_ITER_LOOKUP_LE comes shortly after PCTRIE_ITER_STEP_GE in pctrie.h. 'step' and 'jump' are built on top of lookup_ge, so I kept them grouped with lookup_ge.

I had a comment, and there should be one here for consistency with all the other little functions in this file.

I agree that we should have a sensible order to things, and that we don't. I suggest non-iter before iter, then insert before lookup before remove before replace before disposal, then lookup == before lookup >= before lookup <=.

I'm fine with this ordering. Please commit this function in a place consistent with this ordering. Consider the commit reviewed. We can rearrange the rest of the functions later.

This revision was automatically updated to reflect the committed changes.