From owner-p4-projects@FreeBSD.ORG Thu Jan 27 20:04:30 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB2F41065675; Thu, 27 Jan 2011 20:04:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BAEB106566B for ; Thu, 27 Jan 2011 20:04:30 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 594008FC14 for ; Thu, 27 Jan 2011 20:04:30 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p0RK4UDE078255 for ; Thu, 27 Jan 2011 20:04:30 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p0RK4UhG078252 for perforce@freebsd.org; Thu, 27 Jan 2011 20:04:30 GMT (envelope-from trasz@freebsd.org) Date: Thu, 27 Jan 2011 20:04:30 GMT Message-Id: <201101272004.p0RK4UhG078252@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 188239 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2011 20:04:30 -0000 http://p4web.freebsd.org/@@188239?ac=10 Change 188239 by trasz@trasz_victim on 2011/01/27 20:04:15 Update TODO. Affected files ... .. //depot/projects/soc2009/trasz_limits/TODO#42 edit Differences ... ==== //depot/projects/soc2009/trasz_limits/TODO#42 (text+ko) ==== @@ -1,6 +1,8 @@ TODO: - - Fix %CPU limits for shortly living processes. + - RCTL accesses resource usage information without holding container_lock. + + - Fix cpu throttling. - Consider replacing proc pointer with thread pointer in rusage_add(9) et al. In most cases caller uses 'td->td_proc' anyway, and passing thread would @@ -12,7 +14,8 @@ - Get rid of container_lock. Atomic instructions would be nice, but we really need 64 bits (per-process counters could be 32 bit, I guess, but the higher level containers could overflow), and atomic(9) doesn't support 64 bit values - on 32 bit platforms. + on 32 bit platforms. Code ported from SunOS seems to use (and implement) + 64 bit atomics. - Don't account resources for system processes. It's not as easy as checking for P_SYSTEM flag, as the flag will be set for AIO kernel processes. @@ -23,6 +26,11 @@ - The jailstat(1)/userstat(1) tool seems to use lots of CPU time. Rewriting it in C could make sense. + - Currently limit enforcement involves walking over the list of rules applicable + to the process. I expect the number of such rules to be small (about five), + but some optimisation could be in order. Maybe a list of pointers to rules, + one entry per resource? + Issues: - Setting RSS limit too low can make the system thrash to death. @@ -68,7 +76,7 @@ - What about RLIMIT_RTPRIO and RLIMIT_RTTIME? Linux seems to have these. -HRL-specific issues: +RCTL-specific issues: - Reconsider bringing back setrlimit(2) handling.