All of lore.kernel.org
 help / color / mirror / Atom feed
* RCU tests for Maple Tree
@ 2021-05-17 15:40 Paul E. McKenney
  2021-05-17 16:30 ` Liam Howlett
  0 siblings, 1 reply; 4+ messages in thread
From: Paul E. McKenney @ 2021-05-17 15:40 UTC (permalink / raw)
  To: liam.howlett; +Cc: linux-kernel, linux-mm

Hello, Liam!

Apologies for my being so slow here, but just wanted to double-check my
understanding of this code.

There appear to be two tests that execute from run_check_rcu():

o	rcu_loop().  This appears to have RCU readers scanning the tree
	while an updater is adding a single range.  (Or replacing it,
	as the case might be.)

o	rcu_val().  This appears to have RCU readers repeatedly reading a
	given value while an updater is adding/replacing a single range.
	The test complains if no one sees the new value.

These tests appear to be the only use of threads, though perhaps the
test harness has some way of creating threads that I missed.

Are there other tests that I should be looking for?

							Thanx, Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RCU tests for Maple Tree
  2021-05-17 15:40 RCU tests for Maple Tree Paul E. McKenney
@ 2021-05-17 16:30 ` Liam Howlett
  2021-05-17 16:50   ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Liam Howlett @ 2021-05-17 16:30 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: linux-kernel, linux-mm

* Paul E. McKenney <paulmck@kernel.org> [210517 11:40]:
> Hello, Liam!
> 
> Apologies for my being so slow here, but just wanted to double-check my
> understanding of this code.
> 
> There appear to be two tests that execute from run_check_rcu():
> 
> o	rcu_loop().  This appears to have RCU readers scanning the tree
> 	while an updater is adding a single range.  (Or replacing it,
> 	as the case might be.)
> 
> o	rcu_val().  This appears to have RCU readers repeatedly reading a
> 	given value while an updater is adding/replacing a single range.
> 	The test complains if no one sees the new value.
> 
> These tests appear to be the only use of threads, though perhaps the
> test harness has some way of creating threads that I missed.
> 
> Are there other tests that I should be looking for?

No, those are the only ones I'm running with threads right now.  I think
all RCU tests are run from check_rcu() iirc.  This did yield results of
failures that had to be addressed so I'm somewhat confident that it's
actually working.

From your wording I'm gathering I need to increase this by a lot more
test cases?

Thanks,
Liam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RCU tests for Maple Tree
  2021-05-17 16:30 ` Liam Howlett
@ 2021-05-17 16:50   ` Paul E. McKenney
  2021-05-17 16:53     ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Paul E. McKenney @ 2021-05-17 16:50 UTC (permalink / raw)
  To: Liam Howlett; +Cc: linux-kernel, linux-mm

On Mon, May 17, 2021 at 04:30:53PM +0000, Liam Howlett wrote:
> * Paul E. McKenney <paulmck@kernel.org> [210517 11:40]:
> > Hello, Liam!
> > 
> > Apologies for my being so slow here, but just wanted to double-check my
> > understanding of this code.
> > 
> > There appear to be two tests that execute from run_check_rcu():
> > 
> > o	rcu_loop().  This appears to have RCU readers scanning the tree
> > 	while an updater is adding a single range.  (Or replacing it,
> > 	as the case might be.)
> > 
> > o	rcu_val().  This appears to have RCU readers repeatedly reading a
> > 	given value while an updater is adding/replacing a single range.
> > 	The test complains if no one sees the new value.
> > 
> > These tests appear to be the only use of threads, though perhaps the
> > test harness has some way of creating threads that I missed.
> > 
> > Are there other tests that I should be looking for?
> 
> No, those are the only ones I'm running with threads right now.  I think
> all RCU tests are run from check_rcu() iirc.  This did yield results of
> failures that had to be addressed so I'm somewhat confident that it's
> actually working.

OK, I guess I can feel relieved that I can still read code.  ;-)

> >From your wording I'm gathering I need to increase this by a lot more
> test cases?

I would feel better with the addition of something that looked more
like a stress test.  For but one example, is there some combination
of several successive update operations that can mess up slow readers
(that is, readers that are interrupted or preempted, and thus have
multiple updates happen while they are traversing the tree)?  If so,
the current tests will not find it.

							Thanx, Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RCU tests for Maple Tree
  2021-05-17 16:50   ` Paul E. McKenney
@ 2021-05-17 16:53     ` Paul E. McKenney
  0 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2021-05-17 16:53 UTC (permalink / raw)
  To: Liam Howlett; +Cc: linux-kernel, linux-mm

On Mon, May 17, 2021 at 09:50:04AM -0700, Paul E. McKenney wrote:
> On Mon, May 17, 2021 at 04:30:53PM +0000, Liam Howlett wrote:
> > * Paul E. McKenney <paulmck@kernel.org> [210517 11:40]:
> > > Hello, Liam!
> > > 
> > > Apologies for my being so slow here, but just wanted to double-check my
> > > understanding of this code.
> > > 
> > > There appear to be two tests that execute from run_check_rcu():
> > > 
> > > o	rcu_loop().  This appears to have RCU readers scanning the tree
> > > 	while an updater is adding a single range.  (Or replacing it,
> > > 	as the case might be.)
> > > 
> > > o	rcu_val().  This appears to have RCU readers repeatedly reading a
> > > 	given value while an updater is adding/replacing a single range.
> > > 	The test complains if no one sees the new value.
> > > 
> > > These tests appear to be the only use of threads, though perhaps the
> > > test harness has some way of creating threads that I missed.
> > > 
> > > Are there other tests that I should be looking for?
> > 
> > No, those are the only ones I'm running with threads right now.  I think
> > all RCU tests are run from check_rcu() iirc.  This did yield results of
> > failures that had to be addressed so I'm somewhat confident that it's
> > actually working.
> 
> OK, I guess I can feel relieved that I can still read code.  ;-)

Oh, and I should hasten to add that for a data structure fully protected
by a reader-writer lock, sequential tests can be reasonably effective.
At least assuming readers really truly only read...

							Thanx, Paul

> > >From your wording I'm gathering I need to increase this by a lot more
> > test cases?
> 
> I would feel better with the addition of something that looked more
> like a stress test.  For but one example, is there some combination
> of several successive update operations that can mess up slow readers
> (that is, readers that are interrupted or preempted, and thus have
> multiple updates happen while they are traversing the tree)?  If so,
> the current tests will not find it.
> 
> 							Thanx, Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-17 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 15:40 RCU tests for Maple Tree Paul E. McKenney
2021-05-17 16:30 ` Liam Howlett
2021-05-17 16:50   ` Paul E. McKenney
2021-05-17 16:53     ` Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.