Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3215984ybt; Mon, 29 Jun 2020 19:10:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJXkTLpBC645TqKYSfogGVowWViSphZueQCIRfm2CDDCGoyboGgjfd8u0HoPbbo4tTfyj5 X-Received: by 2002:a05:6402:796:: with SMTP id d22mr21668093edy.78.1593483030418; Mon, 29 Jun 2020 19:10:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593483030; cv=none; d=google.com; s=arc-20160816; b=N9xHAhk47nJRD4Mc6HJojQI3G1XjwJFHSdw256OUB/2hkMx8/lbuzcCJZvJ6mox6RW VB1tnLZCG9Ps+H8FYOK7vMCwYIMQVXOE8jJrjo9npuy9LzmHal9XXF2C+rBIJRQFYX0a tOqxfo1U9XR/d1Yrh4NyFMLDPuiHFqFI+HfEuXFECubeQrBMoA3UXVG+b6P8nj4t6HGS N28q6bsI6dt5H5kKFuTZfUC0e7+6cJIUsinKp2M0PZr9qr8X1JPRrl8Ey/BhwWsqpYEp Q+6p0wW+C06GoVDjB2B+ltY3px/7B1J3YH+Kot7h0WEvTmL616aGkGozLD5E0WNKQH4B n9kw== 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:message-id :mime-version:in-reply-to:references:cc:to:subject:from:date :dkim-signature; bh=CAsTIhg9GNAtVe3y8RLBs7slHNRQHigQcda0zsTXJMU=; b=B5mPgGXoZwK83zwtLHYML1JGI9vBdj1XlN67s4x/096pyyjKhdRYFThd3H2816K4bH ocO2wOXBPQS0BYB/87tuN/2T3p/wuVbzZGYJlJhwf72AebbV4qZNdRY7WrB1Y5JyMDuK /oFux41KPp+kNKk8S6GhQJnHeJERS60Zo2hYgBNVhfksBoyo+PIqeBg+50LgEo/wArj4 oH9e9om2676cw9tymW0KkWduuLs0soYYssP6aek560NYwGsmfavH3Pb2qGJL/Rxehfqx 4zutdY7I+XsrXKNuIAQksVD9uFLt2LD7DaGHGjCuwXhJ4o7xwdGiAwvWedWec0xPhVZL 8YMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Ye/Aut1F"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si770582edx.522.2020.06.29.19.10.07; Mon, 29 Jun 2020 19:10:30 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Ye/Aut1F"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727881AbgF3CHP (ORCPT + 99 others); Mon, 29 Jun 2020 22:07:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726226AbgF3CHO (ORCPT ); Mon, 29 Jun 2020 22:07:14 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37ED7C061755 for ; Mon, 29 Jun 2020 19:07:14 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id z15so7237165wrl.8 for ; Mon, 29 Jun 2020 19:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=CAsTIhg9GNAtVe3y8RLBs7slHNRQHigQcda0zsTXJMU=; b=Ye/Aut1FZk5CUmWtGzbs4WamhVJapkHBREiS6HzooXxA+QSNZLSxcWdKhFl5fVOijI QjAkXfOcPdD4pvd4TadqirUYPj+IiWJsQUaT38IiTmSftGrkJ8up8qtoms5aA1v/y6mi Vu7l0Twb7nZ5zJ2bGH3bwa1NxyXgjHXG2qWzGRydFRxtTjH2PUSCokd5S2kSRFh+pBdv QtIkZDxF+rY2OxdB1UonxgPi7iLGVRqWtVEQ+BBuRa3R6YSZnkulkQecr7aCU70E2GHb pF3jFRCs0/Jr1OycpRlVTCbokVvameruvI62xSNa+/rG2/ucuDObn6sesburtx/jGTfP lu2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=CAsTIhg9GNAtVe3y8RLBs7slHNRQHigQcda0zsTXJMU=; b=IwGYf5svEpbsG24lCqJlL4kFafpFqq/kGqDMEw1BZsp/AzwyWjZvOmxGVcEeQKtYGl iwQkFDKsBk29U7eFcwhzxJBwBWwAcZlip7hDT2fKHvRrwIXm4BHt4l3/gsKK9WGx8rVx wEjgdIkMfVuh0Re/r6Y90efYBpLksTewkpABa7U9dxmEUi9QU05T9cyYwBUP6ebbFEHt IoXt3xpaoCs3+AtXfCXdMHU0nzAdCvyziEguh5KiR8QF0C9kiIcpAOHSkSnX6JkDR/qf ODSg8tWd0kxUXcp9/8/ktGR8omHbYkRqjcr+lKi4Wlgsdtlk5WQs6ZSq5R64JiTolba8 4uog== X-Gm-Message-State: AOAM530pFEPR9erfkLjR0gEnffXYWCvyAbo3ZILL83KJV6Y0AWBuF22A JMvPNEY995RXjj9QI8C6+7c6kV8j X-Received: by 2002:adf:97d6:: with SMTP id t22mr18807618wrb.385.1593482832968; Mon, 29 Jun 2020 19:07:12 -0700 (PDT) Received: from localhost (61-68-186-125.tpgi.com.au. [61.68.186.125]) by smtp.gmail.com with ESMTPSA id l132sm1815730wmf.6.2020.06.29.19.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 19:07:12 -0700 (PDT) Date: Tue, 30 Jun 2020 12:07:05 +1000 From: Nicholas Piggin Subject: Re: [PATCH] ring-buffer: speed up buffer resets by avoiding synchronize_rcu for each CPU To: Steven Rostedt Cc: Anton Blanchard , linux-kernel@vger.kernel.org, Paul McKenney References: <20200625053403.2386972-1-npiggin@gmail.com> <20200629181625.4b87a63a@oasis.local.home> In-Reply-To: <20200629181625.4b87a63a@oasis.local.home> MIME-Version: 1.0 Message-Id: <1593482725.5cl7vnne3j.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from Steven Rostedt's message of June 30, 2020 8:16 am: > On Thu, 25 Jun 2020 15:34:03 +1000 > Nicholas Piggin wrote: >=20 >> 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. >=20 > 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! >=20 > Thanks, I'm definitely applying this for the next merge window. Cool, always good when a big system optimisation helps small ones as=20 well. Thanks all. Thanks, Nick