Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3097741ybt; Mon, 29 Jun 2020 15:18:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxl2kWowgwfSO4sc8tkqhK/oJfzGUP7jp9sWtba9hK60EJlvgbUo+QNCC38YBSmcMYxG53l X-Received: by 2002:a17:906:455:: with SMTP id e21mr16391919eja.550.1593469091477; Mon, 29 Jun 2020 15:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593469091; cv=none; d=google.com; s=arc-20160816; b=tC+TqQTUaG/bi7ZeARaG0z6yh3Z2fEh+R489rIPdMhkU+jjPQRjveg4LtmgO21xGsr zCQ6QeT4lpxO2LU8xjDptd0LnAMa3C9YMV/qDl5a0mRTYBayWkpueE2YAkHPikR+EVJA QA1MYoPItuYN5rk82baqn3CXpD/A2COSRMZOTIw0xJ7558xs4lZhQRE5FhiD62waZGjA dtXGtXrUuXc75BOUcZzjho847n7aufqmKevgCDZpZByijrcVzIFnu/Xu2cag3Hx7kigI r+N4lLLXL7KrAyVoTsZbUURZzsRSfgb5adRvfO3OMlucRcR35Nw+cAsgHvIgR8bd9xYd WE1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=0Ha+L6QzCKUZl5iw8VRUg3rFXGciT6R9saGolwKTZ7c=; b=u+L4yK3JI1s+rwY8ftapxQLbh4p68h7am4bLM2E5ZdzuH+/5KJ/eja6bffzGzCd6zZ OmxG1mYBj3Oxfj9gIco8j37cxvW3V6TofF0VlE9xxUNeMLEjagnzBVBFlqbaiR08occ6 FH8rup/pqFeh1l6aMvB4AY1WSpuWIleEJO/hchxVoR0OVwHZD50TgbDDiashb55SGfxO 17P5uFSaiH/NM4598QlQ2w6tZOs1y+sIDd1HgpPKN+tssITo5tknu9CWaNa+Y4mAVkQU ekyczl72uTHJPLW/r9KB3TGSg+gbX9HS9LZpr3yKIBvsPYMjpUOC89BO+K1BApyYJFx7 G1cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si523896ejx.754.2020.06.29.15.17.48; Mon, 29 Jun 2020 15:18:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729428AbgF2WQ2 (ORCPT + 99 others); Mon, 29 Jun 2020 18:16:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:52898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726194AbgF2WQ1 (ORCPT ); Mon, 29 Jun 2020 18:16:27 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C8AD920656; Mon, 29 Jun 2020 22:16:26 +0000 (UTC) Date: Mon, 29 Jun 2020 18:16:25 -0400 From: Steven Rostedt To: Nicholas Piggin Cc: Paul McKenney , Anton Blanchard , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ring-buffer: speed up buffer resets by avoiding synchronize_rcu for each CPU Message-ID: <20200629181625.4b87a63a@oasis.local.home> In-Reply-To: <20200625053403.2386972-1-npiggin@gmail.com> References: <20200625053403.2386972-1-npiggin@gmail.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Jun 2020 15:34:03 +1000 Nicholas Piggin wrote: > Batch these up so we disable all the per-cpu buffers first, then > synchronize_rcu() once, then reset each of the buffers. This brings > the time down to about 0.5s. After applying this patch, running tools/testing/selftests/ftracetest went from 5 minutes and 35 seconds to 5 minutes 5 seconds to complete on my 4 core (8 with hyperthreading) machine! That's almost a 10% drop! Thanks, I'm definitely applying this for the next merge window. -- Steve