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: <1350904240.2768.95.camel@twins>
Date:	Mon, 22 Oct 2012 13:10:40 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Andrea Righi <andrea@...terlinux.com>
Cc:	Paul Menage <paul@...lmenage.org>, Ingo Molnar <mingo@...hat.com>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v2 1/3] sched: introduce distinct per-cpu load average

On Sat, 2012-10-20 at 21:06 +0200, Andrea Righi wrote:
> @@ -383,13 +383,7 @@ struct rq {
>         struct list_head leaf_rt_rq_list;
>  #endif
>  

> +       unsigned long __percpu *nr_uninterruptible; 

This is O(nr_cpus^2) memory..


> +unsigned long nr_uninterruptible_cpu(int cpu)
> +{
> +       struct rq *this = cpu_rq(cpu);
> +       unsigned long val = 0;
> +       int i;
> +
> +       for_each_online_cpu(i)
> +               val += per_cpu(*this->nr_uninterruptible, i);
> +
> +       return val;
> +}
> 
> 
I suspect you've got an accounting leak here on hot-plug.
> 
>  unsigned long nr_uninterruptible(void)
>  {
>         unsigned long i, sum = 0;
>  
>         for_each_possible_cpu(i)
> -               sum += cpu_rq(i)->nr_uninterruptible;
> +               sum += nr_uninterruptible_cpu(i);
>  
>         /*
>          * Since we read the counters lockless, it might be slightly

And this makes O(n^2) runtime!


--
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