On January 20, 2003 05:21 pm, Matthew Toseland wrote: > 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?
Its never 100% necessary. What it does is allow you to control what share of _your_ box heavily threads apps, like freenet, will get. I have a version of this for 2.5.59 and older 2.4.20-aa and ac kernels. There has been no talk of puting this into the offical kernel though Alan Cox seem to like the idea behind the patch. With this patch my box (K6-3 400, 512M) never became unusable even when freenet (pre 651) ended up with 400+ threads and caused load averages of 20-30. Ed > > ---------- 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> _______________________________________________ devl mailing list devl at freenetproject.org http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/devl
