Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp702980pxk; Thu, 24 Sep 2020 16:45:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFKJveL/+K40MPignzjS1bMwEEvgAMmzA6L46fwKzBYGrUBTFoTBJGjgNbHZAWmgNmp8IH X-Received: by 2002:a17:906:4a07:: with SMTP id w7mr85410eju.366.1600991131545; Thu, 24 Sep 2020 16:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600991131; cv=none; d=google.com; s=arc-20160816; b=EzqDvldI8zelG5bSI9jnaSzOaWf+6oeyzI7K7cRpdsRZ/2nkI6lZlh4SdL1kQti3fw T1194yITtSxB8nA3DgJJ0p8dLUwdmYqzGBEvw+DYvW00xevwXPZwzZo9VjM+F6Av0y6W o1DXaBNfUqfaRELMZCVAF7+ShArc7aLmSeDwUfOCehjC6DiotIzO4gROcWXbZ/oz4bjI MaDGm2KyzdU7BL+O8G4UTgI4E307/Sa4dSEjI6wgCEj+59FUovGPCXWT0+EgHZKSFAlY 0VJ6YTwRz7i9PsgE/ufsdg5o7IJIDrD7DtFryNGB579GCxcNEf0BmWL4bxm4IySSKkWi i9Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=/pcgmn79k21KqIFEPlReuR4P2qdxf2+4l4fSvofnTmo=; b=NCCE5X3JhNI0KbKLDCZYHRi4WnJ3i9SLyBc60eEIexN117jaHxsV+RkykzSyLZ5oTh 0mo55D9uT0CpKxG4JhJcowYmpDsdxc+K45twBRddNa2Rj6fjQn143ZrWn3IbslTVzLQh jeBxPiBgjHcPmR2wyqbzMfgDD1DT89Blo7K3SfaVZRHfrPlhKI7O/9q6gHkwiyT1JBSe af4ymQfpgdIhiMOUC6V6jNTvTA341dVnB+wT1jSbod2lNw4mjHhv3bSm9oFab6XYT4Xe 1d7HEmJFMn+mbNjM6mmk3Ecqwn9BNGYTc2mT9Dm3K1KpgLGBMOAze+otFMvwnd9U/aY+ EZug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BO8hRjQi; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si716837ejc.209.2020.09.24.16.45.08; Thu, 24 Sep 2020 16:45:31 -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=@kernel.org header.s=default header.b=BO8hRjQi; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726766AbgIXXmO (ORCPT + 99 others); Thu, 24 Sep 2020 19:42:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:57360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726397AbgIXXmN (ORCPT ); Thu, 24 Sep 2020 19:42:13 -0400 Received: from paulmck-ThinkPad-P72.home (unknown [50.45.173.55]) (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 19498221E2; Thu, 24 Sep 2020 23:42:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600990933; bh=nVwlUINslmbvoUxZeVlG6ZOgSAlwrMDJvgGSwWJ8/eA=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=BO8hRjQiuqzo++6iXUy3KqHgYvCW/Noj0T+rgLomBrRExK78IwT/thRRPsoF4xjT6 rAn/gGvSk/KrEJWZcLtfIRuymASYhbxYWvxw9ng6igMenj6svdksx62v+zjEbhKk4o Y3iA3QC8Y2zUI48cxeUTnrqtyqUcNzqFpYvvHUb0= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id D9A4435230AC; Thu, 24 Sep 2020 16:42:12 -0700 (PDT) Date: Thu, 24 Sep 2020 16:42:12 -0700 From: "Paul E. McKenney" To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Josh Triplett , Lai Jiangshan , Madhuparna Bhowmik , Mathieu Desnoyers , neeraj.iitr10@gmail.com, rcu@vger.kernel.org, Steven Rostedt , "Uladzislau Rezki (Sony)" Subject: Re: [PATCH v6 0/4] Add support for length of each segment in the segcblist Message-ID: <20200924234212.GZ29330@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200923152211.2403352-1-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200923152211.2403352-1-joel@joelfernandes.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2020 at 11:22:07AM -0400, Joel Fernandes (Google) wrote: > > This is required for several usecases identified. One of them being tracing how > the segmented callback list changes. Tracing this has identified issues in RCU > code in the past. > > >From Paul: > Another use case is of course more accurately determining whether a given CPU's > large pile of callbacks can be best served by making grace periods go faster, > invoking callbacks more vigorously, or both. It should also be possible to > simplify some of the callback handling a bit, given that some of the unnatural > acts are due to there having been no per-batch counts. > > Revision history: > v6: Fixed TREE04, and restored older logic to ensure rcu_barrier works. > > v5: Various changes, bug fixes. Discovery of rcu_barrier issue. > > v4: Restructured rcu_do_batch() and segcblist merging to avoid issues. > Fixed minor nit from Davidlohr. > v1->v3: minor nits. > (https://lore.kernel.org/lkml/20200719034210.2382053-1-joel@joelfernandes.org/) Looking much improved, thank you! I have placed these on branch rcu/test in -rcu for testing and inspection. I had to apply them at b94e6291a208 ("torture: Force weak-hashed pointers on console log") and cherry-pick them onto the "dev" branch, but it looks like things worked nicely. Thanx, Paul > Joel Fernandes (Google) (4): > rcu/tree: Make rcu_do_batch count how many callbacks were executed > rcu/segcblist: Add counters to segcblist datastructure > rcu/trace: Add tracing for how segcb list changes > rcu/segcblist: Remove useless rcupdate.h include > > include/linux/rcu_segcblist.h | 2 + > include/trace/events/rcu.h | 25 ++++++ > kernel/rcu/rcu_segcblist.c | 161 +++++++++++++++++++++++++--------- > kernel/rcu/rcu_segcblist.h | 8 +- > kernel/rcu/tree.c | 18 ++-- > 5 files changed, 165 insertions(+), 49 deletions(-) > > -- > 2.28.0.681.g6f77f65b4e-goog >