Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp856112pxb; Wed, 6 Oct 2021 17:22:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzQtYNAEfLsKTYVsalH29Tvn3ir+LEkOWAin+n7QXakcRpvt5DPiL1ffvm7w4AJ7ptxXsi X-Received: by 2002:a17:906:3fc8:: with SMTP id k8mr1625768ejj.217.1633566162108; Wed, 06 Oct 2021 17:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633566162; cv=none; d=google.com; s=arc-20160816; b=KpD4WaU42kY9CvIHYDvjoFKzAuqm3LiC2B3nyTC9ooyRmn8XTc9zgShlkfD8QyIwnm vL4oNELCj5YrG0muK6VK03EhvWPdG4Es9GtGgwO978apKWOe5U285KfYrXfjGoO//MwM SEtPmIAmJZWAtC50TRHLOhnIzu6wQCURuNyR00cxKBKj3hsCc0p5H33cX85zK8zvwOq1 cwJotoE0+8fSn/hqldZ7fxXse3rjDU1FzR+BEjPJpfRWhslslzqqWA+01fETxj2nEtVP 2adtJUrLAS5VALLRkefcjSHiJgvCCIQxkjryTCBfAINb/ObTJW9cGzxFR9iCI8dNa9OZ EyNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kBmesP/v0pDkNjNSoUcLeNn3kVLM5kIvp15s06cEAMU=; b=zVKNdnFIk9n2K4r018x6LeMjo+nYoWBf4PhqtQjfEG4MukMzWMoE2S87g9XhwKhVG2 lxYcLvRl/WFqDqtFCI31hHWEcA0XVrLizGqH8PeJtOUp5wmQXe4OOwutpwNqiqzHWy/s /3jl8TpPDviBN9lBy6hCFrfv8L8nimiTWbH6pZWVYyvujInBLlynZVS8RCLbEX3je4wG mdE4YU5RJXNBCbgSWLG0duMhvChmkftH2h852kSsfgmKLQZOSXrYjeOVeTL7AABlWNz9 xdViPhhesIqwcVTVOwQ4mupEaIt8vvAh04UDffVqumRJBdLOXdHV+Py/Zo+bGoWEMfp0 VoHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AY1kddh5; 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 c14si37723590edm.165.2021.10.06.17.22.18; Wed, 06 Oct 2021 17:22:42 -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=k20201202 header.b=AY1kddh5; 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 S232239AbhJGAUj (ORCPT + 99 others); Wed, 6 Oct 2021 20:20:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:45704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230491AbhJGAUi (ORCPT ); Wed, 6 Oct 2021 20:20:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1E41F61177; Thu, 7 Oct 2021 00:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633565925; bh=gQCqAOHznde6By0G5rhZDtcpNGq2cAPcYB9m/ozoAu8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AY1kddh5a1qMElbmhh08GuJgGYQmJuXc021Tl3pONbClHof7oq91/HPJYFEG6CE71 Z/EitfXQv2nrsHbdikemb9foN/g7ijxRwVT1tN/BYR9+t4DmLUSp0bWbWIh0kyorbj biTGLl4ysN1DO4a33YJr9LsnTzd7W4d2NDiJfUF7who0i8a1vV/D7iiQYiziAaMmnX /cAinL+ARgKbC9iRtY18NMsvi0pKBBzbkvTShvTEJS3Z8J98GGBTBZE/6mM2FH3ntv sP+FYsa5FE3hDv40Owo4//gRE2UcpkRbCfbZldJ2Fi676dfOqO9aOeo5cYjorWYUGv 52BfcjySD0Yrw== Date: Thu, 7 Oct 2021 02:18:43 +0200 From: Frederic Weisbecker To: Valentin Schneider Cc: "Paul E . McKenney" , LKML , 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 Message-ID: <20211007001843.GA304532@lothringen> References: <20210929221012.228270-1-frederic@kernel.org> <20210929221012.228270-11-frederic@kernel.org> <874ka0my57.mognet@arm.com> <20211004134748.GD273854@lothringen> <87ilyakx0z.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ilyakx0z.mognet@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 06, 2021 at 04:12:12PM +0100, Valentin Schneider wrote: > On 04/10/21 15:47, Frederic Weisbecker wrote: > > On Fri, Oct 01, 2021 at 06:51:32PM +0100, Valentin Schneider wrote: > >> 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()") > > > > But if cond_resched_tasks_rcu_qs() was called and then on the next iteration > > tlimit is checked, the time spent scheduling out is included, right? > > > > if tlimit was set, then that branch would either continue or break; both > cases would have skipped over the cond_resched_tasks_rcu_qs() (which the > aforementioned patch addresses). Duh, right indeed. I need to clarify the changelog. Thanks!