Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7043370ybi; Wed, 5 Jun 2019 10:16:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyA4pUePWWArcLKhHc1G/5fz9+rFwKRU3TK/JtZmW7W72BkZQS/LDtPKRyydm7L0LzK3ikI X-Received: by 2002:a65:5344:: with SMTP id w4mr5941779pgr.8.1559754989243; Wed, 05 Jun 2019 10:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559754989; cv=none; d=google.com; s=arc-20160816; b=eAqHfm1eNzA6uSnUDM7sEU1AytG4X8Ja2rLE6pwdUYVumyS4RtaW41IqVBV4rM4zgZ Kj8uqeGaAQKC8+lq39PMGLucTfahlcvEoPgsrZIaJGPHKzU3Ow0lBvjfejI96H1/jglO l4/npLXxrNJVYCJQT9sCrgzQl6AUoIOtZ/UEVBARgtYcOKB7IZZZmer6ouejRahRxprZ Tr4No7un+jkDTmgrk24tmDKZgtrIMQkHMPfouHqp+8FKQr6Eks3q4Ow02DpCEA5lo+cD 4q+KMKgO+9RqTmVzh5s0RKVRwAZMQxCE/W9DkfRX6URqb/okBNBX2t/vDpcS9OR7YJnA z1aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:dkim-signature; bh=sOqGn9ZwObLOVZTlPo4MIna0mpVyceumsYH4WB2YKiE=; b=fAsGEBQC5oXBNa3p9pOXMQnEelJLIpCrrsB+BxxiIBPgmKlvusWLgLXxQOaFTgULLE XYB87KGoEZrVyphbQ/21WW/fJ9CeDdUOqCyt0/sFKoGEdwqkssFp0ZZMMBzviXkDLBEv oQOxEvLmzuykWa0EGFKMd3Meg0lynJHnRktC6VgnyvnCl1mJz10DJZeF6sBO9PKiNM51 vV58JL3tftXHg3FBGnNd8y5hmWU+jxJ6khHDuJb/mnf6sB3A5OcQta53jfVCwW5/rncW PrJ+pknCji3svCFKWd5KfVqAmkpeeJL4tAJdK+hSZkeYe/aJjJugKS9QESG5etOA2tmG 156g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=lE83oMi2; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-onmicrosoft-com header.b=oDjmaKwL; 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=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si26772278pgs.90.2019.06.05.10.16.11; Wed, 05 Jun 2019 10:16:29 -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=@fb.com header.s=facebook header.b=lE83oMi2; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-onmicrosoft-com header.b=oDjmaKwL; 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=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726461AbfFEROe (ORCPT + 99 others); Wed, 5 Jun 2019 13:14:34 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:34144 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbfFEROe (ORCPT ); Wed, 5 Jun 2019 13:14:34 -0400 Received: from pps.filterd (m0044008.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x55HAlL1016018; Wed, 5 Jun 2019 10:14:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=sOqGn9ZwObLOVZTlPo4MIna0mpVyceumsYH4WB2YKiE=; b=lE83oMi2rHMksp/wEvsV0eR9lom6x0P2YXyOEf7JCMtKHmBZXIudrgglu4qI/OC9/wqn oK6+98Dt75xIIAW2dXOZOo9aMUpNrP9fveofrtkQm7zSYhB6emoDItzEJv4hsFEE2BZ5 sVJe7cvLkdS/r9Y818GQ0FtHaHUncN/SdYQ= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com with ESMTP id 2sx6ac22ed-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 05 Jun 2019 10:14:06 -0700 Received: from ash-exhub103.TheFacebook.com (2620:10d:c0a8:82::c) by ash-exhub104.TheFacebook.com (2620:10d:c0a8:82::d) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 5 Jun 2019 10:14:04 -0700 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (100.104.31.183) by o365-in.thefacebook.com (100.104.35.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 5 Jun 2019 10:14:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sOqGn9ZwObLOVZTlPo4MIna0mpVyceumsYH4WB2YKiE=; b=oDjmaKwLKyCaD349hNxyoh82EbhHeIZJHdT5S9nHWZ8+H44TMUayT3oMMl0msgwQFbz0TNoAtwZ8xR0ugx7eJroe/qbSHNFtQmvox5EkbdLXjs0gw5l7vOxC7AQK0Y3/m3gsZ2PzILg1qd4yTM8XUDUabvNwpd9U2Zp2GThI3cA= Received: from BYAPR15MB2631.namprd15.prod.outlook.com (20.179.156.24) by BYAPR15MB2742.namprd15.prod.outlook.com (20.179.157.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.13; Wed, 5 Jun 2019 17:14:02 +0000 Received: from BYAPR15MB2631.namprd15.prod.outlook.com ([fe80::d4f6:b485:69ee:fd9a]) by BYAPR15MB2631.namprd15.prod.outlook.com ([fe80::d4f6:b485:69ee:fd9a%7]) with mapi id 15.20.1943.018; Wed, 5 Jun 2019 17:14:02 +0000 From: Roman Gushchin To: Shakeel Butt CC: Andrew Morton , Linux MM , LKML , Kernel Team , Johannes Weiner , Vladimir Davydov , Waiman Long Subject: Re: [PATCH v6 01/10] mm: add missing smp read barrier on getting memcg kmem_cache pointer Thread-Topic: [PATCH v6 01/10] mm: add missing smp read barrier on getting memcg kmem_cache pointer Thread-Index: AQHVG0i1Qy6vvrJhnUaeUsu3v8l0raaMeYMAgADUCYA= Date: Wed, 5 Jun 2019 17:14:02 +0000 Message-ID: <20190605171355.GA10098@tower.DHCP.thefacebook.com> References: <20190605024454.1393507-1-guro@fb.com> <20190605024454.1393507-2-guro@fb.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR20CA0025.namprd20.prod.outlook.com (2603:10b6:300:ed::11) To BYAPR15MB2631.namprd15.prod.outlook.com (2603:10b6:a03:152::24) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2620:10d:c090:200::2:a19a] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bd9203ef-8253-4d50-bfc2-08d6e9d93499 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:BYAPR15MB2742; x-ms-traffictypediagnostic: BYAPR15MB2742: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 00594E8DBA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(136003)(376002)(39860400002)(396003)(366004)(189003)(199004)(5660300002)(6436002)(46003)(6486002)(1076003)(71200400001)(71190400001)(4744005)(25786009)(6246003)(186003)(6116002)(66946007)(73956011)(66476007)(66556008)(64756008)(66446008)(229853002)(33656002)(53936002)(2906002)(386003)(53546011)(6506007)(86362001)(7736002)(478600001)(68736007)(305945005)(102836004)(256004)(4326008)(11346002)(446003)(81166006)(81156014)(476003)(6916009)(9686003)(6512007)(54906003)(8936002)(99286004)(316002)(8676002)(14454004)(486006)(76176011)(52116002);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR15MB2742;H:BYAPR15MB2631.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: FSkxo7w4HX05jKNWoswf6c67IcY8DijrULMQUWnlmZ8wuDC1HOdJw6Jvk/Uc4qztNdtthlSiXPW0GekQLSYkSNMKjBz2aavbkfLS4+Ufz6lvfGhBd/23mrkplaazveVpKMJao0Dx/9sxngwH2a6VEUcnOHG3l5/yRPEILuMbvibn/dJImz/85qBba7U08467xdXRWK/Nw+lxdGg//bM9zBtb45XXA1ui26tRHee3ajN2KD7V4iS1xsxZm5FsDqrpKuUh7l2K771OtfzlPoaTj8z8aGl0fOs7haSaIUFPy/S8kXiO4m0om/rSkBI34+7++6U10mLudcPCNnK6wqZlkPXo69MU1FJIhkH6nkM4ywY5kIy9L6Vb4nREYDkUleY+rSL8Z1sIeZ/HFCOhiUo1PtSKqMdljxZEYDS3FtQV/fg= Content-Type: text/plain; charset="us-ascii" Content-ID: <45474FB10F28AD468D4F949947B3B6FB@namprd15.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: bd9203ef-8253-4d50-bfc2-08d6e9d93499 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jun 2019 17:14:02.2198 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: guro@fb.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB2742 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-05_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 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=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906050107 X-FB-Internal: deliver Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 04, 2019 at 09:35:02PM -0700, Shakeel Butt wrote: > On Tue, Jun 4, 2019 at 7:45 PM Roman Gushchin wrote: > > > > Johannes noticed that reading the memcg kmem_cache pointer in > > cache_from_memcg_idx() is performed using READ_ONCE() macro, > > which doesn't implement a SMP barrier, which is required > > by the logic. > > > > Add a proper smp_rmb() to be paired with smp_wmb() in > > memcg_create_kmem_cache(). > > > > The same applies to memcg_create_kmem_cache() itself, > > which reads the same value without barriers and READ_ONCE(). > > > > Suggested-by: Johannes Weiner > > Signed-off-by: Roman Gushchin >=20 > Reviewed-by: Shakeel Butt >=20 > This seems like independent to the series. Shouldn't this be Cc'ed stable= ? It is independent, but let's keep it here to avoid merge conflicts. It has been so for a long time, and nobody complained, so I'm not sure if we really need a stable backport. Do you have a different opinion? Thank you!