From: ruben@mrbrklyn.com (Ruben Safir)
To: kernelnewbies@lists.kernelnewbies.org
Subject: process tracking
Date: Mon, 20 Apr 2015 23:19:52 -0400 [thread overview]
Message-ID: <20150421031952.GA15260@www.mrbrklyn.com> (raw)
In-Reply-To: <CALeNi0VO10xHZ0TvZA63Zz0V_-AWnDZOeddVpd2CMwUC7QtgMw@mail.gmail.com>
On Mon, Apr 20, 2015 at 11:58:17PM +0200, Mustafa Hussain wrote:
> I have reading recently how CFS works and I want to detect processes that
> is not used and have the policy SCHED_NORMAL,
>
> Can i do this by tracking load_weight for each process if the load dose not
> change over the time can i consider this process is not used ?
it has nothing to do with the load_weight. I can be corrected on this
but it is configuration.
There are functions that can be coded that adjust the class of priority
for a thread or process such as
/**
* sched_setscheduler - change the scheduling policy and/or RT priority
* of a thread.
* @p: the task in question.
* @policy: new policy.
* @param: structure containing the new RT priority.
*
* Return: 0 on success. An error code otherwise.
*
* NOTE that the task may be already dead.
*/
int sched_setscheduler(struct task_struct *p, int policy,
const struct sched_param *param)
{
return _sched_setscheduler(p, policy, param, true);
}
EXPORT_SYMBOL_GPL(sched_setscheduler);
in linux/kernel.sched/core.c
download the Kernel Source Code and take a look
Ruben
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com
Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013
next prev parent reply other threads:[~2015-04-21 3:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 21:58 process tracking Mustafa Hussain
2015-04-21 3:19 ` Ruben Safir [this message]
2015-04-21 17:09 ` Mustafa Hussain
2015-04-21 20:37 ` Ruben Safir
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=20150421031952.GA15260@www.mrbrklyn.com \
--to=ruben@mrbrklyn.com \
--cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).