Skip to content

Tags: efficient/libinger

Tags

thesis

README.md: Document some widely-applicable troubleshooting tidbits

inger-thesis

external/libgotcha: Bump for significant launch()/resume() latency fix

(and a fix for a case where the exit analysis optimization was too aggressive)

gotcha-thesis

Implement optional exit analysis optimization

For control libraries that implement function-granularity task abstractions with custom interfaces,
it is impossible for a task to run from its definition in the shared group unless it is defined in
the same object file that interacts with the task abstraction's interface (because otherwise the
object file interacting with the interface would see the function's symbol resolve to a PLOT stub*).
Then, assuming said abstraction is implemented as an internal control library, we can tell whether
a given object file can ever exit the shared namespace once it is running in that copy based on
whether that object file depends on our object file (since otherwise it could never be running from
this copy while its [next] group was set to an ancillary namespace).

This patch adds a static configuration flag in the form of the weak libgotcha_exitanalysis boolean,
which a control library can define to request that we skip intercepting calls out of object files in
the shared namespace that do not meet this test.  Note that this is not currently useful to external
control libraries, but could be made so by turning it into something like a string that the control
library could use to identify itself.

One CANNOT apply this optimization to control libraries that change the semantics of an existing
abstraction with a well-established interface, such as signal handling or thread cancellation.
(This is because using such an abstraction involves calls to a third-party library such as libc, so
the sieve wouldn't work unless we extended the definition of dependency to include object files with
symbol references that resolved back to our module.)  An easy rule of thumb is that if you could
preload the control library to obtain an effect similar to that of linking the application against
it, then this is not the optimization you are looking for.

* This is assuming, of course, that the task abstraction did not use or expose a frontend to our
libgotcha_group_symbol*() interfaces.

inger-atc20-cfp

Used to generate Table 2 of the original ATC '20 submission.

gotcha
NUM_SHADOW_NAMESPACES: 511

glibc-2.29
DL_NNS:             512
TLS_STATIC_SURPLUS: 64 + DL_NNS * 256000

gotcha-atc20-cfp

Used to generate Table 3 of the original ATC '20 submission.

vanilla glibc-2.29