From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 42BBDC433EF for ; Fri, 14 Jan 2022 05:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VglkWksTdnXV7d8ekJ7YdqokhCFsciXj8zsG89RizsQ=; b=p6+t5u27+2noGC RfxJ0+4DvxZN06i/qRpYt94Q/gMa7wUFlp4yRo24rRXYxXJoL4BW3cA+y8J67FBb3PuupsBTwYAkE dZOcMBnSJlcPAM7fcH8LYrCWDfSU0FNK2drosDOBS3k5DkpvCOi5J0vpTEMlqeBX7pevSN3Tw9FHa tglnQVbxDVwfa0pMidlSli/+VqywK9n4x2l5nhgO1ffBmvAmO/wTwCWyWbF3RyFQNt+UK/XU+qqF8 uDEVJ/3M28Nw0TfEO2FHo7oEXmppBT3KtzWB9qCXpJaKfICXy9r/8gZHfkUat4W/pzJ9ZdylE22zT i9xZmpGuUCw8OnZymQqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8F1u-007lxM-3H; Fri, 14 Jan 2022 05:21:38 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8F1q-007lwK-2g for linux-arm-kernel@lists.infradead.org; Fri, 14 Jan 2022 05:21:36 +0000 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20E4fKP4011211; Fri, 14 Jan 2022 05:21:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type; s=pp1; bh=GU/FKNbFwLs/b5lIMVaEWTo4/R6UQBdKJknPAPObmBU=; b=sj3jYsZtvf3NqZPIstlapKRyNfNBOBaagJu2XZh40HsKTZCBs8JllFP6lZHZ1GdXKbpl Og35YNNyPmAkGzZlsoiUsuAAbzruIpKqcoGDnafnaJ99pZmiuhpyfYSVsLi5H+zvNnbb 2Yw360g5kuxE42s4WXRfF17wGACwYvUiTEEHpnL6rZUfmD+tlxFLcqmqxkGsr/cOE4Kh GEEPkpH6EV/YccpudT1YXLxq4cr3Vu75ufXgIaakvLe9/wzHnL8O/FRaSnSGbWtr91+S GhLnmDDlM+IvLKmpr220xpRTv2pGSgtz6+u2UseJlvTLuh9QNU8pnBPk5TwWtPVfJim1 bw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dk1ncs7qt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jan 2022 05:21:20 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 20E552nV008520; Fri, 14 Jan 2022 05:21:20 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dk1ncs7q5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jan 2022 05:21:20 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20E5Jekp016537; Fri, 14 Jan 2022 05:20:18 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma04wdc.us.ibm.com with ESMTP id 3df28caq0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jan 2022 05:20:17 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20E5KG988979420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jan 2022 05:20:16 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A723DB2068; Fri, 14 Jan 2022 05:20:16 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 208AFB2066; Fri, 14 Jan 2022 05:20:08 +0000 (GMT) Received: from skywalker.linux.ibm.com (unknown [9.43.70.147]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 14 Jan 2022 05:20:07 +0000 (GMT) X-Mailer: emacs 28.0.91 (via feedmail 11-beta-1 I) From: "Aneesh Kumar K.V" To: Yu Zhao Cc: Andrew Morton , Linus Torvalds , Andi Kleen , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Johannes Weiner , Jonathan Corbet , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Rik van Riel , Vlastimil Babka , Will Deacon , Ying Huang , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, page-reclaim@google.com, x86@kernel.org, Konstantin Kharlamov Subject: Re: [PATCH v6 8/9] mm: multigenerational lru: user interface In-Reply-To: References: <20220104202227.2903605-1-yuzhao@google.com> <20220104202227.2903605-9-yuzhao@google.com> <87a6g0nczg.fsf@linux.ibm.com> Date: Fri, 14 Jan 2022 10:50:05 +0530 Message-ID: <877db2opve.fsf@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: w0zLCMx7I8ACP2bcHnPMWQfTMXA4eiBN X-Proofpoint-GUID: diAQzLOWBg25n-lH32_6yQSkFrBmtws_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-14_01,2022-01-13_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 bulkscore=0 mlxlogscore=986 priorityscore=1501 spamscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201140034 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220113_212134_140829_91C0F8A5 X-CRM114-Status: GOOD ( 17.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Yu Zhao writes: > On Thu, Jan 13, 2022 at 04:01:31PM +0530, Aneesh Kumar K.V wrote: >> Yu Zhao writes: >> >> > Add /sys/kernel/mm/lru_gen/enabled as a runtime kill switch. >> >> >> Got the below lockdep warning while using the above kill/enable switch >> >> >> [ 84.252952] ====================================================== >> [ 84.253012] WARNING: possible circular locking dependency detected >> [ 84.253074] 5.16.0-rc8-16204-g1cdcf1120b31 #511 Not tainted >> [ 84.253135] ------------------------------------------------------ >> [ 84.253194] bash/2862 is trying to acquire lock: >> [ 84.253243] c0000000021ff740 (cgroup_mutex){+.+.}-{3:3}, at: store_enable+0x80/0x1510 >> [ 84.253340] >> but task is already holding lock: >> [ 84.253410] c000000002221348 (mem_hotplug_lock){++++}-{0:0}, at: mem_hotplug_begin+0x30/0x50 >> [ 84.253503] >> which lock already depends on the new lock. >> >> [ 84.255933] Chain exists of: >> cgroup_mutex --> cpu_hotplug_lock --> mem_hotplug_lock > > Thanks. Will reverse the order between mem_hotplug_lock and > cgroup_mutex in the next spin. It also needs the unlocked variant of static_key_enable/disable. [ 71.204397][ T2819] bash/2819 is trying to acquire lock: [ 71.204446][ T2819] c0000000020e5cd0 (cpu_hotplug_lock){++++}-{0:0}, at: static_key_disable+0x24/0x50 [ 71.204542][ T2819] [ 71.204542][ T2819] but task is already holding lock: [ 71.204613][ T2819] c0000000020e5cd0 (cpu_hotplug_lock){++++}-{0:0}, at: mem_hotplug_begin+0x20/0x50 [ 71.204710][ T2819] [ 71.204710][ T2819] other info that might help us debug this: [ 71.204787][ T2819] Possible unsafe locking scenario: [ 71.204787][ T2819] [ 71.204860][ T2819] CPU0 [ 71.204901][ T2819] ---- [ 71.204941][ T2819] lock(cpu_hotplug_lock); [ 71.204998][ T2819] lock(cpu_hotplug_lock); [ 71.205053][ T2819] [ 71.205053][ T2819] *** DEADLOCK *** -aneesh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel