Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3965204pxb; Mon, 4 Oct 2021 13:53:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSqeK93ShJXC0gArJAqStRcAzjx08z4I8UGwwTLpN+je8pS6KIhzYx6q/s2M455OGnr1pZ X-Received: by 2002:a17:906:1682:: with SMTP id s2mr20490425ejd.66.1633380809469; Mon, 04 Oct 2021 13:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633380809; cv=none; d=google.com; s=arc-20160816; b=koY1qKiTyVey0riR1DW3l72iR8+hwYUJLbg9UoTccdDxR6vQVu+tIHk5qoJ3AWpr4y PbeQc/WvKUtPm1cNGcftagMRZRveFzroq6AvyVW8T/cWjUnX7XMhPr4ZAuqY69Xpm4Qm G571Q/mBUupxSlYpI+T8zPkCNDl3h6IvFzRw5hLFFBdm7vWLZ+sMBf7wup19ZFAtI6rI +FAUixBhPT59O2ClX16zC8BewNgkiv4Pie0Hm885L5RwTKWBHtAWcZesCHVbhMfQUSr7 EodDXQJcM3WA01yo3sxtakUKdoERUJYaFS3BS1tP5vSrUSPmT5ILpY6xTKXSO03egkbo Uu9g== 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=bXC1NRKMb1U3VBtPE4/E5PtQmW611YIpZflk4iIX5S0=; b=l/VAqHBhTpVpl1OuUUYeLigKvinvyzddzXaB8DG4l+0FSHfPKocmhmFd9bi8bfmcaK M/+go9oNU1jJ3i7ntOvG9KTE2XZLxEHhBUzn9C6ODY1+wGs9vJrA5WsY69snHPjm5hoH +hoqt0vik7T5cLw2UGMj0m/OHDjIBZbkJnm3iWIW9N19BS+cjGUtSpEN4Ojz2mWxIwgF zLGIa09YT6Q/szuHo+R1qaB6u96n9ICvFN44foUPmunryLmLRKbCj89dyhvNO6k5qevt XdMMG+p7qCj/A1wVwojAqbTDnC91xF3PNpcyb9EWYTPAVR4IWRCfAlPpmVPwWdB5FVsD x+pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LR1Erv2K; 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 u18si13857656edb.156.2021.10.04.13.53.05; Mon, 04 Oct 2021 13:53:29 -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=LR1Erv2K; 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 S238846AbhJDNtq (ORCPT + 99 others); Mon, 4 Oct 2021 09:49:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:60934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238812AbhJDNtj (ORCPT ); Mon, 4 Oct 2021 09:49:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3660461207; Mon, 4 Oct 2021 13:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633355270; bh=Q5hvqfnKBpjb+385DGba5PUqwwPhzc1+obGuMOt5Cas=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LR1Erv2KL7VPucFJYsYakwzIaxnTNRD9CK7Vl6lrgkvccBRZmr6p7IsUHNvDlb3Kk 6qvIJuyEZ7ZTOtBnr8OScrs46pcBjbIVl4fIf2u1wdqIBKMop2B7vGM/IN9j1Zhgix aex/6DtN5JmJiYClaNNxHi0iLURKUGMsQfOoCd2deM7XudTSYC0dOYVVIMd2nilfGO 7OYhsX/wGITSQ+n9DlV0s/eFrdJvIO91YmW/FaXYMHPOfVg9Ok7JxMejp/DOQGUdgJ pUFgbW9ikyMyT0XSEkYcedtfepeMHcKjKXDk0h0ow1VIzTTrgYULoYIIGTpH6YCc4J TRB6MCS6NT2xw== Date: Mon, 4 Oct 2021 15:47:48 +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: <20211004134748.GD273854@lothringen> References: <20210929221012.228270-1-frederic@kernel.org> <20210929221012.228270-11-frederic@kernel.org> <874ka0my57.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874ka0my57.mognet@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks. > , 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