Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1494460pxk; Fri, 4 Sep 2020 10:43:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzF6vDsmql2Q4rGhMkBKDAYHFg/Nz35x7S0nzjIkLE9tiNX+2/5NojqpTwIpVL/KVBLZQ+R X-Received: by 2002:a17:906:b2c3:: with SMTP id cf3mr8962371ejb.387.1599241390959; Fri, 04 Sep 2020 10:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599241390; cv=none; d=google.com; s=arc-20160816; b=zLPPYy8U9ANG2gcF7otQXXzY3gYNpT2GaRrTIWH06AA4i/v6tc1kkAvh2nePZY9+yt Mdofws/1BTebUq5u+NP9sjCF/lAyjvGpOCYWkQohq85rAhzs1zw8GD/zoiL55n9WgIuk A5FP/Etd7Tt6OznpCywoiJaf0HH+3T/UFOsof7GzipCsVp9EloI9O5l5dn6lx5Cx9LH7 0bZAyCjoye5x2qp6Evrs5iCL6YtT4uBI1TkxBMr/jiI+uqZLCY07FnmXoCR1+ujWiCEU xRDAGUhj+JTSeI/3jno7evCcSRpQhUHcSqubnIEABjeYfKJPw/W1mKg9ABnclKO8NgJS /oiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vQmh+4hDe37PMunBIvw1bODihEHqrmj+I6QpMehizoE=; b=OHklQdFTygPi2bBOGFQ3JY4gcTlCeL2G/CyxdL2oc758YyneAfd20f71c9cRwqR5Nd N+94t4T1BlEP1h5C0+DvyI+ZF9Ps8dN41WafaWDhGrBId0BOt48odaBsVvPEgb/ojmo0 nn5ca7AeUqhl17FEsVVfeXePqzxHByCKFnYc1qsNxnuPvw8KnxCZcpLd4k+Pqn14Ek2K jiN0ovHzLoeLDjXZ8jOHQyJBmNAj7YtmQ7EkA1pdmGY7vEx5NXxkh9TsCDwLKo9ajE3y XgJOTZzcWANkHjA32TEuKDJi8KipShGgv04EMJXEDf+2sOYH3NL3sUG59IWysyrAp7tP f7Mw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ba30si4551363edb.44.2020.09.04.10.42.48; Fri, 04 Sep 2020 10:43:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728299AbgIDRkv (ORCPT + 99 others); Fri, 4 Sep 2020 13:40:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:38416 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728255AbgIDRkX (ORCPT ); Fri, 4 Sep 2020 13:40:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id AA18CB6C2; Fri, 4 Sep 2020 17:40:22 +0000 (UTC) Date: Fri, 4 Sep 2020 10:24:32 -0700 From: Davidlohr Bueso To: "Paul E. McKenney" Cc: peterz@infradead.org, mingo@redhat.com, will@kernel.org, linux-kernel@vger.kernel.org Subject: Re: Question on task_blocks_on_rt_mutex() Message-ID: <20200904172432.wgxn6x5tpnt4lcln@linux-p48b> References: <20200831224911.GA13114@paulmck-ThinkPad-P72> <20200831232130.GA28456@paulmck-ThinkPad-P72> <20200901174938.GA8158@paulmck-ThinkPad-P72> <20200901235821.GA8516@paulmck-ThinkPad-P72> <20200902015128.wsulcxhbo7dutcjz@linux-p48b> <20200902155410.GH29330@paulmck-ThinkPad-P72> <20200903200639.GA8956@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200903200639.GA8956@paulmck-ThinkPad-P72> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 03 Sep 2020, Paul E. McKenney wrote: >commit d93a64389f4d544ded241d0ba30b2586497f5dc0 >Author: Paul E. McKenney >Date: Tue Sep 1 16:58:41 2020 -0700 > > torture: Periodically pause in stutter_wait() > > Running locktorture scenario LOCK05 results in hangs: > > tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --torture lock --duration 3 --configs LOCK05 > > The lock_torture_writer() kthreads set themselves to MAX_NICE while > running SCHED_OTHER. Other locktorture kthreads run at default niceness, > also SCHED_OTHER. This results in these other locktorture kthreads > indefinitely preempting the lock_torture_writer() kthreads. Note that > the cond_resched() in the stutter_wait() function's loop is ineffective > because this scenario is built with CONFIG_PREEMPT=y. > > It is not clear that such indefinite preemption is supposed to happen, but > in the meantime this commit prevents kthreads running in stutter_wait() > from being completely CPU-bound, thus allowing the other threads to get > some CPU in a timely fashion. This commit also uses hrtimers to provide > very short sleeps to avoid degrading the sudden-on testing that stutter > is supposed to provide. > > Signed-off-by: Paul E. McKenney Reviwed-by: Davidlohr Bueso