Page MenuHomeFreeBSD

vm_radix: Add iter lookup_le interface
AcceptedPublic

Authored by bnovkov on Thu, Oct 10, 9:39 PM.
Tags
None
Referenced Files
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
Unknown Object (File)
Sun, Oct 13, 4:56 AM
Unknown Object (File)
Sat, Oct 12, 12:22 PM
Unknown Object (File)
Fri, Oct 11, 9:02 PM
Unknown Object (File)
Fri, Oct 11, 9:50 AM
Subscribers

Details

Reviewers
markj
alc
kib

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.