Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5378352rwi; Mon, 17 Oct 2022 20:44:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM720xaRMk8TIuYBNrk5nj7oLkCBAKqOFtIAYE5uSRu0F4IWAfLw9Ojv9GJ5L+i5mpfYGvfb X-Received: by 2002:a17:907:802:b0:781:8017:b2df with SMTP id wv2-20020a170907080200b007818017b2dfmr719679ejb.606.1666064649481; Mon, 17 Oct 2022 20:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666064649; cv=none; d=google.com; s=arc-20160816; b=Eox6IHBxTPs57jKTQbFDMumB+MFKQM9liK8/jDxfuhu316FvcMq0EAMyBSPl2M1tFI Su5GHtlYYutGfReEfenWicTWF2eTMiqfgm4MG6ppTpZIOasxN9MOvp2+nk9bRM/HoImJ zcPwahVi4q5KhaGZ1ZR9iu4VeEmjXyU+NSkFKCo1TWnBuoG6ChCdmvoaH7r/ONKRh0Cx gi+SQj71aCEDOs4dprK+FapofKOXj7cjJH07QGANQNwKMSo6pCeBwsquDNxBFCFPesrN a/klqnqGyi6+ItoL9wx2jkWH7Kx6iLhEcAiX3OeiJ5M85MNQ4vlAbW3OjCr3FUA/gjD+ Qaig== 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=YzwUUY+E76c13KAWk70zUViOOJ9NwBhs+8H0DwCsKbA=; b=t8Fbt2EnlqUk7RS8pBD8T/sBOks+JlWQw4gt/+xKxVu0kOWWJKmVbQHkiL0pmgcApw /vFUjpS0j89v+oRWT83XYSo0pT8dTd04YTezzxXlY9elW2Gb0fKlJ4NXOafVa3XAcuSZ rMJsXndnn+5bMiZktxzhOUDTVgKVMwwzRoYfyPYB24InvUOARDJEZXh3dvW1UE/Gdc5i bdPOTQVc6b8AskX3Li2v8YWvEm0lz/9VtqH6ZPmPMuzc4vY18veP1GW+OsFmuqfkFOdn U5/BjQGrupdDOP3S4L3J2+9sKT/C6LEWP/eo0r2X+3NfA7Kf4s/8GcxOA9WSRrsQ0mxd bXMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=BBc5nxP0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id md8-20020a170906ae8800b007828388864dsi8498084ejb.692.2022.10.17.20.43.44; Mon, 17 Oct 2022 20:44:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=BBc5nxP0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229802AbiJRDl1 (ORCPT + 99 others); Mon, 17 Oct 2022 23:41:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231393AbiJRDku (ORCPT ); Mon, 17 Oct 2022 23:40:50 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93CF54456C; Mon, 17 Oct 2022 20:35:16 -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=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: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?