Skip to content

RFC user-cr: restart: Make task table portable

Matt Helsley containers 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6user-cr: restart: Make context globalrestart.c+316 -3280 replies
2/6user-cr: restart: Replace children pointer with indexrestart.c+18 -140 replies
3/6user-cr: restart: Replace next_sib pointer with an indexrestart.c+14 -140 replies
4/6user-cr: restart: Replace prev_sib pointer with indexrestart.c+11 -110 replies
5/6user-cr: restart: Replace phantom pointer with indexrestart.c+10 -100 replies
6/6user-cr: restart: Replace creator pointer with indexrestart.c+28 -220 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6][RFC] user-cr: restart: Make task table portable

This series modifies the task table entries to use indexes rather than pointers to create the tree. This is one step that enables the same table to be shared between multiple restart processes regardless of whether they are 32 or 64-bit.

Further steps, not in this set, include:
1. Mark bitness of each task in the table.
2. Share the table contents.
Probably via an fd passed during execve() then mmap()'ed
3. Find/modify restart to do execve() at the right spot.

The patches:
1/6 Make context global
2/6 Replace children pointer with index 3/6 Replace next_sib pointer with an index 4/6 Replace prev_sib pointer with index 5/6 Replace phantom pointer with index 6/6 Replace creator pointer with index

Each patch converts one of the fields to an index while leaving the others untouched. Should be bisect safe, but feel free to merge the patches if you like.

(These are RFC since they aren't properly tested and don't actually make restart do the 32/64-bit transitions but feel free to include them if you like.)

Cheers,
-Matt Helsley