Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3509932imu; Sun, 11 Nov 2018 16:46:14 -0800 (PST) X-Google-Smtp-Source: AJdET5cLz5rcaLFnko8ALRYIbxpiNkxAMJ08vuQz2h/BfyfTqpdelmfk7x2aFZFoJldkdPAR9Okh X-Received: by 2002:a17:902:4827:: with SMTP id s36-v6mr17355992pld.226.1541983574719; Sun, 11 Nov 2018 16:46:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541983574; cv=none; d=google.com; s=arc-20160816; b=BxjAxM3RH07gZgJql6h+XxqZincF1TF9oDrjPsvV3XcbajBVXw3xYceAdjG/bjSbPv +pq9ewRV1wmz8dvkXZAwtKzpAyTrhOSQY9ZD3FoEKCtrfU0FTQAf7l31ixI4tr+ea6th AOs/oVJ7p/VFQPhVg2kvfHUeMp1rqvAxjZ7k7O/Lwqcw8eErY/wVGYSKHP9hebLdQnOW pMZsBEwLKaghoiTL7NZ2CXTYPMiABe2Q+QdXShS7ZBEKwTmCcF2IWxEqgu+38DsgxQQB 54+itvFFbzgimPNes4uWRGAv/9lKJBrcGzoxewImQ0HtfecxZy57sxSmWWGhaV+eXuk0 hGJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date; bh=3m8Wh9h80/oB2NlZmKyT+FrjZ2/vKcP0YXwavHXTsyU=; b=IAs5yY9w+lCP8sRRTvOAiknqGVBqWKwOryBwuABTRWafWgTUilOdYjI9CEcvAlr35L nN0ChqEUMVDUejgojpj9GtlFK4CvC0jp/BMwP474KnTmlEBe3mydP+HDcGu9j1yFNUj6 Kzjql+TH3ZNqTpM8/NGpd9YV/HyHPflGrbftmqGt/APzyg78Lluc+IwgHRLXkLVR2TfL NaYKE+AsVU51mZX55pn1V9aZn7WIaYPfaOZs2dEzYFLhga2a4rZU3yGnRydSzZ0veSW6 tyCx+Uu+5XsQLxIDYTYd4lv9slkTz+x0N6c5pDd3ys7AhEU+dRL/i2D9EJ/E06BY7Hyd U3xg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5-v6si16479026pfb.88.2018.11.11.16.45.58; Sun, 11 Nov 2018 16:46:14 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729737AbeKLKgM (ORCPT + 99 others); Mon, 12 Nov 2018 05:36:12 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:39752 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726816AbeKLKgM (ORCPT ); Mon, 12 Nov 2018 05:36:12 -0500 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAC0dFnD001600 for ; Sun, 11 Nov 2018 19:45:35 -0500 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0b-001b2d01.pphosted.com with ESMTP id 2npx34t6ws-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 11 Nov 2018 19:45:34 -0500 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Nov 2018 00:45:34 -0000 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 12 Nov 2018 00:45:28 -0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAC0jRvJ39190632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 12 Nov 2018 00:45:27 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B834EB2064; Mon, 12 Nov 2018 00:45:27 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 95322B205F; Mon, 12 Nov 2018 00:45:27 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.85.207.24]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 12 Nov 2018 00:45:27 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 0109616C5D4F; Sun, 11 Nov 2018 16:45:28 -0800 (PST) Date: Sun, 11 Nov 2018 16:45:28 -0800 From: "Paul E. McKenney" To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, Ingo Molnar Subject: Re: [PATCH tip/core/rcu 23/41] sched: Replace synchronize_sched() with synchronize_rcu() Reply-To: paulmck@linux.ibm.com References: <20181111194104.GA4787@linux.ibm.com> <20181111194410.6368-23-paulmck@linux.ibm.com> <20181112001233.GC3056@worktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181112001233.GC3056@worktop> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18111200-0052-0000-0000-000003544460 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010029; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01116111; UDB=6.00578793; IPR=6.00896220; MB=3.00024116; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-12 00:45:33 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111200-0053-0000-0000-00005EBBAB3C Message-Id: <20181112004528.GA4170@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-11_16:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=977 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811120004 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 12, 2018 at 01:12:33AM +0100, Peter Zijlstra wrote: > On Sun, Nov 11, 2018 at 11:43:52AM -0800, Paul E. McKenney wrote: > > Now that synchronize_rcu() waits for preempt-disable regions of code > > as well as RCU read-side critical sections, synchronize_sched() can be > > replaced by synchronize_rcu(). This commit therefore makes this change. > > Yes, but it also waits for an actual RCU quiestent state, which makes > synchoinize_rcu() potentially much more expensive than an actual > synchronize_sched(). None of the readers have changed. For the updaters, if CONFIG_PREEMPT=n, synchronize_rcu() and synchronize_sched() always were one and the same. When CONFIG_PREEMPT=y, synchronize_rcu() and synchronize_sched() are now one and the same. > So why are we doing this? Given that synchronize_rcu() and synchronize_sched() are now always one and the same, this is a distinction without a difference. So we might as well get rid of the _bh and _sched APIs. (See the tail end of current mainline's include/linux/rcupdate.h.) If you are instead asking why the RCU flavors (RCU-bh, RCU-preempt, and RCU-sched) got merged, it was due to a security incident stemming from confusion between two of the flavor, with the resulting bug turning out to be exploitable. Linus therefore requested that I do something to make this not happen again, which I did. Thanx, Paul