Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1284644

Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements

From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements
Date 2015-12-05 22:20 +0100
Message-ID <qCspj-6go-1@gated-at.bofh.it> (permalink)
References (1 earlier) <qC8qC-10I-7@gated-at.bofh.it> <qC8Ai-1kc-15@gated-at.bofh.it> <qC93k-1tU-17@gated-at.bofh.it> <qC93k-1tU-15@gated-at.bofh.it> <qCaiK-2bH-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Dec 04, 2015 at 05:56:01PM -0800, Paul E. McKenney wrote:
> On Fri, Dec 04, 2015 at 04:38:42PM -0800, Josh Triplett wrote:

[ . . . ]

> > Because you don't want to complicate the script, or because you don't
> > want to accidentally edit the wrong version?  (Note that a carefully
> > written script would mean it doesn't matter which version you edit.)
> 
> I prefer the simpler script.
> 
> > A third alternative would be to include the answers inline right after
> > the questions, and optionally add a tiny bit of JavaScript that hides
> > them by default and lets you click to show the answer. :)
> 
> That does have some advantages.  I would welcome a patch that added
> the JavaScript.

And I did try a CSS approach with this CSS definition:

	<style media="screen" type="text/css">
	.quick-quiz-wrap {
		position: relative;
	}
	.quick-quiz-wrap .quick-quiz-content {
		display: none;
		position: absolute;
		bottom: -10px;
		left: 10px;
		right: 10px;
		background-color: lightgrey;
		padding: 20px;
	}
	.quick-quiz-wrap:hover .quick-quiz-content {
		display: block;
	}
	</style>

I linked to this as follows:

	<link rel="stylesheet" type="text/css" href="../quick-quiz.css" media="screen">

And used it like this:

	<p><b>Quick Quiz:</b>
	Wait a minute!
	You said that updaters can make useful forward progress concurrently
	with readers, but pre-existing readers will block
	<tt>synchronize_rcu()</tt>!!!
	Just who are you trying to fool???
	</p>

	<div class="quick-quiz-wrap">
		<b>Quick Quiz Answer</b>
		<div class="quick-quiz-content">
			<p>First, if updaters do not wish to be blocked
			by readers, they can use <tt>call_rcu()</tt> or
			<tt>kfree_rcu()</tt>, which will be discussed later.
			Second, even when using <tt>synchronize_rcu()</tt>,
			the other update-side code does run concurrently with
			readers, whether pre-existing or not.
		</div> 
	</div>

This proved fragile.  It worked in trivial cases, but with non-trivial
content in a non-trivial document, it refused to show anything on mouse
hover.  Even in trivial cases, it sometimes made strange choices on
where to display the text.  At this point, I drop back to the old-school
scripted approach.  It has the advantage of working consistently and
providing good user experience, with the HTML unconditionally present. ;-)

							Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH tip/core/rcu 0/8] Documentation updates for 4.5 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 00:50 +0100
  [PATCH tip/core/rcu 6/8] documentation: Clarify RCU memory barriers and requirements "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 00:50 +0100
  [PATCH tip/core/rcu 4/8] documentation: Composability analogies "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 01:00 +0100
  [PATCH tip/core/rcu 5/8] documentation: Expand on scheduler/RCU deadlock requirements "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 01:00 +0100
  [PATCH tip/core/rcu 2/8] Documentation: Record bottom-bit-zero guarantee for ->next "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 01:00 +0100
  [PATCH tip/core/rcu 3/8] documentation: Cover requirements controlling stall warnings "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 01:00 +0100
  [PATCH tip/core/rcu 7/8] documentation: Update RCU requirements based on expedited changes "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 01:00 +0100
  Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements Josh Triplett <josh@joshtriplett.org> - 2015-12-05 01:10 +0100
    Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements Josh Triplett <josh@joshtriplett.org> - 2015-12-05 01:40 +0100
      Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 03:00 +0100
        Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 22:20 +0100
    Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 01:40 +0100
  Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements Josh Triplett <josh@joshtriplett.org> - 2015-12-05 01:40 +0100
    Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 03:00 +0100
      Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-12-05 21:20 +0100
  Re: [PATCH tip/core/rcu 0/8] Documentation updates for 4.5 Josh Triplett <josh@joshtriplett.org> - 2015-12-05 01:50 +0100

csiph-web