From: Jason Baron <[email protected]>
Date: Fri, 16 Mar 2012 16:34:03 -0400
commit 93dc6107a76daed81c07f50215fa6ae77691634f upstream.
Commit 28d82dc1c4ed ("epoll: limit paths") that I did to limit the
number of possible wakeup paths in epoll is causing a few applications
to longer work (dovecot for one).
The original patch is really about limiting the amount of epoll nesting
(since epoll fds can be attached to other fds). Thus, we probably can
allow an unlimited number of paths of depth 1. My current patch limits
it at 1000. And enforce the limits on paths that have a greater depth.
This is captured in: https://bugzilla.redhat.com/show_bug.cgi?id=681578
Signed-off-by: Jason Baron <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Jonathan Nieder <[email protected]>
---
Hi Greg and Ben,
Please consider
93dc6107a76d Don't limit non-nested epoll paths, 2012-03-16
for application to the 3.0.y and 3.2.y trees. (This patch was merged
to v3.3 right before release, so 3.3.y already has it.) Like it says
on the cover, this patch addresses a regression introduced in 3.0.23
and 3.2.9 that broke dovecot setups with more than 1000 child
processes. See [1] for details.
The patch has been in use in Debian's 3.2.y-based kernel since a few
days after it was written.
Thanks,
Jonathan
[1] https://bugzilla.redhat.com/show_bug.cgi?id=681578
fs/eventpoll.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 6879d0c5cb5b..35a852a2682f 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -988,6 +988,10 @@ static int path_count[PATH_ARR_SIZE];
static int path_count_inc(int nests)
{
+ /* Allow an arbitrary number of depth 1 paths */
+ if (nests == 0)
+ return 0;
+
if (++path_count[nests] > path_limits[nests])
return -1;
return 0;
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html