From: Manfred Spraul <manfred@colorfullife.com>
To: Krzysztof Benedyczak <golbi@mat.uni.torun.pl>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
pwaechtler@mac.com, Michal Wronski <wrona@mat.uni.torun.pl>
Subject: Re: POSIX message queues
Date: Sun, 05 Oct 2003 12:11:59 +0200 [thread overview]
Message-ID: <3F7FEE6F.9050601@colorfullife.com> (raw)
In-Reply-To: <Pine.GSO.4.58.0310051047560.12323@ultra60>
Krzysztof Benedyczak wrote:
>Hello
>
>For quite a long time there are two implementations of posix mqueues
>around. I think it is time to decide at least if both of them have
>chances of beeing applied to official kernel. So I would
>like to know if Peter Waechtler's implementations is considered superior
>or there is possible some discussion and further work on our
>implementation is worthwhile.
>
>
Could you try to merge your work? Or at least: look at each others work.
For example Krzysiek/Michal's implementation has wake-one semantics,
which is IMHO a requirement.
Krzysiek: What is MQ_IOC_CLOSE? It looks like a stale ioctl. Please
remove such code from the patch.
The last time I looked at your patch I noticed a race between creation and setting queue attributes. Did you fix that?
>There are a lot of differencies but if the most important one is use of
>ioctl vs syscalls it can be changed (in fact our implementation loong time
>ago used syscalls).
>
>
I personally prefer syscalls, but that's just my personal preference.
For example the notification info is a structure, and printing it to a
text stream and then parsing it back again is just odd. And I don't see
how you can fix the O_CREAT+unusual mq_maxmsg races.
Why do you check against MQ_MAXMSG in user space? That's wrong. The
kernel will reject too large limits, probably depending on
/proc/sys/kern/ configuration. Checking in user space doesn't gain
anything, except that you loose the ability for runtime changes.
Please reuse the load_msg/store_msg functions instead of a
kmalloc(arg.msg_len, GFP_KERNEL) + copy_from_user. kmalloc(16384) is not
reliable - it needs a continuous block of 16 kB, and after a long
runtime, the memory is so fragmented that such memory may not exist.
This is a known problem for x86_64: They would prefer to have 16 kB
blocks for the stack, but this results in errors during stress testing.
proc_write_max_queues: off-by-one error. tmp[16] ='\0' overwrites the stack.
Is is necessary that the filesystem is visible to user space? What about
chroot environments, or environments with per-user mount points. I don't
like the dependence on /proc/mounts.
>In another words: is our implementation in the position
>of NGPT or better? ;-)
>
>
Do you know if Ulrich Drepper has looked at your user space libraries?
Your code must end up in glibc, and he's the maintainer.
--
Manfred
next prev parent reply other threads:[~2003-10-05 10:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-05 9:13 POSIX message queues Krzysztof Benedyczak
2003-10-05 10:11 ` Manfred Spraul [this message]
2003-10-06 19:04 ` Krzysztof Benedyczak
2003-10-05 16:35 ` Ulrich Drepper
2003-10-05 18:16 ` Jamie Lokier
2003-10-05 18:32 ` Jakub Jelinek
2003-10-05 19:18 ` Jamie Lokier
2003-10-05 21:52 ` Ulrich Drepper
-- strict thread matches above, loose matches on Subject: below --
2003-10-07 7:50 Peter Waechtler
2003-10-07 8:11 ` Jakub Jelinek
2002-10-02 10:35 Krzysztof Benedyczak
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=3F7FEE6F.9050601@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=golbi@mat.uni.torun.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=pwaechtler@mac.com \
--cc=wrona@mat.uni.torun.pl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox