Re: [PATCH 1/8] Scaling msgmni to the amount of lowmem

Previous thread: Re: aperture_64: use symbolic constants by Pavel Machek on Tuesday, May 20, 2008 - 7:27 am. (7 messages)

Next thread: [GIT] HID fixes for 2.6.26-rc4 by Jiri Kosina on Tuesday, May 20, 2008 - 7:30 am. (1 message)
From: Michael Kerrisk
Date: Tuesday, May 20, 2008 - 7:28 am

Hello Nadia,

Regarding your:

[PATCH 1/8] Scaling msgmni to the amount of lowmem
http://article.gmane.org/gmane.linux.kernel/637849/
which I see has made its way in 2.6.26-rc

Your patch has the following change:

-#define MSGPOOL (MSGMNI*MSGMNB/1024)  /* size in kilobytes of message pool */
+#define MSGPOOL (MSGMNI * MSGMNB) /* size in bytes of message pool */

Since this constitutes a kernel-userland interface change, so please
do CC me, so that I can change the man pages if needed.

The man page (http://www.kernel.org/doc/man-pages/online/pages/man2/msgctl.2.html)
does indeed say that msgpool is "unused".  But that meant "unused by
the kernel" (sorry -- I probably should have worded that text better).
 And, as you spotted, the page also wrongly said the value is in
bytes.

However, making this change affects the ABI.  A userspace application
that was previously using msgctl(IPC_INFO) to retrieve the msgpool
field will be affected by the factor-of-1024 change.  I strongly
suspect that there no such applications, or certainly none that care
(since this value is unused by the kernel).  But was there a reason
for making this change, aside from the fact that the code and the man
page didn't agree?

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--

From: Nadia Derbey
Date: Tuesday, May 20, 2008 - 7:45 am

No, that was the only reason.
Should I repost a patch to set it back as it used to be?

Regards
Nadia
--

From: Michael Kerrisk
Date: Tuesday, May 20, 2008 - 7:56 am

[Fixing the bad list address in my initial mail: CC += linux-mm@kvack.org]


On the one hand, I'd be inclined to leave things as they were pre
2.6.26.  On the other hand, I believe that on other systems that have
the limit, msgpool is a limit in bytes.  (But documentation of these
details on other systems is very thin on the ground.)  I wonder if
anyone else has some knowledge here?


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--

From: Michael Kerrisk
Date: Wednesday, May 21, 2008 - 3:47 am

Nadia,

I think for the moment it might be best to revert that change, since
there's no actual need to change things.  I've updated the man page to
say that this value is in kibibytes.

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--

Previous thread: Re: aperture_64: use symbolic constants by Pavel Machek on Tuesday, May 20, 2008 - 7:27 am. (7 messages)

Next thread: [GIT] HID fixes for 2.6.26-rc4 by Jiri Kosina on Tuesday, May 20, 2008 - 7:30 am. (1 message)