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=-2.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 60AE5C2BA17 for ; Mon, 6 Apr 2020 16:32:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 196062495D for ; Mon, 6 Apr 2020 16:32:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IPw2IpvE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 196062495D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A85328E0047; Mon, 6 Apr 2020 12:32:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A35408E000D; Mon, 6 Apr 2020 12:32:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 924398E0047; Mon, 6 Apr 2020 12:32:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 772AB8E000D for ; Mon, 6 Apr 2020 12:32:26 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3E669180AD806 for ; Mon, 6 Apr 2020 16:32:26 +0000 (UTC) X-FDA: 76677973092.11.blow48_6c86f2c972963 X-HE-Tag: blow48_6c86f2c972963 X-Filterd-Recvd-Size: 5486 Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Mon, 6 Apr 2020 16:32:25 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id 131so12336146lfh.11 for ; Mon, 06 Apr 2020 09:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=DeMJSh8JzgKPQANQorvFmrAQkO5UTeuBmpSrUn1GgpE=; b=IPw2IpvEzk01AdXSGLkR+7SQ6u9FEex6ZOVFYWbeeposuSgfaNysRamNsBGPkU52bG 5oVfJcBfC7BQrkY6xbzvR7+0XlsVrcyZj3lbZpgwOlfvR3XJYKQoDgBGvCk3dxa1uoUt yScdRZaicRKy2LHrayPdocK63chzCd48QGS6EUzCR+nD4OBx6JsK+vNWOZY8eQ7xvEdA zyeVcLs2C5EOh9O4VZE6mEijzFxk2KrDGQPwEET3nc+fFICcZXbInQ8l0ULBWVXYWoWe q7PfYKgOlYfVTiLOZTm8UMgxiC5OGM6IFpVrN3N+26PIujj91MVjb+8mFAbjxKFSg0QE rpfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=DeMJSh8JzgKPQANQorvFmrAQkO5UTeuBmpSrUn1GgpE=; b=KwSk0JXcVbkLw16Z2c9AQkNrNImdKYe29THFjj+5BDMfd7cQ2hVBG1iE5dWUoMiVsJ THbRgyka7AUT71jfNhjAZ3Rq2Dx+xOkAwn3a8ETHGfZubprlpbOzIYOIFz2dTIKCe5us Mfr9Ia/WjK6EHTnFCA5Rcyrdf66x2xlTQ+pvLeCA3K+IxC7On4KIF9+pwABfgxLDe4ET wBt2GkQaIAmnCg+uvgitgqcW/P0s3uitrNPaQow8jCXF4ZQDM4/p3tlKrRn6+vNwV2k7 PGwjXtY82qJ3NSINkjtzD3Qy7UB8ViFZCQCaFtWF62wEhw41vbdLHLkkHqX3ZTpExzs6 eptA== X-Gm-Message-State: AGi0PuYRkwf/Jv+0m6wd9D0sIDEMzhqbxBbqHC8QhU0Gk4gE+Q2zNEAP NP2huzmQ+70j7yvIorxBpkY= X-Google-Smtp-Source: APiQypKQ43UX6g8dBTlFCqaWswvvraHqaATn1I30zw3t/NRvWSUVHLktSY1hM42o83zQCQmt8ZqOHg== X-Received: by 2002:a05:6512:308e:: with SMTP id z14mr14072207lfd.110.1586190744030; Mon, 06 Apr 2020 09:32:24 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id p21sm10205867ljg.5.2020.04.06.09.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 09:32:23 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 6 Apr 2020 18:32:16 +0200 To: "Paul E. McKenney" Cc: Uladzislau Rezki , Joel Fernandes , LKML , RCU , linux-mm@kvack.org, Andrew Morton , Steven Rostedt , Oleksiy Avramchenko Subject: Re: [PATCH 1/1] rcu/tree: add emergency pool for headless case Message-ID: <20200406163216.GA4268@pc636> References: <20200403173051.4081-1-urezki@gmail.com> <20200404195129.GA83565@google.com> <20200405172105.GA7539@pc636> <20200405233028.GC83565@google.com> <20200406125640.GA23256@pc636> <20200406153110.GE19865@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200406153110.GE19865@paulmck-ThinkPad-P72> User-Agent: Mutt/1.10.1 (2018-07-13) 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, Apr 06, 2020 at 02:56:40PM +0200, Uladzislau Rezki wrote: > > Hello, Joel. > > > > > > > > > > > > Hi Vlad, > > > > > > > > > > One concern I have is this moves the problem a bit further down. My belief is > > > > > we should avoid the likelihood of even needing an rcu_head allocated for the > > > > > headless case, to begin with - than trying to do damage-control when it does > > > > > happen. The only way we would end up needing an rcu_head is if we could not > > > > > allocate an array. > > > > > > > > > Let me share my view on all such caching. I think that now it becomes less as > > > > the issue, because of we have now https://lkml.org/lkml/2020/4/2/383 patch. > > > > I see that it does help a lot. I tried to simulate low memory condition and > > > > apply high memory pressure with that. I did not manage to trigger the > > > > "synchronize rcu" path at all. It is because of using much more permissive > > > > parameters when we request a memory from the SLAB(direct reclaim, etc...). > > > > > > That's a good sign that we don't hit this path in your tests. > > > > > Just one request, of course if you have a time :) Could you please > > double check on your test environment to stress the system to check > > if you also can not hit it? > > > > How i test it. Please apply below patch: > > This is of course a double challenge. > > I can assure you that even if we cannot make it happen in the comfort and > safety of our tests systems, someone somewhere will make it happen all > the time. Because there is a very large number of Linux systems running > out there. > > Which leads to the other challenge: How do we test this code path? > I have added extra tests to my "vmalloc tests" https://lkml.org/lkml/2020/4/2/384 for stressing head/headless variants. Also we have rcuperf module. Running them together under KVM(selftests) would be good. Plus we can add a counter of the path we think is bad, synchronize_rcu() and so on. Thanks! -- Vlad Rezki