Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3307128imm; Mon, 6 Aug 2018 02:20:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfJXQFeOw2uOlqgsPjp16NAGsX+JYIWPjBGDAZYJ0l5kLNaQQOipuH2+/IH4EVZGArIDoMC X-Received: by 2002:a62:cc4d:: with SMTP id a74-v6mr16334528pfg.200.1533547252791; Mon, 06 Aug 2018 02:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533547252; cv=none; d=google.com; s=arc-20160816; b=F495wDmBkrGvAydiwqZIZr0uk8qFVfBQK2a1CeWKLjs9FdyANX1M64Z02SQPpOMKmW sJN7mxrA0eWoqH25XpSGntIfCPAnBfCWscuG0gLIcKzBnBW58EfmJEuoDG9Z4kddo32P 71YK8UE8BT33IJtRJj50pGoALO/WcwhsHuBStFAmYY22ehcZ/Di/NXwob8MmTVqB+O+k hZfEwSSV4IEiGXr0OEFOd2xY5Xw5oaczfEOpHi3iEx6YeydiOiw3/CfCmgpW74RiLo9O nroc2TREPui+xfh9NlE3NdnAjAfDzyew1/jK9j+iTn7xall/2w5SAq8uzzX34uKDkLFA dvrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=iYwNA0Uom+PBqXfIgl9haPb9zUKaJziduwaf+yVM1cs=; b=Y/FMlK3MPRwnBgQOT5CRV2mk3Ei5PHdaBQn5mVWxdg/Cxwn+H98Q1XOirISCYa2CB3 jICzfL9NPxJsRWBjRvuZevEFwhE62b52/Hzf/zRren5NMKuzuEIHBv50yExB0FdBgb3D NDKa0lblFgjSO5yygW4B0SJOUTuN6j65mwQv/bZS3F/6NLYpFTo4susOvKJMhmpxR+hP 86mCMxe8LFHhVA9bwN96YHTdSe6cF58356kjPneBZUjOhc3DKfS6UJZ4IVTrtJV7Hw94 EDCZ6V6ZSZqxciZzxcHLUOZr7YK27mXLjgvIOVWqPbCpqNASmRR0zGXzG84rkq/nGs2e hGEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nio365.onmicrosoft.com header.s=selector1-ni-com header.b=XXhD8qqy; 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 c27-v6si12526321pgc.11.2018.08.06.02.20.37; Mon, 06 Aug 2018 02:20:52 -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=@nio365.onmicrosoft.com header.s=selector1-ni-com header.b=XXhD8qqy; 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 S1729752AbeHFL02 (ORCPT + 99 others); Mon, 6 Aug 2018 07:26:28 -0400 Received: from mx0b-00010702.pphosted.com ([148.163.158.57]:36440 "EHLO mx0b-00010702.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729717AbeHFL01 (ORCPT ); Mon, 6 Aug 2018 07:26:27 -0400 Received: from pps.filterd (m0098778.ppops.net [127.0.0.1]) by mx0b-00010702.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w769BFW2008024; Mon, 6 Aug 2018 04:17:51 -0500 Authentication-Results: ppops.net; dkim=pass header.d=nio365.onmicrosoft.com header.s=selector1-ni-com Received: from nam01-by2-obe.outbound.protection.outlook.com (mail-by2nam01lp0178.outbound.protection.outlook.com [216.32.181.178]) by mx0b-00010702.pphosted.com with ESMTP id 2kn93xbp4g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 06 Aug 2018 04:17:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nio365.onmicrosoft.com; s=selector1-ni-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iYwNA0Uom+PBqXfIgl9haPb9zUKaJziduwaf+yVM1cs=; b=XXhD8qqyLwHAO7+1tw1ZZ4vDIvzU48tRTmEgesh7xLKhKKxNNPr4s7lPLO1/NwQSHgdUTF1K5kY3Fd2Xw+f90RoXAOV6NKlJYgsSus1RzFSMGCVNQf982kV1zN7+2Eu0FI7aFHKDgN25I0aFt3flh/PJ8Y1XZEQwEM5KyU0SyUc= Received: from jcartwri.amer.corp.natinst.com (130.164.62.116) by CY4PR04MB0966.namprd04.prod.outlook.com (2603:10b6:910:54::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.18; Mon, 6 Aug 2018 09:17:48 +0000 Received: by jcartwri.amer.corp.natinst.com (Postfix, from userid 1000) id 4022C302F67; Mon, 6 Aug 2018 04:17:39 -0500 (CDT) From: Julia Cartwright To: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Cc: Thomas Gleixner , Steven Rostedt , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Paul Gortmaker , Daniel Wagner , tom.zanussi@linux.intel.com, stable-rt@vger.kernel.org Subject: [PATCH RT 21/22] seqlock: provide the same ordering semantics as mainline Date: Mon, 6 Aug 2018 04:17:37 -0500 Message-Id: <40aac5862b763fabc66d146390356347b82a8231.1533540554.git.julia@ni.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [130.164.62.116] X-ClientProxiedBy: DM5PR21CA0051.namprd21.prod.outlook.com (2603:10b6:3:129::13) To CY4PR04MB0966.namprd04.prod.outlook.com (2603:10b6:910:54::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8cfef9c7-a077-4d41-bd66-08d5fb7d7a55 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:CY4PR04MB0966; X-Microsoft-Exchange-Diagnostics: 1;CY4PR04MB0966;3:emhugZZuQo8VYx4UeTz6iqDsi5H6fuiYHaJ1UuH3BcZnxVxmeukBTIGJ4Hg1TMli2ezLG6J0DCmf11+pU8tL5jxrahL+i3x7N4eeryAjkAcg/d2RnW7izwYp8CzmE+FT8bpKazsdiEbLoKTs72Ici9PEYAy+x+pf+TAyL+EoLF6bpoKqDmKY/tZrUwRgM8u6QeWkOSLwLtWT/DBPgRvulMPozwbrueN+Yzi7CxUjA1tdAdPbAV0LiAFTiZhPLPVg;25:00irEVAAzfqpSAMs0np8Qm2FRo43UGXZ37LYxnGQwnCe9W2J+l5iLBpNuyCsDkjtkyZSWcTbPh6E9FraTZ7DM2RpG04vCz0JL0BTHfmKeeghZzng778PKWetG8DIa7+P/hYj0D+13qbSjTfZ4U3EL2IKP18xHN4Br2T6OztAHvAVAkZdQY0gElOMr/jpV7eQzWBKi/VfazQci8z5IgekjtBzJAra8cLnXzZaN6Yd0qlySAkOIUYpfink0BEEiDSSpQ+33RE/wK6a6quCZcvOqu7lqwLps/zrYRtR83aMOoaFnSH9wvlA4/neXqv9oQn5CqmQBruxaji+1xzvdxVH/A==;31:jAnH7hYs1JgXaOlCd+X/MKm/CTgRSNSKNdt9ajPy+n27eBHhsjD1jVbJcFwCj7/CLHUl39FWkVn7/2jrbuvqnF4oZYbaD2mSPs7UXLGvGPyuQ2dYcFzt+qqGBz73oHVCCzoIUstaODzbJENg9mGQqD0yzoVZXTQg8oV8zQzMYh5fU6XXJDrAsDGBuB+VdKdFOfc6/p4tsOWopdFZYw4zuoU9wT69giQArhIeEsv+3fU= X-MS-TrafficTypeDiagnostic: CY4PR04MB0966: X-Microsoft-Exchange-Diagnostics: 1;CY4PR04MB0966;20:PP5urDkloizSgUvXJZ5MfiyCdbz1o1vFu3VbrNlcOT7gY1uTwh0qD9EdJxXMtyljzHlXLsMhZtMqMvYyerCok0JpdGKmeRXUUa+SLWXzA4n5CClV4JogJia26a+VyvUV/uI5abFJTO4e5DrGEXkEORb5R8c0V7i2iogfB9huYPkz1MOIJkJxqr5dOdX3ZOpVdBqboXYgMjiQIXhabv62sZEvtpyGSxGi3ssiOmnDI9T9NqQQHn1qHR1LY9cQLNFE7Cepqvfc7dIaevOwwb+VVy3NKOkMhQq/ATVw2NpagKArU5LYUm7PLMwFLMyUpDsOXuGpl9z1q3pkTXEmSpbjWeYo3pHSrn2XgeZTiETBpSvpB7PCT86HryKRd/lV+YC2HnZrZC9GfueMcRFjaDOVpH7zxicZEbdoUskeKp/kDVXjddvjbvpcDuzeu8jt9Wq9Bm9ZPZUnFBQ65uyqEjoe/EqiwPvzkbD1XT4TBGQHYd3AUK0SRmW2TH810DB45xTxgXDi7c6lh+XagsLy/Y6VAeBAhD12UgpzObywDuKLxG2gjrWrvspUIdinjvIBTSv35zEUYit/8IAmwvqv89jZ3XrtUMZxQS2G5lJ2xI/IVCU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(145744241990776); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011)(7699016);SRVR:CY4PR04MB0966;BCL:0;PCL:0;RULEID:;SRVR:CY4PR04MB0966; X-Microsoft-Exchange-Diagnostics: 1;CY4PR04MB0966;4:7P4gJWx94jNBhzMpHOw4Sphm5TyH+2AuHCcJICaX6gt/c5Vn13+X+1kC0DsBeIpTQr1XNIKdTkAlmUgrw59JugE/gPus3gs3R2SfnB14WIFCrUMbAvXl8gTkaMoj1ojcYnu0WSQkablZPY9JPgsOxCTft7BtMIe4CSc/+3tiPWR/W8hhvV/1wBKJ0llJMwisNYHkLOis4bl/j1YJ0cUp87SSsQvMblf93dj+OD41zTAQIa/lbXiHz00qVBxoc0nlZUaa5FYaXM2lkPyb41onPAv3/8NkrbSABt5dwE2tKaVp9F8x3ZQQ4RzvbRRKkT9j+JZ2Qkg26goAG/YmstIkPw== X-Forefront-PRVS: 07562C22DA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(346002)(136003)(396003)(39850400004)(376002)(366004)(189003)(199004)(42186006)(51416003)(52116002)(316002)(53936002)(122856001)(76176011)(8676002)(2906002)(81156014)(105586002)(81166006)(106356001)(4326008)(16586007)(478600001)(54906003)(48376002)(5660300001)(50466002)(66066001)(118296001)(52956003)(446003)(50226002)(7416002)(90966002)(6266002)(68736007)(8936002)(47776003)(2616005)(26005)(186003)(11346002)(486006)(476003)(386003)(14444005)(3846002)(97736004)(36756003)(7736002)(6116002)(305945005)(575784001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR04MB0966;H:jcartwri.amer.corp.natinst.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: ni.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR04MB0966;23:PPzGtiI1i2dRMNgITbrpjrPh4wbz148UyXuM7MfTD?= =?us-ascii?Q?Wi18BA/Cwvo1gxA57TAkOWP6OKYtcIZtPWeXV6jEf2fqCK1NKAE1kvO2zRdL?= =?us-ascii?Q?J6Xi1id7VaTqsM/f8KJIvFHNBve/RVLfA2Fls5kZ0sq39l1yKFN9atrq5w6f?= =?us-ascii?Q?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5wKAd25QRNlA==;5:3YAZV4cBJB/kLGu0sp3a+3x7Sidm5effXPAgoDm4hNnDpbxjVvWIl1YNd6evq8sZwkni+3bRetv4dGB9pG6q3k5crnzAGHr1yLYndpO+H32nmOh8IYLgphQnIg0fCdaP5zLw0/17RFtEeifKsBUNn6M9nhRr2AxVTwjiEVeVjDc=;7:iLH4Dn4tYlExId68Yn7aKpSaigXKLuYT7mFYZXl25AcPHAiaelX86bLTbZY+Zo9UR86FO9FirvEMkpvujzOw0W0EVAfVL4gE5SNiI+7OFpo8A2QJWTh8GFL7uXWZS53zdzCYCo1PGAJ9AGhsrEOtDhQ2YPcTaIu1wq1n+eyp4+rpuZqTxkn/9pcVmoN8Z3b7P6XuJHLxsmGAwvGFk9XY4gCm7yuGqC8EH2POxo6QRZCOsXcVjguqyYPu2oQmWWa9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ni.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2018 09:17:48.4316 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8cfef9c7-a077-4d41-bd66-08d5fb7d7a55 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 87ba1f9a-44cd-43a6-b008-6fdb45a5204e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR04MB0966 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-06_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=inbound_policy_notspam policy=inbound_policy score=30 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=30 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808060100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9.115-rt94-rc1 stable review patch. If you have any objection to the inclusion of this patch, let me know. --- 8< --- 8< --- 8< --- The mainline implementation of read_seqbegin() orders prior loads w.r.t. the read-side critical section. Fixup the RT writer-boosting implementation to provide the same guarantee. Also, while we're here, update the usage of ACCESS_ONCE() to use READ_ONCE(). Fixes: e69f15cf77c23 ("seqlock: Prevent rt starvation") Cc: stable-rt@vger.kernel.org Signed-off-by: Julia Cartwright Signed-off-by: Sebastian Andrzej Siewior (cherry picked from commit afa4c06b89a3c0fb7784ff900ccd707bef519cb7) Signed-off-by: Julia Cartwright --- include/linux/seqlock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 3d7223ffdd3b..de04d6d0face 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -461,6 +461,7 @@ static inline unsigned read_seqbegin(seqlock_t *sl) spin_unlock_wait(&sl->lock); goto repeat; } + smp_rmb(); return ret; } #endif -- 2.18.0