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: <20100621170505.GE2354@linux.vnet.ibm.com>
Date:	Mon, 21 Jun 2010 10:05:05 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Lai Jiangshan <laijs@...fujitsu.com>, Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rcutorture: add random preemption

On Mon, Jun 21, 2010 at 06:50:11PM +0200, Peter Zijlstra wrote:
> On Mon, 2010-06-21 at 09:43 -0700, Paul E. McKenney wrote:
> > > +#ifdef CONFIG_PREEMPT
> > > +     if (!preempt_count() && !(rcu_random(rrsp) % (nrealreaders * 20000)))
> > > +             preempt_schedule();
> > > +#endif
> > 
> > This one scared me for a bit -- then I realized that preempt_schedule()
> > won't actually schedule if preemption is in any way disabled.  So the
> > above really is OK, because Classic RCU and RCU-bh disable preemption.
> > 
> > So, should we have a comment to this effect, or is my hypersensitivity to
> > RCU semantics unique to me? 
> 
> Well it seems to do a !preempt_count() test too, so I wouldn't worry too
> much about it, still using preempt_schedule() doesn't seem right, why
> not use cond_resched()?

My guess is that Lai wants to force a call to rcu_sched_qs() even if
!need_resched().  One reason for doing this would be to put more stress
on preemptible RCU's handling of context switches in RCU read-side
critical sections.

Another approach would be to have some high-priority threads that wake up
periodically, as I plan to make rcutorture do for RCU priority boosting.
Of course, this is not necessarily mutually exclusive with Lai's approach.

							Thanx, Paul
--
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