Re: [patch] drop epoll max_user_instances and rely only onmax_user_watches

From: Bron Gondwana
Date: Thu Jan 29 2009 - 03:42:24 EST


On Wed, Jan 28, 2009 at 08:56:07PM -0800, Davide Libenzi wrote:
> Linus suggested to put limits where the money is, and max_user_watches
> already does that w/out the need of max_user_instances. That has the
> advantage to mitigate the potential DoS while allowing pretty generous
> default behavior.
> Allowing top 4% of low memory (per user) to be allocated in epoll
> watches, we have:
>
> LOMEM MAX_WATCHES (per user)
> 512MB ~178000
> 1GB ~356000
> 2GB ~712000
>
> A box with 512MB of lomem, will meet some challenge in hitting 180K
> watches, socket buffers math teaches us.
> No more max_user_instances limits then.

Excellent. Glad to see :) Saves me from keeping on working on my "only
account epoll within epoll for max_user_instances" patch, which would
have just been needless complexity (though cheap - is_file_epoll looks
pretty easy to check for both descriptors) - and I hadn't even compiled
and tested it yet.

Thanks Davide - this will keep our mxes humming along happily.

Bron.
--
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/