Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4486397pxb; Thu, 14 Oct 2021 06:13:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyC4F0gSHiThsjZ5+X421FMteGeO/vQgK3rDE9BMcLG9LV68zzPSRsmfQWWmalqzt9gQK8k X-Received: by 2002:a63:2b03:: with SMTP id r3mr4273757pgr.188.1634217218791; Thu, 14 Oct 2021 06:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634217218; cv=none; d=google.com; s=arc-20160816; b=FX6znM0iErsN4R8QzDl7PFob8DWiFT5KTGmGHbcPWa+l9HXsgXHN/q/SF2ba8YivSY +11i/UHO5JAry6oH7kN+FD1Nekt8VZP9tLwz67/B4TD1xY7xHOnEIhdIUxfKpSFgP/5i C6NvemM59iGQ3MgYdRj6kJAdGySmCD97TMVWVCGXSizNDeRbgE9TNcjqLOKSgNaGf9mK BFaH/avdyufKvjtBzjmfM40P+V6jEhoJC1U7eAHHypwhQOp7EKQa+vmNDCuK5NCHPRjx lPlM0WbTk+TOJZBzdKWnBhTbSUCFCeKJ6Eb4G+zk9RBjwlustgJLfNZ1I6nbT19tSsSF 3r/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hH5UMRaxYgGEu1UnuovaeWTRlAQ8d4MJU3Qaco30nXM=; b=hBcZSnS3Iig4oIrppt9dJLKbJov/uS6A6TlJbCTqzP4AtZ20o1n57EIIlyDUtSP6+g UGeywRx9RkJbwYCd78CwmFnv+Rm1CJ7g7ZalBSKNvo2p44pAJhqVbw0JBm2XCn3ufbbx WI6ZEiLA2MKU2oIMEhdV8clU7Tl1qV4+/O3yl4b7JmC8FDknXIpUBbG7bmS9WAb6jKfz /CQ+eNMw3RIN6Upa9GidULVAVSBxAPha4oK+5ERgCunlRUOirYOeIKY7UTXS7BpUG1BG wZbv7vLXDwwOyFLww4LZDVWmX0fTb3LgwYtrtZkdAakVjjBPWA1awyw8b7qBj7vfqUia pr3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=STj+i2I0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si3605256pgi.36.2021.10.14.06.13.24; Thu, 14 Oct 2021 06:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=STj+i2I0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231444AbhJNMKH (ORCPT + 99 others); Thu, 14 Oct 2021 08:10:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230026AbhJNMKH (ORCPT ); Thu, 14 Oct 2021 08:10:07 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90785C061570 for ; Thu, 14 Oct 2021 05:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=hH5UMRaxYgGEu1UnuovaeWTRlAQ8d4MJU3Qaco30nXM=; b=STj+i2I0I9isIXfM1cHJyzkxjS 1WGpZX411ETrIv8coMsdeRJOdqFKgfL7uWXTdSiXULdQf3apLFdGGLwy5KdUJSoUHR51sFH6+2ykj rXsF8CmBC7qZ0vhMr3gdBgQJK+irQEqinfbKRMIWv/Ytde4c8k/MYiJO+J9Ar/m9mTidvMxHUG5on 1CbJz+vbeaWXWE8FBeCeYcTokrOfXokX8bpW3wzXwZ+UT0TJ9KzFdLvHlMYgm6KeaZO0wY8wQqdMR xmF73fgKlprTDqWoKInPPZTRQFF1v/YryTqHrXzt5Oy00Vt7tsmGVz/KqUPjLOqc55V4TvLg05bG6 ZTvxxtUA==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mazUp-008JXb-NB; Thu, 14 Oct 2021 12:06:35 +0000 Date: Thu, 14 Oct 2021 13:06:03 +0100 From: Christoph Hellwig To: Zqiang Cc: akpm@linux-foundation.org, sunhao.th@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm: backing-dev: use kfree_rcu() instead of synchronize_rcu_expedited() Message-ID: References: <20211014082433.30733-1-qiang.zhang1211@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211014082433.30733-1-qiang.zhang1211@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 14, 2021 at 04:24:33PM +0800, Zqiang wrote: > > __init_work+0x2d/0x50 > synchronize_rcu_expedited+0x3af/0x650 > bdi_remove_from_list [inline] > bdi_unregister+0x17f/0x5c0 > release_bdi+0xa1/0xc0 > kref_put [inline] > bdi_put+0x72/0xa0 > bdev_free_inode+0x11e/0x220 > i_callback+0x3f/0x70 > rcu_do_batch [inline] > rcu_core+0x76d/0x16c0 > __do_softirq+0x1d7/0x93b > invoke_softirq [inline] > __irq_exit_rcu [inline] > irq_exit_rcu+0xf2/0x130 > sysvec_apic_timer_interrupt+0x93/0xc0 > > The bdi_remove_from_list() is called in RCU softirq, however the > synchronize_rcu_expedited() will produce sleep action, use kfree_rcu() > instead of it. What workload is this running? If we hit the RCU unregister path from inode freeing we have a lifetime problem somewhere that we need to fix first.