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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDB06C4332F for ; Tue, 18 Oct 2022 03:09:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 582CA6B0072; Mon, 17 Oct 2022 23:09:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 531F96B0075; Mon, 17 Oct 2022 23:09:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3AB236B0078; Mon, 17 Oct 2022 23:09:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 27ECD6B0072 for ; Mon, 17 Oct 2022 23:09:26 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E055A1A0273 for ; Tue, 18 Oct 2022 03:09:25 +0000 (UTC) X-FDA: 80032589490.27.BD53048 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf02.hostedemail.com (Postfix) with ESMTP id AD1DD80037 for ; Tue, 18 Oct 2022 03:09:24 +0000 (UTC) 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=YzwUUY+E76c13KAWk70zUViOOJ9NwBhs+8H0DwCsKbA=; b=BBc5nxP03Jv0SM7AWIpvgEtJ1X MBxZWFeOoy6NhClx1UkCkXKMVuKMVbOWkc/mHmZkSV+iMbxsXyopwYUFPHNkcl4I+4i1nr6RSzqy+ jWjvRxElP/Iaj0PDd/NOH7A86G1oKM/0ekNtxLv4FoR3ap9PcUrLH4R+rcLeIH6WFYcNMc3PSqS0f qMO7Qy0K9Pm49Tk/nQOOBJAyX+BOR5W9ZGgR33vwKqJNMHHJyf9gNncrivD9tQOnTqM6PY8HapB+h AaiMHYrVLIDGcJgmnB47/MkAMpww2gzdXpQKl2AsbMGC/ySUYUtSIdaZdTPN3N2hhx/3f4lf/52mB jE8+69wQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1okcyj-00AKNx-SV; Tue, 18 Oct 2022 03:09:18 +0000 Date: Tue, 18 Oct 2022 04:09:17 +0100 From: Matthew Wilcox To: Zhaoyang Huang Cc: "zhaoyang.huang" , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, ke.wang@unisoc.com, steve.kang@unisoc.com, baocong.liu@unisoc.com, linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH] mm: move xa forward when run across zombie page Message-ID: References: <1665725448-31439-1-git-send-email-zhaoyang.huang@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666062565; a=rsa-sha256; cv=none; b=VbFtgpGkKA4GAQNu9KkCOfFRQxf9lH7sdc1472lX6jRtOoi6+Tif0WypmDKxqiqBSV6LbU 3QdwbHU80AQQbpJIdboeWzFPx6XoqnKtz+j+IbiQWpstlKykNcXb2s6s+XGWfQpc1PDKsl CI51Fp3jp986Mhl7Q4IY3gfhTe8DYHk= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=BBc5nxP0; dmarc=none; spf=none (imf02.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666062565; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YzwUUY+E76c13KAWk70zUViOOJ9NwBhs+8H0DwCsKbA=; b=NaSI3NW8augw3lF42LX9IAOlKMIHi8aptnccVovzG5YWdQgomodLDf+1lR0AAdh7Wt0V12 +p/0mUr0n1AcYt0iKesjeaJXA4QySiAW39T+nOJ/0I4ldWT5O6e7MpzXa5/QlFnMZq65ZI 0AvqBDQztsLWDMXLpHgMXVvJUpeURDE= X-Rspamd-Server: rspam05 X-Rspam-User: X-Rspamd-Queue-Id: AD1DD80037 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=BBc5nxP0; dmarc=none; spf=none (imf02.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Stat-Signature: 3oh45uqbm9eewc8s7puiornqeme8m8qu X-HE-Tag: 1666062564-54101 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Oct 18, 2022 at 10:52:19AM +0800, Zhaoyang Huang wrote: > On Mon, Oct 17, 2022 at 11:55 PM Matthew Wilcox wrote: > > > > On Mon, Oct 17, 2022 at 01:34:13PM +0800, Zhaoyang Huang wrote: > > > On Fri, Oct 14, 2022 at 8:12 PM Matthew Wilcox wrote: > > > > > > > > On Fri, Oct 14, 2022 at 01:30:48PM +0800, zhaoyang.huang wrote: > > > > > From: Zhaoyang Huang > > > > > > > > > > Bellowing RCU stall is reported where kswapd traps in a live lock when shrink > > > > > superblock's inode list. The direct reason is zombie page keeps staying on the > > > > > xarray's slot and make the check and retry loop permanently. The root cause is unknown yet > > > > > and supposed could be an xa update without synchronize_rcu etc. I would like to > > > > > suggest skip this page to break the live lock as a workaround. > > > > > > > > No, the underlying bug should be fixed. > > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Understand. IMHO, find_get_entry actruely works as an open API dealing > with different kinds of address_spaces page cache, which requires high > robustness to deal with any corner cases. Take the current problem as > example, the inode with fault page(refcount=0) could remain on the > sb's list without live lock problem. But it's a corner case that shouldn't happen! What else is going on at the time? Can you reproduce this problem easily? If so, how?