]> www.infradead.org Git - users/dwmw2/linux.git/commit
um: add shared memory optimisation for time-travel=ext
authorJohannes Berg <johannes.berg@intel.com>
Tue, 2 Jul 2024 17:21:21 +0000 (19:21 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 3 Jul 2024 10:24:54 +0000 (12:24 +0200)
commitbfb80d8bc92fa70f5b44a57ed2b24d57685fe188
treeae078d1931baa857b0b610805c448ad77c651123
parente20f9b3c59041d82199e7a622efa4495dade66c5
um: add shared memory optimisation for time-travel=ext

With external time travel, a LOT of message can end up
being exchanged on the socket, taking a significant
amount of time just to do that.

Add a new shared memory optimisation to that, where a
number of changes are made:
 - the controller sends a client ID and a shared memory FD
   (and a logging FD we don't use) in the ACK message to
   the initial START
 - the shared memory holds the current time and the
   free_until value, so that there's no need to exchange
   messages for that
 - if the client that's running has shared memory support,
   any client (the running one included) can request the
   next time it wants to run inside the shared memory,
   rather than sending a message, by also updating the
   free_until value
 - when shared memory is enabled, RUN/WAIT messages no
   longer have an ACK, further cutting down on messages

Together, this can reduce the number of messages very
significantly, and reduce overall test/simulation run time.

Co-developed-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Link: https://patch.msgid.link/20240702192118.6ad0a083f574.Ie41206c8ce4507fe26b991937f47e86c24ca7a31@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/kernel/time.c
include/uapi/linux/um_timetravel.h