Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1180934ybc; Sat, 23 Nov 2019 16:41:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzhG5wRhCy6QSLZJglgJLbXj5UcckTZBc3qeiOhrhu9svOkNK0uxBXoiBT21GPqIb13Jw+G X-Received: by 2002:a50:978f:: with SMTP id e15mr9655696edb.298.1574556075411; Sat, 23 Nov 2019 16:41:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1574556075; cv=pass; d=google.com; s=arc-20160816; b=oYx2Z6v5Il1wBIJPDnwhf1BUrqCVTwZm+5uU+euQCXS5D3fxk7HkFA10fEw1x7D0md 0US/O6PvrMrsVT0sDajGsR3bXRd9YPQPqs6fF0suWd6ItB89CpHrUrXCp0p+y07rfEQy //iFHKlcM3SlBPxcuesVKiqQSfssiSMli2OZqBGLuVbFBSy8vgJLLlKTPm19Nyt4NHIU IA3QC8D6pzvKySGSsWxTvjGPkYSNQv8Jr1P50uVoLZosVYb78xj+Isy2RSaQ4U6xC3lx 6A6vybKOTTZvhacFyRbovP6BhyKdxzJUf/RbzjYsuk2O+Kq6q53lcquzNpEEclS/CXvO ahKQ== ARC-Message-Signature: i=2; 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=6SEMaZe4CB3tL8JIbdMVuZRzoKUz/OFWc+jOltOFQrI=; b=PjydjpPs+3Cc3DcCH4Ps8xAQXJfWgr6l0c6JQG7J06IVMQAl89gEKYlZBBkYpOCFdC Q9h9Nb+gEhPdWR/33i5E2fF/WXFV5dzHuaQkhgyP+FO8rsjdURILgZt9sRz/45tUT8yd lkp1yQQMgmjucH/FbWGXX+KFdLQt+wrJj4+3vwwU2kAAzYCN3Bjpv3vyXuor7zsh4i+e WtRrppg9xpIP4XVLmWdnlVBW0qUcIqInoEqB7LVQjilIdwS9DwkoFvgRmdFidgghGoVD c/v7GUMioLshxCvxw8sgqRPJajl5S+tYgCbEBus+889nhU4daocAre9RBRt4u5HWAY+H XFSQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=DR75xRPj; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector2-fb-onmicrosoft-com header.b="Z4NWD/LE"; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.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=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 z4si1752174edp.329.2019.11.23.16.40.50; Sat, 23 Nov 2019 16:41:15 -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; dkim=pass header.i=@fb.com header.s=facebook header.b=DR75xRPj; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector2-fb-onmicrosoft-com header.b="Z4NWD/LE"; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.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=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726931AbfKXAjx (ORCPT + 99 others); Sat, 23 Nov 2019 19:39:53 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:4996 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726846AbfKXAjx (ORCPT ); Sat, 23 Nov 2019 19:39:53 -0500 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xAO0Ueso004900; Sat, 23 Nov 2019 16:39:35 -0800 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=6SEMaZe4CB3tL8JIbdMVuZRzoKUz/OFWc+jOltOFQrI=; b=DR75xRPjh3l5iTbX8IlE5wl2zpEN0ckD9IeI0KpXQUrTAP7V3DFTwy59UqbDwl9WqXwh vGLIku5kJ/I5OC1KKtOpivNRr0eC+NukfadYAUAE6ojNgW8y3lbGRdi5bG7UVs2dR2eu WUIzCKPQPxXNelwYo40GnM2+0r6LDV7Bxb4= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com with ESMTP id 2wf3be25xj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sat, 23 Nov 2019 16:39:35 -0800 Received: from ash-exhub104.TheFacebook.com (2620:10d:c0a8:82::d) by ash-exhub103.TheFacebook.com (2620:10d:c0a8:82::c) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 23 Nov 2019 16:39:33 -0800 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (100.104.31.183) by o365-in.thefacebook.com (100.104.35.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Sat, 23 Nov 2019 16:39:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ut2oDbz5qwE/7Y5vyt9eQNbfSoOUe2C5mCmMmulU7/cgMQuwLrkqnFqszFUgQhVLEn1C3WLApWBWb+BfFjgFXi8Xs3FcBhzNyflbzsFKdD4+bL7sTotf5L7w+rn6dLB3s5qid0Rd6EqfDc3dRpciTtuED0D+2xTZnfr9K40z5zHL1mCTHs/i4yy1QVSbCHR4Drc3mlIr6hOZ+8dWupvv9RAeZxOqx1a3d8JqVx7WxvzPEiXo+NJvBGh3aB7O3s6n8vPnOgKJNkcotGujEZDcd9GRR1y+iO6+LkuGmKGO3OENwmjIprmdTFE0URDH8WQ8kpOIxpwzVSk/2DUOFWx9Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6SEMaZe4CB3tL8JIbdMVuZRzoKUz/OFWc+jOltOFQrI=; b=cI56UUC7wqtpcQE+YtLtaeiUZB9pZjNLx6OHsHHWZX33d0Ewd0YBEYic1t9yEvEJBQk4+YAu8GKkMhW7wRT8SOCmz73ALbIT+T6y4/Y8jrJDP4oJg6Q/tCNcX6/tOZ+4k4mJ9PMg4HoibFrHmwjDYLk6L0hvJVVH/Lraw7HwagMlg7tQt3VIQ7Ohjr+iJfXJmbf7LI0i1oxN+ALhzoaiCQUoyD4LMKz43edgJMDC/V0f4NN+WFV8M/2R6qniUQxrhIjPtHXoTImonRQBmrI5JTnn7+rMp1l6TVhqAnt++XOY3qFJoKMxbg9hRJPMbpiGlnlx5cqd4Z3VF5Yufq5rAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fb.com; dmarc=pass action=none header.from=fb.com; dkim=pass header.d=fb.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector2-fb-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6SEMaZe4CB3tL8JIbdMVuZRzoKUz/OFWc+jOltOFQrI=; b=Z4NWD/LEeBGsUaDrsunUt1O64wwgi6aR/oR0Ss2k/JZ9zFMgPf9ye6PYRCX07d1G1jZSivxAnSvFMF3gQ4jj92V/xeLg0GFC7pZ/JQf+h9GUo8ogVvGVG5KAo+LtYuF77yfKj6hfKgP9zWYdB3D3kS9VmuJPm7Aw0gKIyy3EIvs= Received: from BN8PR15MB2626.namprd15.prod.outlook.com (20.179.137.220) by BN8PR15MB2818.namprd15.prod.outlook.com (20.179.138.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.16; Sun, 24 Nov 2019 00:39:31 +0000 Received: from BN8PR15MB2626.namprd15.prod.outlook.com ([fe80::50eb:bc03:b3de:375c]) by BN8PR15MB2626.namprd15.prod.outlook.com ([fe80::50eb:bc03:b3de:375c%7]) with mapi id 15.20.2474.022; Sun, 24 Nov 2019 00:39:31 +0000 From: Roman Gushchin To: Christian Borntraeger CC: "akpm@linux-foundation.org" , "hannes@cmpxchg.org" , Kernel Team , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "longman@redhat.com" , "shakeelb@google.com" , "vdavydov.dev@gmail.com" , Heiko Carstens , Janosch Frank , "kvm@vger.kernel.org" Subject: Re: WARNING bisected (was Re: [PATCH v7 08/10] mm: rework non-root kmem_cache lifecycle management) Thread-Topic: WARNING bisected (was Re: [PATCH v7 08/10] mm: rework non-root kmem_cache lifecycle management) Thread-Index: AQHVoF1eUJGIXl/jo02oA2+fhmBRU6eV2PaAgAAAgACAAB16AIABbCgAgAIbagA= Date: Sun, 24 Nov 2019 00:39:30 +0000 Message-ID: <20191124003924.GA7816@localhost.localdomain> References: <20190611231813.3148843-9-guro@fb.com> <20191121111739.3054-1-borntraeger@de.ibm.com> <20191121165807.GA201621@localhost.localdomain> <20191121184524.GA4758@localhost.localdomain> <903c101d-45bc-1e52-3c01-1e65cd4ef43e@de.ibm.com> In-Reply-To: <903c101d-45bc-1e52-3c01-1e65cd4ef43e@de.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR03CA0011.namprd03.prod.outlook.com (2603:10b6:300:117::21) To BN8PR15MB2626.namprd15.prod.outlook.com (2603:10b6:408:c7::28) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2620:10d:c090:180::7157] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0e0e107d-70e9-4ac6-ebb0-08d77076c49b x-ms-traffictypediagnostic: BN8PR15MB2818: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1751; x-forefront-prvs: 02318D10FB x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(366004)(136003)(396003)(376002)(199004)(189003)(71200400001)(71190400001)(446003)(11346002)(54906003)(46003)(305945005)(76176011)(316002)(102836004)(6116002)(81156014)(81166006)(386003)(6506007)(53546011)(8676002)(14444005)(8936002)(7736002)(256004)(99286004)(52116002)(1076003)(6436002)(25786009)(478600001)(6512007)(86362001)(9686003)(7416002)(229853002)(186003)(6916009)(14454004)(6486002)(2906002)(4326008)(66556008)(66476007)(66946007)(66446008)(64756008)(33656002)(6246003)(5660300002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN8PR15MB2818;H:BN8PR15MB2626.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: =?us-ascii?Q?0Ab8iBQmBvlYMZas8X8sx717ECIK0i70otJxTU0ips3+yvIGn6TdYVqd4IgW?= =?us-ascii?Q?YYatutixkIuEkJT5iuv0txRm/olgo8BGa90dkm+jLXlB5Oo3PC5xaPjWncl8?= =?us-ascii?Q?/PMG+YHGC4KXvcWSY+j2uG0p9TTzTWMe26pSxt3IMU/4Sg2+ok8kORu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Iw6lfpkDSn9mM/iINy1gxoIBnP+xNZi+8Yisxox/i?= =?us-ascii?Q?1hHtFdMXEpezQKOTjsXFWZkcbmNAxQ9oNtUj2r4XT7b6C5sTKx3CLgc++QBV?= =?us-ascii?Q?IdO/bBddmzFWMcW7mojLLwSONiYMAaje6n1VS8Tj8Kp9gJaVr5fSwB8zG/bR?= =?us-ascii?Q?h+PLSRQG6H40V0K11lj61NCd7Bk2lPafZR256NfEu+zVA7lV/n6eYR7Vp4ko?= =?us-ascii?Q?Uj+L3j2B3FWO00DDA7rfVxuyDHhpUt7iKSWeahvGJ9W+cPbGVNukKJlnFjMj?= =?us-ascii?Q?p3UAvOviCvj4e3eap2C+3mcXJW2PDe/W8sc2gBbkagtkcWQQdQ5SZH6kBuWq?= =?us-ascii?Q?GNVFfGS9ngGn7lvJX1F8+KZX94c4wDy+dP1sK2AHgKdwEZyGEyKXJRhLMjR/?= =?us-ascii?Q?p+f9XK+KewBSyPPH+0h64LGbPvtH0X64OvjnL+jgoE9SvnAUb5+zyVXx4YEj?= =?us-ascii?Q?DAL2/dOHwPYmliJYhiTUwqjGvwaFeMnD9JwHKpp+gdeok3UNbIuH8YkqAdTi?= =?us-ascii?Q?SYIW0GE/EWJKll0HoOfYeQbowEDQ3bhsedjiqbQh2/guCFu8wzyKPhq23MxC?= =?us-ascii?Q?4vliQooYoPASM5xg1Qf1G6Srb8gNWlJTf50jgXaZIdynBnGL3un9twUUG5c+?= =?us-ascii?Q?dijutZbD+2es+DvtB3eYs3EwmiY=3D?= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0e0e107d-70e9-4ac6-ebb0-08d77076c49b X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Nov 2019 00:39:31.0255 (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: 4AJk1vynSxIUlCqXWigqY1yDbIgAcJ5BX6LYrkojzhwZ74ipZf50HOynilmuoVqo X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR15MB2818 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-23_06:2019-11-21,2019-11-23 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 lowpriorityscore=0 phishscore=0 spamscore=0 malwarescore=0 mlxscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 impostorscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911240001 X-FB-Internal: deliver Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 22, 2019 at 05:28:46PM +0100, Christian Borntraeger wrote: > On 21.11.19 19:45, Roman Gushchin wrote: > > I see. Do you know, which kmem_cache it is? If not, can you, please, > > figure it out? >=20 > The release function for that ref is kmemcg_cache_shutdown.=20 >=20 Hi Christian! Can you, please, test if the following patch resolves the problem? diff --git a/mm/slab_common.c b/mm/slab_common.c index 8afa188f6e20..628e5f0ee19e 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -888,6 +888,8 @@ static int shutdown_memcg_caches(struct kmem_cache *s) =20 static void flush_memcg_workqueue(struct kmem_cache *s) { + bool wait_for_children; + spin_lock_irq(&memcg_kmem_wq_lock); s->memcg_params.dying =3D true; spin_unlock_irq(&memcg_kmem_wq_lock); @@ -904,6 +906,13 @@ static void flush_memcg_workqueue(struct kmem_cache *s= ) * previous workitems on workqueue are processed. */ flush_workqueue(memcg_kmem_cache_wq); + + mutex_lock(&slab_mutex); + wait_for_children =3D !list_empty(&s->memcg_params.children); + mutex_unlock(&slab_mutex); + + if (wait_for_children) + rcu_barrier(); } #else static inline int shutdown_memcg_caches(struct kmem_cache *s) -- Thanks!