-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need on-demand enumeration capability #25
Comments
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
Merged
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
dankamongmen
added a commit
that referenced
this issue
Nov 3, 2019
This is a bit raw, but it's there. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The user ought at any point be able to get a list of all devices (not necessarily handles to all ifaces), routes, etc. There are two forms this could take:
I think 2 is the better one here, especially because other events could be interleaved with the series of callbacks, leading to confusion (they're also less performant). So if we're returning data, there are three things we could return:
In all cases, it's probably necessary that we have a streaming solution allowing for multiple calls. I don't think such a solution needs to (or should) guarantee atomicity.
In the end, I'm reminded very much of the
readdir(3)
system call, which is trying to solve the same problem. A space of entries, which might be modified at any time, is to be enumerated over multiple calls. The complete inodes describing these files are fairly large, and we're usually interested in only a small amount of the information.This points to a pretty solid solution IMHO:
IFLA_STATS
That seems reasonable. There are two potential problems, both related to streaming:
hnext
pointers currently form a finite list within each hash bucket, so they can't be used to walk the entire space. this isn't a big deal: either make them flow across buckets, or just recalculate our hash slot and move on to the next when we exhaust or list. this latter solution requires less bookkeeping, but requires walking all of our slots, whereas a complete list walks only those slots which are occupied.this latter seems to have no obvious exit, but.....it is unlikely that there will ever be a great many objects pending deletion nor more than a few active enumerations. maybe when we remove an object from the hash, check the active enumerations list (which might be active and/or deleted objects), see if it is
hnext
for any of them, and fix uphnext
(o(1)) in such cases. so that would be o(n) on every delete, but N ought almost always be very small...The text was updated successfully, but these errors were encountered: