From owner-p4-projects@FreeBSD.ORG Sat Aug 7 13:10:46 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 06C96106567B; Sat, 7 Aug 2010 13:10:46 +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 A73C51065677 for ; Sat, 7 Aug 2010 13:10:45 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 94AB68FC16 for ; Sat, 7 Aug 2010 13:10:45 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o77DAjYF094725 for ; Sat, 7 Aug 2010 13:10:45 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o77DAjKR094723 for perforce@freebsd.org; Sat, 7 Aug 2010 13:10:45 GMT (envelope-from trasz@freebsd.org) Date: Sat, 7 Aug 2010 13:10:45 GMT Message-Id: <201008071310.o77DAjKR094723@repoman.freebsd.org> X-Authentication-Warning: repoman.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 182023 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: Sat, 07 Aug 2010 13:10:46 -0000 http://p4web.freebsd.org/@@182023?ac=10 Change 182023 by trasz@trasz_victim on 2010/08/07 13:09:45 Update TODO. Affected files ... .. //depot/projects/soc2009/trasz_limits/TODO#22 edit Differences ... ==== //depot/projects/soc2009/trasz_limits/TODO#22 (text+ko) ==== @@ -39,6 +39,29 @@ Issues: + - In the long term, the goal is to get rid of lim_get(9), chgproccnt(9) etc, + turning this: + + limit = lim_get(...); + if (value > limit) + return (EWHATEVER); + + [ do stuff ] + + into this: + + if (rusage_add(...)) + return (EWHATEVER); + + [ do stuff ] + + if (some error) + rusage_sub(...); + + However, this requires per-process limit enforcement to be hooked into + container mechanism. This is a part of HRL, and it's outside the scope + of the containers project. This means the code is full of "#ifdef CONTAINERS". + - 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.