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=-6.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 57863C433DF for ; Tue, 25 Aug 2020 02:49:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 333C42072D for ; Tue, 25 Aug 2020 02:49:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="Y+quge4v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728364AbgHYCs7 (ORCPT ); Mon, 24 Aug 2020 22:48:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727935AbgHYCsw (ORCPT ); Mon, 24 Aug 2020 22:48:52 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3C29C061755 for ; Mon, 24 Aug 2020 19:48:50 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id i20so9750491qkk.8 for ; Mon, 24 Aug 2020 19:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WDQbTxMp1C6CYIxUrZbkzWdwK+GUKbU9bbcwziJlLJM=; b=Y+quge4vKDkMBkG9K2uI17oyg6nOzsVtgH5Wj/BPuvqKsGNZI6V44MgZJOtabTfEoT ogB+Ub3YppTetYQm4v3e1Jf8cpg97taw40ZfkweT7BvtMmG21cfNN8KYAOQuO2jPnen8 tQg94Peaiuzb0nBxC4tUqHVzV0FxdNnve5dF4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WDQbTxMp1C6CYIxUrZbkzWdwK+GUKbU9bbcwziJlLJM=; b=B26accCpfXrsVz13MH6udqI1NyNnkv/i3Nseu+i2Z3hccbmLC+B6YEzjIm9nBYIuM1 7s6c5vZE67ceWqFqoDAs+N9+iQbTqkZptI8ufmPw/3IQjAOKYop4GB1T93CToZE/p+hT cBmgPnvZG1WARSWqS7H7fTcepmue+w1IIEzOUCuP3ylGoaQVfIBLuVWnaxDNsEsvL/4h BSWf5/toRCG9KaX7dRwhUQJ3DYqRcVbcPO1f8VBlVx/TW5yZ3GqUkI1AgN11bq0h+8PN F4AKYb7qZMxEVMO4m29jCPh3DG6W+/JQ189XrrjWe3j2sU1hiCWX+cEEWCD4AmmuSDvP 7y/Q== X-Gm-Message-State: AOAM530ghnEipa7m3IEV3H41tcckMJn5WlQ03PV67O8coy0g+RCJwSAy 9B0Z9BqF9NS6Mig1FmYI1LB35W/Y2KzRmA== X-Google-Smtp-Source: ABdhPJylkywYmbfoh8Km/IDLOzejn31ir/4h2j9L5LsuD9gSx2laJes3GgJLz2xbP7d5ycHUDQ7mAA== X-Received: by 2002:a05:620a:1185:: with SMTP id b5mr7549813qkk.293.1598323729632; Mon, 24 Aug 2020 19:48:49 -0700 (PDT) Received: from joelaf.cam.corp.google.com ([2620:15c:6:12:cad3:ffff:feb3:bd59]) by smtp.gmail.com with ESMTPSA id n14sm2159188qtk.50.2020.08.24.19.48.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2020 19:48:48 -0700 (PDT) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org Cc: "Joel Fernandes (Google)" , boqun.feng@gmail.com, dave@stgolabs.net, Ingo Molnar , Josh Triplett , Lai Jiangshan , Madhuparna Bhowmik , Mathieu Desnoyers , neeraj.iitr10@gmail.com, "Paul E. McKenney" , rcu@vger.kernel.org, Steven Rostedt , "Uladzislau Rezki (Sony)" , vineethrp@gmail.com Subject: [PATCH v4 -rcu 0/4] Maintain the length of each segment in the segcblist Date: Mon, 24 Aug 2020 22:48:38 -0400 Message-Id: <20200825024842.3408659-1-joel@joelfernandes.org> X-Mailer: git-send-email 2.28.0.297.g1956fa8f8d-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. The trace patch is the last one in this series. Passes 30 minutes of TREE01, TREE03, TREE07. Testing of other TREE configs is in progress. Patches are based on -rcu commit: 4f43de2a419a ("Merge branch 'lkmm-dev.2020.08.24a' into HEAD") Revision history: 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/) Joel Fernandes (Google) (4): rcu/segcblist: Do not depend on rcl->len to store the segcb len during merge 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 include/linux/rcu_segcblist.h | 2 + include/trace/events/rcu.h | 25 +++++++ kernel/rcu/rcu_segcblist.c | 119 ++++++++++++++++++++++++++++++++-- kernel/rcu/rcu_segcblist.h | 8 +++ kernel/rcu/tree.c | 32 +++++++-- 5 files changed, 175 insertions(+), 11 deletions(-) -- 2.28.0.297.g1956fa8f8d-goog