Re: [PATCH v3 0/5] Add new system call for non-destructive peek and inspection to posix ipc mqueue
Andrei Vagin <[email protected]> Tue, 14 Apr 2026 09:39:59 -0700
| Newsgroups | dev.linux.lists.criu |
|---|---|
| Message-ID | <CAEWA0a6To8dmVXJduSCz8m8ip79MWv0C5-JWHjEpZVKJR9BD5w@mail.gmail.com> |
On Mon, Apr 13, 2026 at 5:40=E2=80=AFPM Mathura <[email protected]= > wrote: > > Well, I will see that for reference > Before that here is quick question from my side- > Which better and clean approach > > 1) Current implementation follows one system call to one msg copy to > user space as per priority and FIFO with a given index value from > posix IPC RB Tree, this allows us to go beyond Just from peek to > early inspection in some other use case by passing valid index. > > 2) Just dump everything and all data in one call to user space. It probably will not work reliably. I think we can do something inspired by recvmmsg: mq_recvmmsg(mqdes, iovec, iovec_len, attrs, attrs_len, flags) where attrs is an extandable structure: struct mq_recvmmsg_attrs { uint64_t peek_offset; // MSG_PEEK /* new fields can be added in the future */ } It is just an idea... Thanks, Andrei