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 X-Spam-Level: X-Spam-Status: No, score=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D172CC433B4 for ; Mon, 17 May 2021 16:53:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 56E3561355 for ; Mon, 17 May 2021 16:53:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56E3561355 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CDF6E6B0074; Mon, 17 May 2021 12:53:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C8EBD6B0075; Mon, 17 May 2021 12:53:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B31238E0001; Mon, 17 May 2021 12:53:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0028.hostedemail.com [216.40.44.28]) by kanga.kvack.org (Postfix) with ESMTP id 7EB956B0074 for ; Mon, 17 May 2021 12:53:12 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 173701802EAA9 for ; Mon, 17 May 2021 16:53:12 +0000 (UTC) X-FDA: 78151318224.25.2CAA995 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf15.hostedemail.com (Postfix) with ESMTP id 3FD1FA00038E for ; Mon, 17 May 2021 16:53:10 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id C8140610FA; Mon, 17 May 2021 16:53:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621270390; bh=bG5DT/my1+yyVNihoMK+WVEdLRUDZAdZsJtNvLsH5Is=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=qtr76KqShwT9PctpzbL3o5KWbG8Q3fUoomI5wi8SZDFg08uywwS6mwbzsSMxJ94U1 IUVyzswIvhN59ty5ofe4qFLNko49K7LItW36a5beVqNhVmXKp4KjTx+HWd4+dNqKkm Oj1Z6Fmw2XdTMe1lWNk8vJZ4A6BBQfmAXM/VrXA8QI2DX9uskHhQnTP+rgN05/oyN/ CPI6vPUxVEIRRkHtfFD1l812tbqN0fUDdki0jzQE/UjzXHfeDcat28Zev+ElI9p+al 1SS6gbXkVpKmQ55V53PYcMVnyPt14k5oIc+oX8HXBgTUgIAohyZoCi9FSUDGLLkv1g FjsFP+Kpcv/cw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 963C55C00C6; Mon, 17 May 2021 09:53:10 -0700 (PDT) Date: Mon, 17 May 2021 09:53:10 -0700 From: "Paul E. McKenney" To: Liam Howlett Cc: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: RCU tests for Maple Tree Message-ID: <20210517165310.GA2013824@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20210517154048.GA2013926@paulmck-ThinkPad-P17-Gen-1> <20210517163048.7zcg2435lsvg25ef@revolver> <20210517165004.GI4441@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210517165004.GI4441@paulmck-ThinkPad-P17-Gen-1> Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=qtr76KqS; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of "SRS0=BtMV=KM=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=BtMV=KM=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" X-Stat-Signature: emir4j1xj54bfss1cewuj5nbc8tty3ym X-Rspamd-Queue-Id: 3FD1FA00038E X-Rspamd-Server: rspam02 X-HE-Tag: 1621270390-405326 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 Mon, May 17, 2021 at 09:50:04AM -0700, Paul E. McKenney wrote: > On Mon, May 17, 2021 at 04:30:53PM +0000, Liam Howlett wrote: > > * Paul E. McKenney [210517 11:40]: > > > Hello, Liam! > > > > > > Apologies for my being so slow here, but just wanted to double-check my > > > understanding of this code. > > > > > > There appear to be two tests that execute from run_check_rcu(): > > > > > > o rcu_loop(). This appears to have RCU readers scanning the tree > > > while an updater is adding a single range. (Or replacing it, > > > as the case might be.) > > > > > > o rcu_val(). This appears to have RCU readers repeatedly reading a > > > given value while an updater is adding/replacing a single range. > > > The test complains if no one sees the new value. > > > > > > These tests appear to be the only use of threads, though perhaps the > > > test harness has some way of creating threads that I missed. > > > > > > Are there other tests that I should be looking for? > > > > No, those are the only ones I'm running with threads right now. I think > > all RCU tests are run from check_rcu() iirc. This did yield results of > > failures that had to be addressed so I'm somewhat confident that it's > > actually working. > > OK, I guess I can feel relieved that I can still read code. ;-) Oh, and I should hasten to add that for a data structure fully protected by a reader-writer lock, sequential tests can be reasonably effective. At least assuming readers really truly only read... Thanx, Paul > > >From your wording I'm gathering I need to increase this by a lot more > > test cases? > > I would feel better with the addition of something that looked more > like a stress test. For but one example, is there some combination > of several successive update operations that can mess up slow readers > (that is, readers that are interrupted or preempted, and thus have > multiple updates happen while they are traversing the tree)? If so, > the current tests will not find it. > > Thanx, Paul