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: <1314629267.2816.82.camel@twins>
Date:	Mon, 29 Aug 2011 16:47:47 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Anton Blanchard <anton@....ibm.com>,
	Avi Kivity <avi@...hat.com>, Ingo Molnar <mingo@...e.hu>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	"Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>,
	Paul Menage <menage@...gle.com>,
	Stephen Hemminger <shemminger@...tta.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Tim Pepper <lnxninja@...ux.vnet.ibm.com>
Subject: Re: [PATCH 09/32] nohz: Move ts->idle_calls into strict idle logic

On Mon, 2011-08-15 at 17:52 +0200, Frederic Weisbecker wrote:
> +static bool tick_nohz_can_stop_tick(int cpu, struct tick_sched *ts)
> +{
> +       /*
> +        * If this cpu is offline and it is the one which updates
> +        * jiffies, then give up the assignment and let it be taken by
> +        * the cpu which runs the tick timer next. If we don't drop
> +        * this here the jiffies might be stale and do_timer() never
> +        * invoked.
> +        */
> +       if (unlikely(!cpu_online(cpu))) {
> +               if (cpu == tick_do_timer_cpu)
> +                       tick_do_timer_cpu = TICK_DO_TIMER_NONE;
> +       }
> +
> +       if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE))
> +               return false;
> +
> +       if (need_resched())
> +               return false;
> +
> +       if (unlikely(local_softirq_pending() && cpu_online(cpu))) {
> +               static int ratelimit;
> +
> +               if (ratelimit < 10) {
> +                       printk(KERN_ERR "NOHZ: local_softirq_pending %02x\n",
> +                              (unsigned int) local_softirq_pending());
> +                       ratelimit++;
> +               }
> +               return false;
> +       }
> +
> +       return true;
> +} 

Why aren't rcu_needs_cpu(), printk_needs_cpu() and arch_needs_cpu() not
in there?

That are typical 'can we go sleep now?' functions.
--
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