lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1284895893.2275.627.camel@laptop>
Date:	Sun, 19 Sep 2010 13:31:33 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Venkatesh Pallipadi <venki@...gle.com>
Cc:	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	linux-kernel@...r.kernel.org, Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH 5/6] sched: Remove irq time from available CPU power

On Thu, 2010-09-16 at 18:56 -0700, Venkatesh Pallipadi wrote:
> +++ b/kernel/sched.c
> @@ -2025,6 +2025,18 @@ static u64 unaccount_irq_delta(u64 delta, int cpu, u64 *saved_irq_time)
>  #define unaccount_irq_delta_rt(delta, cpu, class_rq)            \
>                 unaccount_irq_delta(delta, cpu, &(class_rq)->saved_irq_time)
>  
> +static void sched_irq_power_update_fair(int cpu, struct cfs_rq *cfs_rq,
> +                       struct rq* rq)
> +{
> +       if (!sched_clock_irqtime)
> +               return;
> +
> +       if (likely(rq->total_irq_time > cfs_rq->saved_irq_time)) {
> +               sched_rt_avg_update(rq,
> +                               rq->total_irq_time - cfs_rq->saved_irq_time);
> +       }
> +}
> +
>  #else
>  
>  #define update_irq_time(cpu, crq)              do { } while (0)
> @@ -2042,6 +2054,8 @@ static u64 unaccount_irq_delta_rt(u64 delta_exec, int cpu, struct rt_rq *rt_rq)
>         return delta_exec;
>  }
>  
> +#define sched_irq_power_update_fair(cpu, crq, rq)      do { } while (0)
> +
>  #endif
>  
>  #include "sched_idletask.c"
> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index a64fdaf..937fded 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -526,6 +526,9 @@ static void update_curr(struct cfs_rq *cfs_rq)
>         if (unlikely(!curr))
>                 return;
>  
> +       if (sched_feat(NONIRQ_POWER) && entity_is_task(curr))
> +               sched_irq_power_update_fair(cpu, cfs_rq, rq_of(cfs_rq));
> +
>         /*
>          * Get the amount of time the current task was running
>          * since the last time we changed load (this cannot 

This all looks very confusing to me,.. How about we simply fold the
delta between rq->clock and rq->clock_task into sched_rt_avg_update()
and be done with it?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ