Received: by 10.192.165.148 with SMTP id m20csp229538imm; Fri, 4 May 2018 09:22:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqFG4CqbDQGPo27Z2KMQIwPGVg9n667BinHpSVgbuVJhX5XGu274gOlfJa93KqwWqcymzUg X-Received: by 2002:a17:902:3381:: with SMTP id b1-v6mr28619375plc.248.1525450921166; Fri, 04 May 2018 09:22:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525450921; cv=none; d=google.com; s=arc-20160816; b=sELpj9VCsYEGYn9iOxaf8z+tF980gtc3JfS1TonWCvPikHaOVyeLuvcY5yHB37V5py 7p0pVqjaXL3ZZ7iUaUqhfnft8GkKzJvAtUDF18H1wOwp/06HLpyu9D+WNLfWA0dg8ebX +bZV8FCXQXjsV/TV5HtASAq7Qy9o9nHRBNonL3uCJxFkgNuH2GN2+n8r4ggAEl4OZCg9 rJmFIurzRyiBn06fVbeWGrUIJ33lkGC97JosyzA6vZnI5JA1Sn8qm74BOm/PNpfgatJF 8QMyJnjiZgLdzSziYy5Pg2Z7+dKVwKEk/KJL+oDOMacenW5qUd2YawFP0Pu6XFJo5+i+ De4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature:arc-authentication-results; bh=AHb67pOxCBT5NDLl2re4C7DpGpAfXMLRWhFH5N3IHKk=; b=0+xmVscpOXrFXU0yAUgYdaekk4pSuJYGSG5LIaWXCH2yu307q8o8nHmA5y7U3pJnKL 8lTcW/CuJFSINCq8qld0Upc+np8vDnxG6yloqXP7QyGaHocuhMiSNa6PaZ0028pcq/iu 2yvvXU25TYcJ50lveqsLiSQ+K7+qQsgyju82j5mC/BIW90SIpFcNtW+StjZUppNLjAzg KyAQcd/itXREVQ5R+Fm9h+C+WLx9L2Q7retWuK8rWKoIVIEm5W4LJiaKyPK9yJs+L8/s ddw6Vtd7otA2t0sJZLBGpHvY6dhbfdt4FJF02Nf0g9cOnZfL7ykPuCSfxq7pTm8pADpH YCfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rA6PyDid; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1-v6si9395177pgr.572.2018.05.04.09.21.46; Fri, 04 May 2018 09:22:01 -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=@google.com header.s=20161025 header.b=rA6PyDid; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751499AbeEDQUY (ORCPT + 99 others); Fri, 4 May 2018 12:20:24 -0400 Received: from mail-io0-f180.google.com ([209.85.223.180]:45278 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751419AbeEDQUX (ORCPT ); Fri, 4 May 2018 12:20:23 -0400 Received: by mail-io0-f180.google.com with SMTP id c9-v6so19911906iob.12 for ; Fri, 04 May 2018 09:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=AHb67pOxCBT5NDLl2re4C7DpGpAfXMLRWhFH5N3IHKk=; b=rA6PyDidGYE82eMQhnVO1MnkVDTXVN8njtJgRt9XgAwv5ni5XXB9N+BbvFLfEklBor zCJ8JfKFeLgch6bozfEOoeQv78yzFALOVA2O6I1PUtuy9Vu32CfkJcYWy0WfB85ZwdCY aPMgr7pPBpAS1marMYwbKaTCSjARFHDQXeFYFNWL4X2ddYCTvZ1XBh8IbGkSnWOwpHjL 5WwoocikZ9slxEIwAkp8mlEmC6AqZF2nVc+RraEZECr7Z6SFZeB9uJqwcmSfQYG+K2Us 1QVuJFNqYKohBEcuxKX+goU+dc224jhyT7zQExapo7pftgzl41Q8iptuJpeTlp+ZZsym XqKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=AHb67pOxCBT5NDLl2re4C7DpGpAfXMLRWhFH5N3IHKk=; b=bgJGoH5V51qZsHLqmFpI/v92zxnxCi9qk5nU/AzgLhxAJCyHMcIowO0aAZsPprCRdH qbenHt3A9lCbbN8x7peOeC5ASSRqFeLpKU9XLAIlmTJGu73bGnI9GOID0lLZtaccWRHh 9TMkJHqNVYv4Cvz/UTDQ+Hg5+4rGB7HgCPnOzdYE5LQvDHLSxzPS+e537cMRJM1BdRz/ 3xQI1gFBGC2JVSj+QpwmztUvdeKNzpSxGqnjo6oqsExGUw5ClxsRStMLDMYXhPTvW1pf dOXuFv4Q2DYcIQUPMp4+gR740jDRQyjbnU8xSqH4cbx8TS0MzqjWpWkG/7BuKchPBvK7 Acxw== X-Gm-Message-State: ALQs6tBOskWEJl26kD7oYwC06hGruqYhcvRZewNRurfvZLNlYUnr+LNy MzkwReKlz1lU8n0VB83QszmQTeT9V7YPWSOA0bOg/DWHP6w= X-Received: by 2002:a6b:844c:: with SMTP id g73-v6mr31501803iod.251.1525450821972; Fri, 04 May 2018 09:20:21 -0700 (PDT) MIME-Version: 1.0 From: Joel Fernandes Date: Fri, 04 May 2018 16:20:11 +0000 Message-ID: Subject: rcu-bh design To: Paul McKenney Cc: Steven Rostedt , Mathieu Desnoyers , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, everyone, I had some question(s) about rcu-bh design. I am trying to understand the reasoning or need of it. I see that rcu-bh will disable softirqs across read-side sections. But I am wondering why this is needed. __do_softirq already disables softirq when a softirq handler is running. The only reason I can see is, rcu-bh helps in situations where - a softirq interrupts a preemptible RCU read-section and prevents that read section from completing. But this problem would happen if anyone where to use rcu-preempt - then does rcu-preempt even make sense to use and shouldn't everyone be using rcu-bh? The other usecase for rcu-bh seems to be if context-switch is used as a quiescent state, then softirq flood can prevent that from happening and cause rcu grace periods from completing. But preemptible RCU *does not* use context-switch as a quiescent state. So in that case rcu-bh would make sense only in a configuration where we're not using preemptible-rcu at all and are getting flooded by softirqs. Is that the reason rcu-bh needs to exist? thanks! - Joel