Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3214765imm; Sun, 14 Oct 2018 14:31:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV63e2epmnBl7qKC8zhWGuw2e1fRmVNJfuY+Vp17XR1FgjXNRuierRStmmEoxUZL7C3oHdMXy X-Received: by 2002:a62:1906:: with SMTP id 6-v6mr15191603pfz.9.1539552716007; Sun, 14 Oct 2018 14:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539552715; cv=none; d=google.com; s=arc-20160816; b=dZ9B862kD3c+xBhcdl4q+7ErA83TIzcRBx4T8qeoaxYwaEOIBNr0Dey42IjWv19wF7 MiPZU0hD0SeTKcpf4L4TOioaqqVZ47o6OKOEzY8K3aBzIzfM+t5RTRHnMPDMpIig08kr Ubk4a9FdAdBX03LuWinfrPBW1Q+J7AcwzzRDzGhRjP90jid670gSMvm+8LPDVYAzIIW7 d1HhdpW3ouA3PV3a0wbUDPHu4DJBrlPcPVNVKwpWbwV+8ubeVX2eKyogg9InPyPsIiJs uHilYwLaK5Ke3hPmCpJYNhkxM47+pMqikRMPr/p4lE3w8v/KP+UlSvCE1zuPlg+9xgix PvVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=B1BhcJksYld0iNAKOWfN53vg1bwHsJCccKOsz1OidCM=; b=IfkNlyKAqfPyZ2w7raAwao+tj/YUGQraZP7tY+vc0copjI3W58RfkguQdfDBy/WDXf j4dgiIKWbh0EnBG+2PxEMyIjkR4sP1r11V3E2CvwZJKsQqhgh/h3JzlAxo+6BkemiO8W k165stDJ1xr/8z2i8GQEdgMjw9/NcmR+rxxzs1gSaLo1LgthNWQRy0xVZ/d+FDGp2CKQ mDH3CvTWiINQa2BKsODI4fWSRme0fC3EW5Qe7umf8A/cbYLmQcBsXpTW1Z7dzQGnkAdR zp4cGpcbN4iOQfnLr7zbp61kyd1rOvjfYHgHv5S0RH/gbPlDhsRpoPPwjxP8hh/HKXB3 +kuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=P3Gvaqcg; 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 y198-v6si4562637pfb.59.2018.10.14.14.31.03; Sun, 14 Oct 2018 14:31:55 -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=P3Gvaqcg; 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 S1726356AbeJOFM3 (ORCPT + 99 others); Mon, 15 Oct 2018 01:12:29 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:45154 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbeJOFM3 (ORCPT ); Mon, 15 Oct 2018 01:12:29 -0400 Received: by mail-pl1-f196.google.com with SMTP id y15-v6so8273015plr.12 for ; Sun, 14 Oct 2018 14:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B1BhcJksYld0iNAKOWfN53vg1bwHsJCccKOsz1OidCM=; b=P3Gvaqcg09jDvQq63vIOoN9M87VDwdMJuajFEwUh7JleqOSXVfbkOI6OukhN5kvUVr R84d9ws+5LO/PQZkNWjhU/ME1zTIaTwEmCC+QvZXNHS3LWOhEdQZZame1NygElGywAwP Q8rd8Rg4tqBrWmFPcdZaGm5qrEDyVdqFCiBdg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B1BhcJksYld0iNAKOWfN53vg1bwHsJCccKOsz1OidCM=; b=Bt4TZuxfVcq/v/jSxEEqGr1Miqpdg/NoL6Lw79fcI7fRByhYiri+frUJXUH1fPb1rf 2974y9Q3QQ968weDf8v9sX7MPIRn5y1KSfgWHe2MlL0s9fQG5WeKgTY+Af+8w3Z9zry2 f4RVZbEyp9x7RaKrvmvySfX+zjofp4yarBuFchTJxq1fvBozZzIUdVPlHrftgihVsEgU uoTz+IguJLVOBztk2IGwjhxZHwTWoS/7RGN+2K9kvaAf/NOBMTAjcwQ52+VRXt6kJ8fp w7rWEVdJ5HI2uUdraXJ5aOQpbkIEfevSdwSbuXRrXtHK9VeWnp+RXRGV7Ov/wNKENJ2G 6HAw== X-Gm-Message-State: ABuFfohljypEr3Cizr9FcSa239vus73JhO+3J75ykV2JAHLT5qf1M7FN KoVvDeq8tLT+9BQHpCDq6/JBPCEBcz4= X-Received: by 2002:a17:902:728e:: with SMTP id d14-v6mr14695117pll.51.1539552609764; Sun, 14 Oct 2018 14:30:09 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1601:3aef:314f:b9ea:889f]) by smtp.gmail.com with ESMTPSA id h6-v6sm10828804pgn.84.2018.10.14.14.30.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Oct 2018 14:30:08 -0700 (PDT) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org Cc: "Joel Fernandes (Google)" , Jonathan Corbet , Josh Triplett , Lai Jiangshan , linux-doc@vger.kernel.org, Mathieu Desnoyers , "Paul E. McKenney" , Steven Rostedt Subject: [PATCH RFC] doc: rcu: remove obsolete (non-)requirement about disabling preemption Date: Sun, 14 Oct 2018 14:29:55 -0700 Message-Id: <20181014212955.95267-1-joel@joelfernandes.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Requirements.html document says "Disabling Preemption Does Not Block Grace Periods". However this is no longer true with the RCU consolidation. Lets remove the obsolete (non-)requirement entirely. Signed-off-by: Joel Fernandes (Google) --- .../RCU/Design/Requirements/Requirements.html | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/Documentation/RCU/Design/Requirements/Requirements.html b/Documentation/RCU/Design/Requirements/Requirements.html index 7efc1c1da7af..4fae55056c1d 100644 --- a/Documentation/RCU/Design/Requirements/Requirements.html +++ b/Documentation/RCU/Design/Requirements/Requirements.html @@ -900,8 +900,6 @@ Except where otherwise noted, these non-guarantees were premeditated. Grace Periods Don't Partition Read-Side Critical Sections
  • Read-Side Critical Sections Don't Partition Grace Periods -
  • - Disabling Preemption Does Not Block Grace Periods

    Readers Impose Minimal Ordering

    @@ -1259,54 +1257,6 @@ of RCU grace periods.   -

    -Disabling Preemption Does Not Block Grace Periods

    - -

    -There was a time when disabling preemption on any given CPU would block -subsequent grace periods. -However, this was an accident of implementation and is not a requirement. -And in the current Linux-kernel implementation, disabling preemption -on a given CPU in fact does not block grace periods, as Oleg Nesterov -demonstrated. - -

    -If you need a preempt-disable region to block grace periods, you need to add -rcu_read_lock() and rcu_read_unlock(), for example -as follows: - -

    -
    - 1 preempt_disable();
    - 2 rcu_read_lock();
    - 3 do_something();
    - 4 rcu_read_unlock();
    - 5 preempt_enable();
    - 6
    - 7 /* Spinlocks implicitly disable preemption. */
    - 8 spin_lock(&mylock);
    - 9 rcu_read_lock();
    -10 do_something();
    -11 rcu_read_unlock();
    -12 spin_unlock(&mylock);
    -
    -
    - -

    -In theory, you could enter the RCU read-side critical section first, -but it is more efficient to keep the entire RCU read-side critical -section contained in the preempt-disable region as shown above. -Of course, RCU read-side critical sections that extend outside of -preempt-disable regions will work correctly, but such critical sections -can be preempted, which forces rcu_read_unlock() to do -more work. -And no, this is not an invitation to enclose all of your RCU -read-side critical sections within preempt-disable regions, because -doing so would degrade real-time response. - -

    -This non-requirement appeared with preemptible RCU. -

    Parallelism Facts of Life

    -- 2.19.0.605.g01d371f741-goog