-
Notifications
You must be signed in to change notification settings - Fork 297
Extended support for managing shared memory #972
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
Conversation
…code... - removed “alias” and “path” from core.shm - added “register” and “{create,open,delete}_frame” to core.shm - made core.counter API match create/open/delete interface - registered core.counter and core.histogram with core.shm - moved inline documentation of core.{shm,counter,histogram} to README.md - update modules to use shm frame abstraction where sensible
Cool! I like the idea of associating types and modules with shm objects. The objects are becoming richer over time, not just counters but also e.g. histograms and timeline logs, and I would really like to have this framework for associating useful functionality with those objects e.g. pretty-printing functions. This is something I have been lacking in terms of a UI for timeline objects. I already have a |
One related thought on the topic of counters... I would really like to have counters stored directly where they are accessed e.g. directly in One idea would be for What do you think? (Likely this is something we should consider separately to this PR - unless there is a performance impact on this branch that we need to mitigate.) |
Fixed merge conflicts from new debug vars
I second everything Luke said, including about reducing the number of pointers being a task for another PR, so I've upstreamed this at #982 . |
All reactions
@eugeneia need a @kbara if you want to drop these changes with a rebase that is fine with me. I think we would need to toggle the "protected" flag off from Otherwise |
I've run |
uhm... false alarm? ^^' I got things mixed up in my testing, shm_frame is actually OK. Can we still paddle back? I'm super sorry for the misinformation. |
I'm happy to peddle back. I have done a second push to the kbara fork re-instating the changes, and hadn't updated my kbara-next branch on the main repo. I've re-opened #982 as well. Glad to hear it was a false alarm - it looks like a nice set of changes. :-) |
Relatedly: I have also been starting to think about maintaining
The basic intention would be to avoid merging changes onto a well-known branch before I know whether it causes a performance regression or other test failure that can only be detected by CI. |
Sounds good, especially if there's an easy way for me to run a similar Hydra jobset on kbara-next. |
Update benchdata/ packets to match test configurations
This changes quite a few things around
core.shm
, mainly to remove statistics counter boilerplate, and to conveniently support multiple types of shared memory objects (as opposed to just counters). I am not super happy with theshm.{create,open,delete}_frame
abstraction but it does the job. Summary of changes:apps/
,links/
,engine/
,pci/
. Link structs are no longer exposed. All memory mapped files now have extensions that designate their type, for e.g.snabb top
to determine how to open them.-l
instead of-a
, which supports dumping engine/link counters as wellmyapp.shm
to declare objects.pci/<pciaddr>
usingshm.create_frame
core.shm
were removed for simplicity:alias
was unused, the wholepath
relative logic was removed (a single/
now means fully qualified, I found the path qualified logic to be error prone and unnecessary)core.counter
,core.histogram
) now use the newshm.register
to register themselves as types withcore.shm
. Its a bit magical but enables convenient use in apps and e.g. lets them implementtonumber
so they can be printed bysnabb top -l
core.counter
andcore.histogram
now implement a common interface:create
,open
and optionallydelete
Cc @alexandergall @lukego