Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5449412imd; Tue, 30 Oct 2018 18:30:13 -0700 (PDT) X-Google-Smtp-Source: AJdET5d+GhBIX0taVEkb05Zv39lcg3ZZAZR2opj8I6FurY3friR9Vvw8/Ns4UNwf7vOSgHP8ba8S X-Received: by 2002:a62:20d8:: with SMTP id m85-v6mr1135357pfj.152.1540949413792; Tue, 30 Oct 2018 18:30:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540949413; cv=none; d=google.com; s=arc-20160816; b=YepozlqV6+FtfmM7Llzcq4T4wwCxW1mlS43qE55m1BSFeuwSxyG9meq+YDE3kX7yOX /1DbCb0xSp91s6B6ROPEk9yqSFV06XPndH+pDElO/aGtKQ89lZ3DxQ46AtfQJmNLoBy4 RSrjrwDrgtt3lh/D6hv8xmUZtoMLBbfm29p+H/nzTYyj40jXi02tkRfsKk26l9kvlv/T ojwcFH5Zdo/tbdDy53TksFH+EsksPeqfvdgF7K7wijYTatrzYkmOYPLN5xzsdFWph0bc Wk2Yl8CgkDJ5LUnBnIKk5U62gmbllvG/fUEEEKNH9xr6twHFy0L40ZMd5h6GGI06pfex TWgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PZrgIeTJCWfM/yMRtRMDFPWrgHzZ/yIYWaewABwwGic=; b=YyT/Hy3qw719HY0aW3tbX+fbLhWiOaxIK2rYgSYqJJlxvgUgRobb7YvnAH4xq4RAQl UCxfnbjYNuM0DmUj5pJxc5aZ3FbcbY6QAGlP3vg6QWzl7ivmVIGCx0rWbfl4jVzfIwnX NK34qCv3oBQ5xQQf2AhNa2+WsVwSSa1z3Kvw0r90riEchb7sQfwKin3yftjgHWbpDcjf okx1qKbfZ1S4hiQSZzJVFLVcMSdrKmva+/IvlwuMgo1FAIRR2f1qd18gsdcNXmE5w2ev +YiMn+WQOHsUgsnGOaZ91yTmQdW9vZO0OoVRwtCk7AHGXBswuswEGW6LnMWMFX12UI/E 8LFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=f08xUURQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6-v6si24293429pgc.578.2018.10.30.18.29.58; Tue, 30 Oct 2018 18:30:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=f08xUURQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728864AbeJaJyX (ORCPT + 99 others); Wed, 31 Oct 2018 05:54:23 -0400 Received: from mail-pl1-f176.google.com ([209.85.214.176]:38714 "EHLO mail-pl1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728819AbeJaJyX (ORCPT ); Wed, 31 Oct 2018 05:54:23 -0400 Received: by mail-pl1-f176.google.com with SMTP id p7-v6so6408073plk.5 for ; Tue, 30 Oct 2018 17:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PZrgIeTJCWfM/yMRtRMDFPWrgHzZ/yIYWaewABwwGic=; b=f08xUURQ/e38kDmAvszAQGfcbPcLQD7Hs3F7pWqZzkvXXhOASeFQvYTodsvsZh7n+a YfrqIdyvXRTgF4JGSOoRLFNop9tUyVqsvU+ZTDaHgrMmKLwEtWTDszxgt3InY0vZJVt/ fEHkwMjx6k6tM66iK4NIdFlJcbVixM5RL3gig= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PZrgIeTJCWfM/yMRtRMDFPWrgHzZ/yIYWaewABwwGic=; b=iycy3Bg2e4tbkXERnlTt3ifPLhlyap/jafX63bQukKGiwSlne8PSP3m4Bixi59Ynn+ Mx/vEZQDd8AJWvRRLEuDGslvO0vhFUXEKNDoazJ9X0bkbrkV8Uk8wMxuEZdyYigiOfbq mCJISmf2zdFo6X5+zEYy1tftUybpdExWp1axVxIyPpA7oHzJ39Yb/i9GG2TOX3lgSixK 3c/5eAEOrJ3uUMFeRXAoUvy0VTmlWZIvhFtH8l9CN2YUT6ti9plMEGIRytqzYwWRqkRC MRtMk9l7jK25XUsxNkYxtzXPtsVjL50AVaTE532+w0tGdV2NqNmuLZlRBRW/Ke/Mt/hV aa/A== X-Gm-Message-State: AGRZ1gJEn+S2jzRPIjaJj9tmqtt1fDio52xbotSwlFNr85tCfnkDf/2x +M8L79xEZd8X1ZBUCoF9Mh77NQ== X-Received: by 2002:a17:902:9a44:: with SMTP id x4-v6mr1002955plv.121.1540947516062; Tue, 30 Oct 2018 17:58:36 -0700 (PDT) Received: from localhost ([2620:0:1000:1601:3aef:314f:b9ea:889f]) by smtp.gmail.com with ESMTPSA id p15-v6sm1779044pfj.72.2018.10.30.17.58.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 17:58:34 -0700 (PDT) Date: Tue, 30 Oct 2018 17:58:33 -0700 From: Joel Fernandes To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org Subject: Re: [RFC] rcu: doc: update example about stale data Message-ID: <20181031005833.GE224709@google.com> References: <20181028021653.155513-1-joel@joelfernandes.org> <20181028172142.GN4170@linux.ibm.com> <20181029011631.GA261737@joelaf.mtv.corp.google.com> <20181030235039.GX4170@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181030235039.GX4170@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 30, 2018 at 04:50:39PM -0700, Paul E. McKenney wrote: > On Sun, Oct 28, 2018 at 06:16:31PM -0700, Joel Fernandes wrote: > > On Sun, Oct 28, 2018 at 10:21:42AM -0700, Paul E. McKenney wrote: > > > On Sat, Oct 27, 2018 at 07:16:53PM -0700, Joel Fernandes (Google) wrote: > > > > The RCU example for 'rejecting stale data' on system-call auditting > > > > stops iterating through the rules if a deleted one is found. It makes > > > > more sense to continue looking at other rules once a deleted one is > > > > rejected. Although the original example is fine, this makes it more > > > > meaningful. > > > > > > > > Signed-off-by: Joel Fernandes (Google) > > > > > > Does the actual audit code that this was copied from now include the > > > continue statement? If so, please update the commit log to state that > > > and then I will take the resulting patch. (This example was inspired > > > by a long-ago version of the actual audit code.) > > > > The document talks of a situation that could be but is not really in the > > implementation. It says "If the system-call audit module were to ever need to > > reject stale data". So its not really something implemented. I was just > > correcting the example you had there since it made more sense to me to > > continue looking for other rules in the list once a rule was shown to be > > stale. It just makes the example more correct. > > > > But I'm Ok if you want to leave that alone ;-) Hence, the RFC tag to this > > patch ;-) > > Well, I do agree that there are situations where you need to keep > going. But in the common case where only one instance of a given key > is allowed, and where the list is either (1) sorted and/or (2) added > to at the beginning, if you find a deleted element with a given key, > you are guaranteed that you won't find another with that key even if > you continue scanning the list. After all, if you did find a deleted > element, the duplicate either is not on the list in the sorted case > or is behind you in the add-at-front case. > > And in the more complex cases where persistent searching is required, > you usually have to restart the search instead of continuing it. Besides, > things like the Issaquah Challenge don't seem to belong in introductory > documentation on RCU. ;-) Ok, agreed. Lets drop this :) -Joel