Re: [PATCH] POSIX message queues - syscalls & SIGEV_THREAD

From: Manfred Spraul
Date: Sun Nov 16 2003 - 10:36:48 EST


Krzysztof Benedyczak wrote:

+
+/proc/fs/mqueue/max_queues is a read/write file for setting/getting the
+maximum number of message queues allowed on the system.
+

Why did you add your own proc file, instead of a sysctl entry?

+#define MQ_MAXMSG 40 /* max number of messages in each queue */


In the long run, this should be run time configurable. For now it doesn't matter, but think about that when chosing algorithms.

+#define MQ_MAXSYSSIZE 1048576 /* max size that all m.q. can have together */

Dito: we must try to avoid global counters - they limit the scalability.

+static int wq_sleep(struct mqueue_inode_info *info, int sr,
+ signed long timeout, struct ext_wait_queue *wq_ptr)
+{

[snip]

+ if ((current->pid == (list_entry(info->e_wait_q[sr].list.prev, struct ext_wait_queue, list))->task->pid)

Why current->pid? "current == ...->task" is sufficient.

diff -urN 2.6.0-test9-orig/ipc/msg.c 2.6.0-test9-patched/ipc/msg.c
--- 2.6.0-test9-orig/ipc/msg.c 2003-11-07 17:07:13.000000000 +0100
+++ 2.6.0-test9-patched/ipc/msg.c 2003-11-07 18:30:17.000000000 +0100

[snip: move load_msg, free_msg to util.c]

Could you split that into a separate patch?

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/