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 9EF60C433FE for ; Fri, 14 Jan 2022 06:51:48 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AJS5L48ERhYOZQTsDrS4S9sm0HoWB6fJ3HVobc6AHfM=; b=Jfq7GrgYqt3SQx Q7EJeuIq7WOU1dGouE3n0oU64UJGsjXkr18fL61rPlhsRza/aFTxwh8NAII5XMh/L3gr8qqbsjvFn JHKAWr/CRsBqtI6vVALakQ7bpERzf/efJoJZ/X8iGYOnMMy0W07uraQ0ll/B3aPZfYxZJyNDdxrwO JIPbN44TrxkzuYkdFMpVIbasHE9pCiAdQnn8eG0zVGHMcxBPgQbGqfO/YNAqAFZcE5kFHkrZRDDUE I/sSrANT/jzDqEUDg3QhQbUxNFQ3AxaWfqlYB4RZ2FmVe/gy1Yn2Fs70dQ2x1zOqf8f+yvRZOxIHj Tor59n7gbaREA1TB2vTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8GPt-007y4y-6G; Fri, 14 Jan 2022 06:50:29 +0000 Received: from mail-io1-xd29.google.com ([2607:f8b0:4864:20::d29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8GPp-007y2n-SG for linux-arm-kernel@lists.infradead.org; Fri, 14 Jan 2022 06:50:27 +0000 Received: by mail-io1-xd29.google.com with SMTP id o9so958366iob.3 for ; Thu, 13 Jan 2022 22:50:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/uAIslgp7ONq6Ddd5/X8dnsCVfeQok8EwfpuDdopIBA=; b=aelyoHTVyggA4VE8b2pomJTP4FTQJnMiNt3Yk6nHA5ZrfLep8xNJhn8NA4XTaiKpcd wjp1S1gFpg6TbmlWxDYoZV6LJ1KosYKL0I+yt2KHduWnx+2H/nOy6iQT6vYv3K6XEb9e +xPSOQE1hXMkQ0IV2yWwo1ebyvo2dS0Rik6/W++J4z9Q9pLS7i2vn6jXXy6YFDuc9D3E UOPZ6SySmvkuI3NeAjFS3vJ6jecQZMuaRCRL+EGWla/bQDyEDaXPeHS5R2Ba4MYT5QBy oJYMSj4gGV/3QWO9gZZYJKEVIXBeuC9GR+ardniSfG5ehuAMGPhNlaSU5RrZxgIWKlAA c9FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/uAIslgp7ONq6Ddd5/X8dnsCVfeQok8EwfpuDdopIBA=; b=v82Ta3ixGOATWmKSKfCc3UgVIavusu/3Mk3ZsAYZO/+VTFUv59PxqLhPBa+NU731Wg laWfNAeUEs+9ya25cyPJQB//3IqWNzDud8azj5qhBKUPEFdBKXLkVPWtZJGbsiKVq2hY /nv79VKkOVtBVNI/NAIyZnlAz+2drvUHYgBHb+xRFxPckdeUbHULoVdg/Jtzc8KWH5L0 1cXkAo8rb+4BYA4eR221cV0dIjH1HShCmynER+wFp6V9fH24dWj1ncyIq164A8X5E1dM /nKsV8wN+BQ6eAhTE0BT2ydcZvyWsb4a4eoxO2vsGgzVkf1EH7h9IrtrE3Qzk2Y4mwOs OGAA== X-Gm-Message-State: AOAM530qp1d7FdUwywJ2O2esIC6iImDKsAsi5cbS/TqYRCiMRzr9cTsv 6RY2gWgEfudBHSHTFeTT/Jra7w== X-Google-Smtp-Source: ABdhPJyOWiBBNEtN/fpYQONgoCQeeIW6abrdFufzxfrdvPmlu6061PGP7cx2UON7MtXNbTIgq9KkJg== X-Received: by 2002:a05:6602:2b0b:: with SMTP id p11mr3595653iov.116.1642143020636; Thu, 13 Jan 2022 22:50:20 -0800 (PST) Received: from google.com ([2620:15c:183:200:2ee3:2c3c:a8c8:b1bf]) by smtp.gmail.com with ESMTPSA id o5sm4261525iow.8.2022.01.13.22.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jan 2022 22:50:20 -0800 (PST) Date: Thu, 13 Jan 2022 23:50:15 -0700 From: Yu Zhao To: "Aneesh Kumar K.V" 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 Message-ID: References: <20220104202227.2903605-1-yuzhao@google.com> <20220104202227.2903605-9-yuzhao@google.com> <87a6g0nczg.fsf@linux.ibm.com> <877db2opve.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <877db2opve.fsf@linux.ibm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220113_225025_929872_A81510B6 X-CRM114-Status: GOOD ( 15.08 ) 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 On Fri, Jan 14, 2022 at 10:50:05AM +0530, Aneesh Kumar K.V wrote: > 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. Right. This is what I have at the moment. Tested with QEMU memory hotplug. Can you please give it try too? Thanks. cgroup_lock() cpus_read_lock() get_online_mems() if (enable) static_branch_enable_cpuslocked() else static_branch_disable_cpuslocked() put_online_mems() cpus_read_unlock() cgroup_unlock() _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel