Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp896822rdb; Fri, 26 Jan 2024 14:34:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFrAwW6oqu0xzQw0hVH7WmVGrivuRrsRKn23tt6FQY7PYB2fzVC1mpqB1FS9SbH3vOzmcaH X-Received: by 2002:a05:6358:907:b0:174:f2c7:4448 with SMTP id r7-20020a056358090700b00174f2c74448mr382008rwi.42.1706308452933; Fri, 26 Jan 2024 14:34:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706308452; cv=pass; d=google.com; s=arc-20160816; b=Tt8ZxhW7H0R/ybF8OSRN5tRSlK93ZkH8ygufDWFUq1POPwIXv70t5+G+qAhNzdVpGV 8BWHyBY7Uii8llMeiq7rZoQZEoJaVu8f0uL/6C/3s0Mz6XH0zaHRTZs7560pduh9UGzx c/PMXePZNdId4UUybt0o5KTL5C82R9ZS+3OvNBV2GGAPMNgeIg/6dFJ/EtkUzQ46IVEO NXuCXnhWO15UcCmbY6qW+0Ej1CqzhYY87dJCmRnOVEaK6T8nG4DRCXrAPV6GimXGqi7L 9vUfdzfhNJ0Qrn/6ZgFxt/cV1LGTze+oszE7Sf2i0c6CWpo4P05YeME3EaBAJ4GQJpJA F3QQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=bsC6ldb06AJMfiIpCUpPZRXENhb0M6TRf0RwF7flu9o=; fh=5ct1PFs/TG449BEo+ZVM+UQpyLc4KdwBW2mdxasYwt4=; b=dGuK53Crcmzv61pWZGNvkFlNqCHF6U1GyQNITlO396JP9b+k+90Kp0CMHatJzaL6YP 6vDDhU7zWS1fmOgrAtXYKea0ttKRrcEOnwS9r4Y089QkIKE3VkvhAD7IWL2kbc8WZmKm iX0HBC7IEQQBWKu/ODgtM6V33iJK44+5J/jMoP9Es1NrB1QVgz9WquhKk3rqwJ95TiRG k53zu6vrUyfP1DYF58UkfR6Uv25ldM2fXa5VXcKpUF6FQS5oACwo7rbcvkL9a7SLZZQu 7Z/6FTtBxk8D5MSXuhlNzIOSEEPcrVRU3lnaWYwr2Jvgku6aL+NnFWE9crxC7BeTvlea 7aHg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Iel542Jf; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-40630-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40630-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l184-20020a6391c1000000b005d60004bbabsi1730250pge.664.2024.01.26.14.34.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 14:34:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40630-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=casper.20170209 header.b=Iel542Jf; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-40630-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40630-linux.lists.archive=gmail.com@vger.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 0B47DB23B7B for ; Fri, 26 Jan 2024 20:32:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5876E2420B; Fri, 26 Jan 2024 20:32:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Iel542Jf" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 7FCE5241E0; Fri, 26 Jan 2024 20:32:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706301154; cv=none; b=BUWxq2bS/pNZNwKnS6iepysPBcsYffp2lT6bkUjg2y0E+zrM8djwmtPTbjIZPW41Bg0OtQY7xCtAIvdiaNHOy9IZTYGQB1ATAXaxhAhieIpwDcxx1SIhri25FP/UXbl4e/eeNMnbN5W27lT7IYJ19bSoi7AoxdVfTeynehK9uqY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706301154; c=relaxed/simple; bh=wANifjjWbLBVVOsC8JHualEA+NV/bbYwL17PG/8F3KA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QM/HPR4GJkIw/BtIzn7UMyB444NKCtTWbAQiV3CPHLBQ4Y/2FN7wPYKmfsJODlngjC48mBMhPB6JOn8jduZiqrlS8Wurwjyy+BsteuydPQN6F6dJswjvb5qATX6OqYqgyUqb9ty2ZPfU6b3IgOu1Ats8uP4yBh2Ue/xvtSm2ZqE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Iel542Jf; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.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=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=bsC6ldb06AJMfiIpCUpPZRXENhb0M6TRf0RwF7flu9o=; b=Iel542JfGo31xCXqKw1qko80Pp 3gVntou9F6oP1w9OxCWex9PXg/j2IQmM7G/oIhV9iy3U6dOCvZNKxn/yj2StLF3PFAtFXxTIsfU+9 jKc8+2CtDtjq4S2VVH/VMx561ASDzLXuUR3qsH/3w1HPng8iWgLy9dQeGYBTvMTXCckD2v9wTzeRh nzhV5+02SNQWWOSCK5owo38cvpCnQbyxypcpDLq+Rm/w1cs7j1+ZtT1CuYrI8c+S17ZcxfakkHd1k iWHO9+5JUr50jz7Wp8i+WAAYxI7+KnMESIprOdmOQGW9uZHNqjPKy6iB7iQJZ71kr9eR8SeUTfsNN OMuh4eaA==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTSsG-0000000EmYd-1CgM; Fri, 26 Jan 2024 20:32:28 +0000 Date: Fri, 26 Jan 2024 20:32:28 +0000 From: Matthew Wilcox To: Luis Chamberlain 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: 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?