Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752137AbbLEVSa (ORCPT ); Sat, 5 Dec 2015 16:18:30 -0500 Received: from e33.co.us.ibm.com ([32.97.110.151]:48194 "EHLO e33.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751148AbbLEVS2 (ORCPT ); Sat, 5 Dec 2015 16:18:28 -0500 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Sat, 5 Dec 2015 13:19:10 -0800 From: "Paul E. McKenney" To: Josh Triplett Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com Subject: Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements Message-ID: <20151205211910.GA26533@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20151204234952.GA22805@linux.vnet.ibm.com> <1449273026-23633-1-git-send-email-paulmck@linux.vnet.ibm.com> <20151205000719.GB26663@cloud> <20151205003332.GG28602@linux.vnet.ibm.com> <20151205003842.GD26663@cloud> <20151205015601.GI28602@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151205015601.GI28602@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15120521-0009-0000-0000-000010525A16 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2585 Lines: 78 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: I linked to this as follows: And used it like this:

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

Quick Quiz Answer

First, if updaters do not wish to be blocked by readers, they can use call_rcu() or kfree_rcu(), which will be discussed later. Second, even when using synchronize_rcu(), the other update-side code does run concurrently with readers, whether pre-existing or not.

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/