lkml.org 
[lkml]   [2009]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [patch] drop epoll max_user_instances and rely only on max_user_watches
From
Hi Davide,

On Sun, Feb 1, 2009 at 2:30 PM, Davide Libenzi <davidel@xmailserver.org> wrote:
> On Sun, 1 Feb 2009, Michael Kerrisk wrote:
>
>> Hi Davide,
>>
>> On Fri, Jan 30, 2009 at 7:54 AM, Davide Libenzi <davidel@xmailserver.org> wrote:
>> > On Thu, 29 Jan 2009, Michael Kerrisk wrote:
>> >
>> >> Since max_user_instances was added in 2.6.28, and this is an ABI
>> >> change, I suggest this should go into .29-rc, so that
>> >> max_user_instances spends as little time in the wild as possible.
>> >
>> > Agreed, like I already told Andrew. Sorry Michael for the double change to
>> > the man page :/
>>
>> So is the right change to the epoll(7) page (see
>> http://www.kernel.org/doc/man-pages/online/pages/man7/epoll.7.html )
>> to simply remive the text on max_user_instances:
>>
>> /proc/sys/fs/epoll/max_user_instances (since Linux 2.6.28)
>> This specifies an upper limit on the number of epoll
>> instances that can be created per real user ID.
>>
>> Or are other changes also required?
>
> Yes. Plus, max_user_watches, instead of being 1/32 of lowmem, it's 4%.
> Just a detail.

Would you please review the following patch, which comments out the
text for max_user_instances, and updates the numbers for
max_user-watches.

Cheers,

Michael

diff --git a/man7/epoll.7 b/man7/epoll.7
index 7c67e13..6ee686e 100644
--- a/man7/epoll.7
+++ b/man7/epoll.7
@@ -172,10 +172,11 @@ with
.SS /proc interfaces
The following interfaces can be used to limit the amount of
kernel memory consumed by epoll:
-.TP
-.IR /proc/sys/fs/epoll/max_user_instances " (since Linux 2.6.28)"
-This specifies an upper limit on the number of epoll instances
-that can be created per real user ID.
+.\" Following was added in 2.6.28, but them removed in 2.6.29
+.\" .TP
+.\" .IR /proc/sys/fs/epoll/max_user_instances " (since Linux 2.6.28)"
+.\" This specifies an upper limit on the number of epoll instances
+.\" that can be created per real user ID.
.TP
.IR /proc/sys/fs/epoll/max_user_watches " (since Linux 2.6.28)"
This specifies a limit on the total number of
@@ -185,10 +186,10 @@ The limit is per real user ID.
Each registered file descriptor costs roughly 90 bytes on a 32-bit kernel,
and roughly 160 bytes on a 64-bit kernel.
Currently,
-.\" 2.6.28
+.\" 2.6.29 (in 2.6.28, the default was 1/32 of lowmem)
the default value for
.I max_user_watches
-is 1/32 of the available low memory,
+is 1/25 (4%) of the available low memory,
divided by the registration cost in bytes.
.SS Example for Suggested Usage
While the usage of

\
 
 \ /
  Last update: 2009-02-01 02:47    [W:2.066 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site