OpenVZ Forum


Home » Mailing lists » Devel » [PATCH v3 00/10] IPC: checkpoint/restore in userspace enhancements
[PATCH v3 00/10] IPC: checkpoint/restore in userspace enhancements [message #47409] Fri, 10 August 2012 14:25 Go to previous message
Stanislav Kinsbursky is currently offline  Stanislav Kinsbursky
Messages: 683
Registered: October 2011
Senior Member
v3:
1) Copy messages to user-space under spinlock was replaced by allocation of
dummy message before queue lock and then copy of desired message to the dummy
one instead of unlinking it from queue list.
I.e. the message queue copy logic was changed: messages can be retrived one by
one (instead of receiving of the whole list at once).

This patch set is aimed to provide additional functionality for all IPC objects,
which is required for migration of these objects by user-space
checkpoint/restore utils (CRIU).

The main problem here was impossibility to set up object id. This patch set
solves the problem in two steps:
1) Makes it possible to create new object (shared memory, semaphores set or
messages queue) with ID, equal to passed key.
2) Makes it possible to change existent object key.

Another problem was to peek messages from queues without deleting them.
This was achived by introducing of new MSG_COPY flag for sys_msgrcv() and
MSG_SET_COPY command for sys_msgctl() (which can be used to select message
number to copy).

The following series implements...

---

Stanislav Kinsbursky (10):
ipc: remove forced assignment of selected message
ipc: "use key as id" functionality for resource get system call introduced
ipc: segment key change helper introduced
ipc: add new SHM_SET command for sys_shmctl() call
ipc: add new MSG_SET command for sys_msgctl() call
ipc: add new SEM_SET command for sys_semctl() call
IPC: message queue receive cleanup
IPC: message queue copy feature introduced
ipc: add new MSG_SET_COPY command for sys_msgctl() call
test: IPC message queue migration test


arch/tile/kernel/compat.c | 29 +++++++
include/linux/compat.h | 2
include/linux/ipc.h | 1
include/linux/msg.h | 11 ++
include/linux/sem.h | 1
include/linux/shm.h | 1
ipc/compat.c | 45 +++++++---
ipc/msg.c | 129 +++++++++++++++++++++++------
ipc/msgutil.c | 38 +++++++++
ipc/sem.c | 11 ++
ipc/shm.c | 14 +++
ipc/util.c | 59 ++++++++++++-
ipc/util.h | 4 +
security/selinux/hooks.c | 3 +
security/smack/smack_lsm.c | 3 +
tools/testing/selftests/ipc/msgque.c | 151 ++++++++++++++++++++++++++++++++++
16 files changed, 450 insertions(+), 52 deletions(-)
create mode 100644 tools/testing/selftests/ipc/msgque.c
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [RFC PATCH 1/2] unix sockets: add ability for search for peer from passed root
Next Topic: [PATCH] SUNRPC: check current nsproxy before set of node name on client creation
Goto Forum:
  


Current Time: Fri Jul 25 12:26:28 GMT 2025

Total time taken to generate the page: 0.18466 seconds