On Tue, Dec 31, 2002 at 09:43:43AM -0500, Ed Tomlinson wrote:
> If anyone is using a current linux 2.5 kernel, the following patch
> may be of interest.  It lets you run you freenet node at nice 0 
> without a busy node 'stalling' your system.  Patch generated on
> 2.5.53 but will probably work with most recent 2.5 kernels.
What is the current status of this? Is it still necessary?
> 
> Comments?
> Ed Tomlinson
> 
> ----------  Forwarded Message  ----------
> 
> Subject: Re: [PATCH,RFC] fix o(1) handling of threads
> Date: Tue, 31 Dec 2002 09:33:39 -0500
> From: Ed Tomlinson <tomlins at cam.org>
> To: Alan Cox <alan at lxorguk.ukuu.org.uk>
> Cc: Linux Kernel Mailing List <linux-kernel at vger.kernel.org>, Robert Love 
> <rml at tech9.net>, Ingo Molnar <mingo at elte.hu>
> 
> On December 30, 2002 05:50 pm, Alan Cox wrote:
> > Very interesting, but I'll note there are actually two groupings to
> > solve - per user and per threadgroup. Also for small numbers of threads
> > you don't want to punish a task and ruin its balancing across CPUs
> >
> > Have you looked at the per user fair share stuff too ?
> 
> Two changes here.  First I have modified the timeslice compression
> calculation to make it more understandable.  Now 100/penalty gives
> the number of timeslices to distribute equally among the processes
> in the tread group or processes of a user.  For thread groups its
> now set so the time for 2 timeslices is distributed equally to the
> members of the group.
> 
> The second changes add a user throttle.  It would be better to get the
> USER_PENALTY from a per user source - suggestions?  Since limiting
> users is not a problem here, I have set the limit so a normal user
> can have 10 active process in runqueues before the timeslice compression
> starts.  Root is excluded from this logic.
> 
> In effect of this patch is to lower the priority of a user's processes
> or threads in a group.  It uses the same technique that O(1) uses
> for priorities to do this.
> 
> Comments
> Ed Tomlinson
> 
> PS. Its trivial to factor user vs thread group limits if required
> 
> diffstat ptg_B0
>  include/linux/sched.h |    7 +++++++
>  kernel/fork.c         |   22 ++++++++++++++++++++++
>  kernel/sched.c        |   22 +++++++++++++++++++++-
>  kernel/user.c         |    2 ++
>  4 files changed, 52 insertions(+), 1 deletion(-)
> 
<snip patch>

-- 
Matthew Toseland
toad at amphibian.dyndns.org/amphibian at users.sourceforge.net
Full time freenet hacker.
http://freenetproject.org/
Freenet Distribution Node (temporary) at 
http://amphibian.dyndns.org:8889/99bu9FNUM6c/
ICTHUS.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20030120/63613dfb/attachment.pgp>

Reply via email to