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: <1298990291.5226.870.camel@laptop>
Date:	Tue, 01 Mar 2011 15:38:11 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	paulmck@...ux.vnet.ibm.com
Cc:	Lai Jiangshan <laijs@...fujitsu.com>, linux-kernel@...r.kernel.org,
	mingo@...e.hu, dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, josh@...htriplett.org,
	niv@...ibm.com, tglx@...utronix.de, rostedt@...dmis.org,
	Valdis.Kletnieks@...edu, dhowells@...hat.com,
	eric.dumazet@...il.com, darren@...art.com,
	"Paul E. McKenney" <paul.mckenney@...aro.org>
Subject: Re: [PATCH RFC tip/core/rcu 11/11] rcu: move TREE_RCU from softirq
 to kthread

On Mon, 2011-02-28 at 16:13 -0800, Paul E. McKenney wrote:

> I am OK doing the sched_setscheduler_nocheck() in UP_PREPARE, correct?

Yeah, it should be perfectly fine to call that.

> Ah, there is the rub -- I am using wait_event(), so I need to wake up the
> kthread once before anyone uses it (or at least concurrently with anyone
> using it).  Which I can presumably do from the CPU_STARTING notifier.

Right, so your kthread is doing:

static int rcu_cpu_kthread()
{
  for (;;) {
    wait_event_interruptible();

    /* do stuff */

  }
  return 0;
}

Which means that all folks wanting to make use of this already need to
do a wakeup. So I don't see any reason to do that first wakeup from
CPU_STARTING.

wait_event() will only actually wait if the condition is false, in the
start-up case above it will find the condition true and fall right
through to do stuff.



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