Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4692099rwi; Mon, 17 Oct 2022 09:24:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6HilmToe4KorRdRDnUjtHWd+8vMs4V1f0ZylMKr6u9dTWC/k0qjKujSB/2pydoGlFF0qXf X-Received: by 2002:a63:c06:0:b0:439:9b18:8574 with SMTP id b6-20020a630c06000000b004399b188574mr11417984pgl.608.1666023840437; Mon, 17 Oct 2022 09:24:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666023840; cv=none; d=google.com; s=arc-20160816; b=co3sUiO6J4Btp9FcWJKCl1CrBOAaF9+WE//lBmvlrfD0JsyRHOzLvzBPMRm3iVE1nK OWyKcEL1Ff4nd9ABK+x3QC1BhdJxFU7UKZqnOMWkr7KYplajbR5gy4UCNmBOqxzaWM7X ZgWIBSi2W1E4g+FkIiJmjeIUKr0io1XHxwR8il3jkz8/btDvZI3gPJjenmTpdBFfpS4o uvHBUKCbH51ndLrUpmnm8vbfVoc9WwykuFNTHr24FV6xJ9aIV8bcmFDGW9c8AXMevn0z 95ILwwmTGZoPqBEncoL9bSiNs+UkrliYpbhvYR8la0BbZiVTgmUgpR6I5OIYyodiL2ft sa9g== 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=2vk4i5KDs+xhL9RL/prStipv82/5xCos0ckR6/mPo+o=; b=ANwLcsIeqCv/CiOiks+XbMZt3ITpwuYYVBDOfmI5+MUtr7YiMUs8YVta146Lr+NA1W MJGXS+bhS7SGLKL6HQEnd20Hb7s2bOROqRrwgGCoZWS9rprrjjPmpy/pjQ8Eey+PVQ0D c61gQsTxgURCDMdTB2FV0AwuvDBmOt68bYqKLeUt8NC4HOcKeDb3F7JTjqC3JKHIqMdc 8cUSCK5gYBqqJCiBN5hkCBN2iZfrDmxpQZozN5w+7jQEbQBcPYqd0i0EF70pmzh+7xSW ncZLFmko4jAP8aVLBDL1DMuUmfFU6wEBPPacFqad9PzhNv7HL/Rof3e0X7jSqkb8o0S8 hHuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=mkPEvM7r; 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 u1-20020a170902e5c100b00176bccea71esi14701019plf.57.2022.10.17.09.23.48; Mon, 17 Oct 2022 09:24:00 -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=mkPEvM7r; 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 S230388AbiJQP4D (ORCPT + 99 others); Mon, 17 Oct 2022 11:56:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiJQP4B (ORCPT ); Mon, 17 Oct 2022 11:56:01 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55B7C5F127; Mon, 17 Oct 2022 08:55:59 -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=2vk4i5KDs+xhL9RL/prStipv82/5xCos0ckR6/mPo+o=; b=mkPEvM7rzQdNNDo31xw8Y6OxZk lpFKq0VgEJENhd+31JfDc8e2WKl8zTZ/9oWiNn9kEBgwXN4uifVfUKHdE77ELhL7ySFemwUJFADPM LKtYoPfakztqEu3KcdbxEN12BF3OGuWeLGD8qOIRO0dmaf0+OekQEAj66+RVavqFk7b8tsxMd9f8G FiCTjhnyGj/yBnNbvfpNl9V0cUFG4JOxti4ZRVI8se9YEWwnKjAiMTWDwZXmbCQEIZTXdniBwOOH8 gP7jDTHXq9XqJN4y1sQzb+h/zBnTeX76gFxdTVVNRun1hyX4xliuo6GZd0qs49k0GXhR4zl5th4Lz 4FoseLjw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1okSSz-009xFa-M3; Mon, 17 Oct 2022 15:55:49 +0000 Date: Mon, 17 Oct 2022 16:55:49 +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 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. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > OK, could I move the xas like below? > > + if (!folio_try_get_rcu(folio)) { > + xas_next_offset(xas); > goto reset; > + }