Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp2015330rdb; Wed, 31 Jan 2024 17:05:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYechZRIQcR3HJ0pS4xuWS7KFh0mAfyWqpc00Id7Z/a29caa94hA9KQZGLC/ad6h3VCghi X-Received: by 2002:a92:b741:0:b0:363:8f08:5831 with SMTP id c1-20020a92b741000000b003638f085831mr3889041ilm.19.1706749557619; Wed, 31 Jan 2024 17:05:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706749557; cv=pass; d=google.com; s=arc-20160816; b=uClogZXeeKL65rV4/F4hXRWLFjNXxST4YJK0r9Az5pChXAyY7FbJ/SRzTfMrY643vm diATq8BR99rmcTIPYn9eMQ3qVtK65U/PDhjYdxyU2NsvMfnmAVVXMx5oymgLY+a9VTyK gNMBrxUuZEDowAP9Auxw3PR0XIvqmc5bC8hujmX7BGGNV17udwzPOXhcHNNweOPHA0/m C8oZBgebz6paPJ+sk5uXLp2eYTJd3d0gk6yF7KNeK6cJwC9NJR6B/aSseR4sTc9ko38m q8pha85BSggtjU3Fe/pAPLV8rrnxo3fAZJQImxzu4hzMh2ng6Q2EjmP/o+27QCE0dbf1 h+jA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=iQfXW37ZK31yG37Afle32aWwrDr+gCC0dupCwANd1vs=; fh=9VERe1YttBNJpVjGLI8bK6fRUfkIt+sdgApfFr9b6bM=; b=lc5YVSsFiWDujJBx7zCYanvL5LUGgrD78iexyK2ZLeRuwdlilIQJMA0IRYcm5yRwk3 /Etr1yQcD+TGP4aWaIRsbTeeDLZXYIQ5Ehojqvk2gQo1MBQoj5eQTlBKiqmeDEFgTVKP Wm85yBsOoiV/PyvVEkXBc+i8xSlMGhSr/3Mor2diMYpz9bxqG3L9htzl+nhJQsbzvX5K 25jb80WH2RsckiLsS6dP4N4f2av3Fmg7McLCn23SNAop/f8nyVqDBK5qJ/uyNc/LUNBS rUpc6NmqUR8PMFwYKWixEZs3F3GoHRrwxOF6zHmIDxwlbOqxHYdXh20R/Wpcr9Tt5TaJ GJJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=h5bIouCx; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-47216-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47216-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCX1pELufhQyGuPjgMSm3A7w3ndwjntxyNsb06DkfqLxDl7DhnY3/IKtVfdmQZaAW+Ph+5/Gr9d+315Lblph52R6VoXcS0I8TLmiyia2Ag== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id x184-20020a6386c1000000b005d8e320fea4si4516658pgd.336.2024.01.31.17.05.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 17:05:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47216-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=h5bIouCx; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-47216-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47216-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 24455B29368 for ; Wed, 31 Jan 2024 21:58:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9281639AF1; Wed, 31 Jan 2024 21:58:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="h5bIouCx" 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.subspace.kernel.org (Postfix) with ESMTPS id 58154848A; Wed, 31 Jan 2024 21:58:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706738308; cv=none; b=RREqfd1GgoszwjXYTObXfV3FyxQUi2w0oTvivnFvFKVArHCZcB4cE5TneuZYni5hTyF18lBHElydafH4+3WCdFB4/vQdwnJN+TFYNwVYxy/+rKxNjU3sXdfoYBI3QxIg0+F8zChwZcp6SKMsai7kSRnDTEIM41BkQq2GbKe5LPY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706738308; c=relaxed/simple; bh=OCJeKfhQ9glNLXX2ntf9uF6fRDRZS3kJloQ6WG9qz+0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Oss+OhbgcqQ1dcGfO9SCkNHAVb2Ex4DaXWA+5i4qzURSoURH9NufE/mfrO5cgfql+iid3GVVBp0lsazN6OPzDRZEpFOXqGx1MPnxSIH0bBlF2qiX0ebp8QzhrWE+UEfwU6REAzsLK0bMN/yX+f3yA8nu2+1+g6OXW5uWS5beEiQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=h5bIouCx; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=iQfXW37ZK31yG37Afle32aWwrDr+gCC0dupCwANd1vs=; b=h5bIouCxLjtlG+frdiQOFKm2uX U/2ZniW40PsD232UWulNNlEaoHXQ8vL020jg5yOCCTTa2+x+4cp4iN0RKjKmw/OFYhACLIHTwfHrr +OCXquWfqnT2hOYEFwKT6LLOUBLWA2LhvBYQNZ6mEUsnh/xuiGHLX8KHfraUJLSPSPCZ74ckbjL4L P5vpWzCdDLZG1+r+ZaXFv+NzQs/EblX49p6GNr5b3Ps9H8UMa0RrlxLERCzxFBPLMYC6RjWIx12M3 DUQzLrOfxDW43HkIUxSepWMBLAeXVqd6+SjoBG1E1Agz2p7Wd/eMuy2VQiUevb74HBKrZx5tEEB4E CXo+TkOA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVIbC-00000005dEB-100a; Wed, 31 Jan 2024 21:58:26 +0000 Date: Wed, 31 Jan 2024 13:58:26 -0800 From: Luis Chamberlain To: Matthew Wilcox Cc: kernel test robot , Daniel Gomez , oe-lkp@lists.linux.dev, lkp@intel.com, linux-kernel@vger.kernel.org, "gost.dev@samsung.com" , Pankaj Raghav Subject: Re: [PATCH 1/2] test_xarray: add tests for advanced multi-index use Message-ID: References: <20231104005747.1389762-2-da.gomez@samsung.com> <202311152254.610174ff-oliver.sang@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain On Fri, Jan 26, 2024 at 08:32:28PM +0000, Matthew Wilcox wrote: > On Fri, Jan 26, 2024 at 12:04:44PM -0800, Luis Chamberlain wrote: > > > We have a perfectly good system for "relaxing": > > > > > > xas_for_each_marked(&xas, page, end, PAGECACHE_TAG_DIRTY) { > > > xas_set_mark(&xas, PAGECACHE_TAG_TOWRITE); > > > if (++tagged % XA_CHECK_SCHED) > > > continue; > > > > > > xas_pause(&xas); > > > xas_unlock_irq(&xas); > > > cond_resched(); > > > xas_lock_irq(&xas); > > > } > > > > And yet we can get a soft lockup with order 20 (1,048,576 entries), > > granted busy looping over 1 million entries is insane, but it seems it > > the existing code may not be enough to avoid the soft lockup. Also > > cond_resched() may be eventually removed [0]. > > what? you're in charge of when you sleep. you can do this: > > unsigned i = 0; > rcu_read_lock(); > xas_for_each(...) { > ... > if (iter++ % XA_CHECK_SCHED) > continue; > xas_pause(); > rcu_read_unlock(); > rcu_read_lock(); > } > rcu_read_unlock(); > > and that will get rid of the rcu warnings. right? The RCU warning was due to my getting an try call missing an RCU lock, I fixed that. The pending issue was a soft lockup that I get on low end systems testing test_xarray with higher order but after testing on a 2 vcpus with only 2 GiB of RAM I cannot reproduce so we can address this later. I forget the exact type of low end system I tested this on... but anyway I can't reproduce now. I suspect it may have been similar to the issue 0-day had found long ago and you noted an overloaded system [0] [0] https://lore.kernel.org/all/20190306120843.GI13380@bombadil.infradead.org/ Luis