Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1578482pxb; Fri, 1 Oct 2021 13:57:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKWXWv97va7cEDACBpWTfw+qH9hEHCQwhG6jMgOZAA+fn9q9OSmDl+Dej5Da2p/m/JYiJm X-Received: by 2002:a50:dace:: with SMTP id s14mr176860edj.369.1633121841617; Fri, 01 Oct 2021 13:57:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633121841; cv=none; d=google.com; s=arc-20160816; b=wGXK7nAvDniVZE7lk5F+kHKk8s/GPjaDoJ1S0wtGftExJ5Frum3F6b8vqFwX5pUaE2 rRMOlVey7nbMFazHNbxh4j+MROIXCm9YXZJGTpzIeAs/I49Ty0sbFVF0k/gSK3dtZlbe qiTO7tN6J+yRdff4/1nvzTvZJga8xGmY20gAQ5YKjmswdNU9tpOm/kRnCfbTMRF7aD7z ka4TTTDIFSu1H+O1/vdqYXjIZbvgrUUcsXhVntKhzqgpJso7FGkeWURrzFyczV1DElpq OKu6GyvHnBLLcCAyOqatnOXZi0GR2slo2gC8dYRVJsdFKjH8CaSJgBqdUit7/f+HQRDH pXFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=kwJKvMH3V5N2xhOIfI5R3BGNguwXCjilvMo82B9vgow=; b=DANyXD1g9wUUkzWC/5o3NNATzn3sEapgh60c3dqmDl52+FnPzFpu+02pwr8hYIstJd T5amBWj8dTXsElEKFtZSgGtPtMxWGaMqBrlPz+LGDWpYKDIPthh19+stQs7izXBddUwL WkOtpuoIuUUj4wFI+KT1WrJxVZMAhK0AYLp5bStOzHpSBbAqQLBOGuieej5wnN+93AvI I1UplyTD5Y+0hIk9bu6j6j26B5/sMCvd93EJBj6vNHc/BcqMZ1ZSEg3Yc4LSPeSJbXOW IrHJEjCG7lHaVYtT2E1JLdfocEO4qje+z0rnOYkwolbykn5brLtTR4mO+/L6Ovx8L5/9 hjyQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si5668164ejj.616.2021.10.01.13.56.56; Fri, 01 Oct 2021 13:57:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355505AbhJARxp (ORCPT + 99 others); Fri, 1 Oct 2021 13:53:45 -0400 Received: from foss.arm.com ([217.140.110.172]:49554 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355530AbhJARxV (ORCPT ); Fri, 1 Oct 2021 13:53:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 86193106F; Fri, 1 Oct 2021 10:51:36 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D9CD83F70D; Fri, 1 Oct 2021 10:51:34 -0700 (PDT) From: Valentin Schneider To: Frederic Weisbecker , "Paul E . McKenney" Cc: LKML , Frederic Weisbecker , Sebastian Andrzej Siewior , Peter Zijlstra , Uladzislau Rezki , Thomas Gleixner , Boqun Feng , Neeraj Upadhyay , Josh Triplett , Joel Fernandes , rcu@vger.kernel.org Subject: Re: [PATCH 10/11] rcu: Apply callbacks processing time limit only on softirq In-Reply-To: <20210929221012.228270-11-frederic@kernel.org> References: <20210929221012.228270-1-frederic@kernel.org> <20210929221012.228270-11-frederic@kernel.org> Date: Fri, 01 Oct 2021 18:51:32 +0100 Message-ID: <874ka0my57.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/09/21 00:10, Frederic Weisbecker wrote: > Time limit only makes sense when callbacks are serviced in softirq mode > because: > > _ In case we need to get back to the scheduler, > cond_resched_tasks_rcu_qs() is called after each callback. > > _ In case some other softirq vector needs the CPU, the call to > local_bh_enable() before cond_resched_tasks_rcu_qs() takes care about > them via a call to do_softirq(). > > _ The time spent on other tasks after scheduling out, or on softirqs > processing, is spuriously accounted to the time limit. > That wasn't the case before ("rcu: Fix callbacks processing time limit retaining cond_resched()"), though under PREEMPT_RT that *was* true (since bh-off remains preemptible). So I'd say that's a change we want. > Therefore, make sure the time limit only applies to softirq mode. > > Signed-off-by: Frederic Weisbecker > Cc: Valentin Schneider > Cc: Peter Zijlstra > Cc: Sebastian Andrzej Siewior > Cc: Josh Triplett > Cc: Joel Fernandes > Cc: Boqun Feng > Cc: Neeraj Upadhyay > Cc: Uladzislau Rezki > Cc: Thomas Gleixner Reviewed-by: Valentin Schneider