From: Dave Hansen <haveblue@us.ibm.com>
To: Gerrit Huizenga <gh@us.ibm.com>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
ckrm-tech@lists.sourceforge.net
Subject: Re: [PATCH] CKRM [7/8] Resource controller for number of tasks per class
Date: Thu, 24 Feb 2005 08:15:43 -0800 [thread overview]
Message-ID: <1109261743.7244.64.camel@localhost> (raw)
In-Reply-To: <E1D4FOI-0006wW-00@w-gerrit.beaverton.ibm.com>
On Thu, 2005-02-24 at 01:34 -0800, Gerrit Huizenga wrote:
> This patch provides a resource controller for limiting the number
> of tasks per class in CKRM.
It takes 627 lines of code to count the number of tasks in a class?
What does all of that infrastructure buy you, again?
All of the logic to borrow if you've gone over your limit should be a
quite repeated theme throughout all of the controllers. Seems to me
that at least a larger chunk of that should be in generic code.
> +static void numtasks_res_free(void *my_res)
> +{
...
> + if (unlikely(atomic_read(&res->cnt_cur_alloc) < 0)) {
> + printk(KERN_WARNING "numtasks_res: counter below 0
> \n");
> + }
> + if (unlikely(atomic_read(&res->cnt_cur_alloc) > 0 ||
> + atomic_read(&res->cnt_borrowed) > 0))
How often is this called? Do you really need unlikely()?
-- Dave
next prev parent reply other threads:[~2005-02-24 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-24 9:34 [PATCH] CKRM [7/8] Resource controller for number of tasks per class Gerrit Huizenga
2005-02-24 16:15 ` Dave Hansen [this message]
2005-02-25 19:28 ` [ckrm-tech] " Chandra Seetharaman
2005-02-24 18:00 ` Greg KH
2005-02-24 18:21 ` Gerrit Huizenga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1109261743.7244.64.camel@localhost \
--to=haveblue@us.ibm.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=gh@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox