Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6232922rwb; Wed, 18 Jan 2023 02:51:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXuXCO5FplZfMOClE3nEKwA4WZEGGyV1iB36Jxk0G8AMTxHkBAl2EAJBJjxDjY/LW8SCwilt X-Received: by 2002:a17:907:10d4:b0:7ec:27d7:1838 with SMTP id rv20-20020a17090710d400b007ec27d71838mr6948450ejb.22.1674039100983; Wed, 18 Jan 2023 02:51:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674039100; cv=none; d=google.com; s=arc-20160816; b=c7k6vtewqwr4Che2VstQgkuRdBe5ENCa+kjnxQapf8IJXRjWzVkbg228/72EbRRHMQ DoFjQjBr79R9GnYkrkFi773/JTLuZz7v5NcO/ylEA5McuzJJ2RzCGsNkgkqIRVj1B7KG 28ZIbyJG+q/uaXgieEHsEUmzik7ItFP4lLFwPEYQjy5J3N/81PMiUPdGLq6DHftrlZ0D 8lSKsK9DjAY2fBguo8Jf0iSR7H77/V96zlX1+a1TqkAO3+eWcR/xOPXgfJ7hAIOaA+E5 uLvVm3B/dNqL6g97ix12r4APFDj9Bdn0RLOHrE+ejClrVmLCgcY1hY5E9ZgQnIk1aayH rdyg== 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=TCcPBABBzltDpyoJKRY9SuJLYXgsWgL74mEX6T6kSR8=; b=TTX44FTVuKZKWXE42PpSuy3v12kYvgCa4jTOvjdCUBxVVx7kacskmZAl47XmovPa4i WWYtLv+xVLLH8qVQeNSIrZWceyCSDHtxwxNgs+mW3r5Mc/rxqRP2f0Hcr5kvHOdBpq15 MMjWgdVFDcUP6Vx7eHsXcWawpg/YrndpR4Hnzk20gkDVyzBSF5JYKne/QKqWhlfgH/y8 BvTfGMqqhHx0wXH7cZyD37y7g3MLk7MpgZU6X49YE30eDkZK0SyG+ih+vE/73nwgWhyg 2sRK6pqrJ5GJVM3xvausT0tPfkGLRvd7FT6eoV0yFaLFhG0uj907TLUHeX/JrwMlIWSe w3RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=TIXLNoEC; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c4-20020a0564021f8400b0049907544dd3si13279627edc.92.2023.01.18.02.51.30; Wed, 18 Jan 2023 02:51:40 -0800 (PST) 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=@suse.com header.s=susede1 header.b=TIXLNoEC; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229748AbjARKpg (ORCPT + 45 others); Wed, 18 Jan 2023 05:45:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230040AbjARKnQ (ORCPT ); Wed, 18 Jan 2023 05:43:16 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2C91677A1 for ; Wed, 18 Jan 2023 01:49:33 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7A816340AE; Wed, 18 Jan 2023 09:49:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1674035372; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TCcPBABBzltDpyoJKRY9SuJLYXgsWgL74mEX6T6kSR8=; b=TIXLNoECbYLOwtS1hjRZUvuUJ0tZMIx/cuKDHSYn9xScVxBqdlTSxLM1H1X5jzmJ/or2k/ gARXZRoHZR3271hDg/r9XBvpqghfooiJwmluXmQf+sJ9IhOK7PkCW4fxUfv0bek0KNhbpX LMPrg5MDruGN69SQP+JMNeERZr+LaFY= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9161A139D2; Wed, 18 Jan 2023 09:49:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id DyT3IqrAx2OtQgAAMHmgww (envelope-from ); Wed, 18 Jan 2023 09:49:30 +0000 Date: Wed, 18 Jan 2023 10:49:26 +0100 From: Michal Hocko To: Suren Baghdasaryan Cc: akpm@linux-foundation.org, michel@lespinasse.org, jglisse@google.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, peterz@infradead.org, ldufour@linux.ibm.com, laurent.dufour@fr.ibm.com, paulmck@kernel.org, luto@kernel.org, songliubraving@fb.com, peterx@redhat.com, david@redhat.com, dhowells@redhat.com, hughd@google.com, bigeasy@linutronix.de, kent.overstreet@linux.dev, punit.agrawal@bytedance.com, lstoakes@gmail.com, peterjung1337@gmail.com, rientjes@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@google.com, hughlynch@google.com, leewalsh@google.com, posk@google.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free Message-ID: References: <20230109205336.3665937-1-surenb@google.com> <20230109205336.3665937-40-surenb@google.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_PASS 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 Tue 17-01-23 17:19:46, Suren Baghdasaryan wrote: > On Tue, Jan 17, 2023 at 7:57 AM Michal Hocko wrote: > > > > On Mon 09-01-23 12:53:34, Suren Baghdasaryan wrote: > > > call_rcu() can take a long time when callback offloading is enabled. > > > Its use in the vm_area_free can cause regressions in the exit path when > > > multiple VMAs are being freed. > > > > What kind of regressions. > > > > > To minimize that impact, place VMAs into > > > a list and free them in groups using one call_rcu() call per group. > > > > Please add some data to justify this additional complexity. > > Sorry, should have done that in the first place. A 4.3% regression was > noticed when running execl test from unixbench suite. spawn test also > showed 1.6% regression. Profiling revealed that vma freeing was taking > longer due to call_rcu() which is slow when RCU callback offloading is > enabled. Could you be more specific? vma freeing is async with the RCU so how come this has resulted in a regression? Is there any heavy rcu_synchronize in the exec path? That would be an interesting information. -- Michal Hocko SUSE Labs