All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Eric Gao <eric.tech@foxmail.com>
Cc: jbi.octave@gmail.com, linux-kernel@vger.kernel.org,
	Manfred Spraul <manfred@colorfullife.com>,
	Davidlohr Bueso <dave@stgolabs.net>
Subject: Re: [PATCH] ipc/msg: add msgsnd_timed and msgrcv_timed syscall for system V message queue
Date: Wed, 3 Mar 2021 17:12:20 -0800	[thread overview]
Message-ID: <20210303171220.79faee7108f846b8e140e44d@linux-foundation.org> (raw)
In-Reply-To: <tencent_E0772A5A82FD941DB0B488DF366F3F509F07@qq.com>

On Tue, 23 Feb 2021 23:11:43 +0800 Eric Gao <eric.tech@foxmail.com> wrote:

> sometimes, we need the msgsnd or msgrcv syscall can return after a limited
> time, so that the business thread do not be blocked here all the time. In
> this case, I add the msgsnd_timed and msgrcv_timed syscall that with time
> parameter, which has a unit of ms.

Please cc Manfred and Davidlohr on ipc/ changes.

The above is a very brief description for a new syscall!  Please go to
great lengths to tell us why this is considered useful - what are the
use cases?

Also, please fully describe the proposed syscall interface right here
in the changelog.  Please be prepared to later prepare a full manpage.

> ...
> +SYSCALL_DEFINE5(msgsnd_timed, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz,
> +		int, msgflg, long, timeoutms)

Specifying the timeout in milliseconds is problematic - it's very
coarse.  See sys_epoll_pwait2()'s use of timespecs.

       reply	other threads:[~2021-03-04  1:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_E0772A5A82FD941DB0B488DF366F3F509F07@qq.com>
2021-03-04  1:12 ` Andrew Morton [this message]
2021-03-04 19:57   ` [PATCH] ipc/msg: add msgsnd_timed and msgrcv_timed syscall for system V message queue Manfred Spraul
     [not found] <tencent_2CB9BD7D4063DE3F6845F79176B2D29A7E09@qq.com>
2021-02-28 15:38 ` Arnd Bergmann
2021-02-28 15:38   ` Arnd Bergmann
2021-02-28 15:38   ` Arnd Bergmann
     [not found]   ` <tencent_2B7E37BD494059DF7D6845F641769CD28209@qq.com>
2021-02-28 19:49     ` Arnd Bergmann
2021-02-28 19:49       ` Arnd Bergmann
2021-02-28 19:49       ` Arnd Bergmann
2021-02-27  6:52 Eric Gao
2021-02-27  6:52 ` Eric Gao
2021-02-27 12:29 ` Arnd Bergmann
2021-02-27 12:29   ` Arnd Bergmann
2021-02-27 12:29   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210303171220.79faee7108f846b8e140e44d@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dave@stgolabs.net \
    --cc=eric.tech@foxmail.com \
    --cc=jbi.octave@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.