Skip to content

Slab objects identifiers

Pavel Emelyanov linux-mm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5slab: Tossing bits aroundmm/slab.c mm/slub.c+33 -210 replies
2/5slab_id: Generic slab ID infrastructureinclude/linux/slab.h init/Kconfig mm/Makefile +1 more+52 -02 replies
3/5slab_id: Slab support for IDsmm/slab.c+38 -00 replies
4/5slab_id: Slub support for IDsmm/slub.c+71 -00 replies
5/5slab_id: Show the task's mm ID in procfs/proc/array.c fs/proc/base.c fs/proc/internal.h +1 more+26 -10 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/5] Slab objects identifiers

Hi.

While doing the checkpoint-restore in the userspace we need to determine whether various kernel objects (like mm_struct-s of file_struct-s) are shared between tasks and restore this state.

The 2nd step can for now be solved by using respective CLONE_XXX flags and the unshare syscall, while there's currently no ways for solving the 1st one.

One of the ways for checking whether two tasks share e.g. an mm_struct is to provide some mm_struct ID of a task to its proc file. The best from the performance point of view ID is the object address in the kernel, but showing them to the userspace is not good for performance reasons. Thus the ID should not be calculated based on the object address.

The proposal is to have the ID for slab objects as the mixture of two things - the number of an object on the slub and the ID of a slab, which is calculated simply by getting a monotonic 64 bit number at the slab allocation time which gives us 200+ years of stable work (see comment in the patch #2) :)

Thanks,
Pavel

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>