Page MenuHomeFreeBSD

vm_radix: Add iter lookup_le interface
ClosedPublic

Authored by bnovkov on Oct 10 2024, 9:39 PM.
Tags
None
Referenced Files
F102789651: D47046.diff
Sun, Nov 17, 5:45 AM
Unknown Object (File)
Tue, Nov 12, 5:11 PM
Unknown Object (File)
Sat, Nov 9, 8:11 PM
Unknown Object (File)
Thu, Nov 7, 10:36 PM
Unknown Object (File)
Wed, Nov 6, 3:25 AM
Unknown Object (File)
Sun, Nov 3, 3:54 AM
Unknown Object (File)
Sat, Nov 2, 10:54 PM
Unknown Object (File)
Sun, Oct 20, 8:20 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59892
Build 56777: arc lint + arc unit

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.Sun, Oct 27, 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.