Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5442357ybl; Tue, 14 Jan 2020 09:01:29 -0800 (PST) X-Google-Smtp-Source: APXvYqy3ikpzKhzqedofQgnom2XkC278A0WV3HOhAh+/xBwk2Z6wr5UrS9W5tI9q07nfXVzchqyI X-Received: by 2002:a9d:3a65:: with SMTP id j92mr18085745otc.37.1579021289588; Tue, 14 Jan 2020 09:01:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579021289; cv=none; d=google.com; s=arc-20160816; b=iQIy+m0gQ3a8YVT6GZG/6IlFH2u8Zd8NA0XyIj0zUjKX1Su20cUxGi0MrymX0bpPcl h+D7+1vb4gZP0zE5/UMlqGr/+4/jubS9GNmqMzrxx7jwNC50arcF9lSAzqQM9E0e94UC +uSU0qtIO6+wZIR20kplsbKhNNPfoI004IiOaG3v8dP8/eNRGOatwHhNgJnEnCLMjjTL uRZ+GYM6+3DlO5J6tyZuWESy/ZztwuOKIvEzOL54GZXobvEXoNHpMkks8AHwg3YQAKyX VZCSosabZloU6ow2F60X5fxOTrjjjB58Pn+6XpwU4uE1hF+eBLWK+k5U4lbbttG/VWrA AGPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=ZzfvZd8q11zG/9BR+RNEAz69P/wc9YkOYH4Uu0MZ+Vc=; b=wqYagYQiF8FFOCytemYy31+wF8ebA7W84EIqHpzppy5r5WnN2SdTebAJ53/ICZKDdc g2WcdH/wv2s1gSMY7sI1358Wta+zb8C0lU7wIWB64EkQewonHT0JU9FKvDe6pRrxb9NT RtAYvIgKI1CVhnxuhwZsfOXXl1dqqIQuadLnt96kHGCpjgZRpBSa3z0NPU05/j2X/jQH 6iV9WeYOiTSMjaMIHO4Emfew049TlUeTBMeQjnQ1Ui/bV3+G1KLgGiemA89MIzqwkWIu NuMORbJVk2x9Nah5TTDsnmiehYzREJIwS+VFMF/q/jhw1CwW56cJ5vMa5QsdhG/5WImB odog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si9308866otg.295.2020.01.14.09.01.17; Tue, 14 Jan 2020 09:01:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727331AbgANQ7J (ORCPT + 99 others); Tue, 14 Jan 2020 11:59:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:59102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbgANQ7J (ORCPT ); Tue, 14 Jan 2020 11:59:09 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3C8522084D; Tue, 14 Jan 2020 16:59:08 +0000 (UTC) Date: Tue, 14 Jan 2020 11:59:06 -0500 From: Steven Rostedt To: David Laight Cc: 'Vincent Guittot' , Peter Zijlstra , Viresh Kumar , Ingo Molnar , Juri Lelli , Dietmar Eggemann , Ben Segall , Mel Gorman , linux-kernel Subject: Re: sched/fair: scheduler not running high priority process on idle cpu Message-ID: <20200114115906.22f952ff@gandalf.local.home> In-Reply-To: <212fabd759b0486aa8df588477acf6d0@AcuMS.aculab.com> References: <212fabd759b0486aa8df588477acf6d0@AcuMS.aculab.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jan 2020 16:50:43 +0000 David Laight wrote: > I've a test that uses four RT priority processes to process audio data every 10ms. > One process wakes up the other three, they all 'beaver away' clearing a queue of > jobs and the last one to finish sleeps until the next tick. > Usually this takes about 0.5ms, but sometimes takes over 3ms. > > AFAICT the processes are normally woken on the same cpu they last ran on. > There seems to be a problem when the selected cpu is running a (low priority) > process that is looping in kernel [1]. > I'd expect my process to be picked up by one of the idle cpus, but this > doesn't happen. > Instead the process sits in state 'waiting' until the active processes sleeps > (or calls cond_resched()). > > Is this really the expected behaviour????? It is with CONFIG_PREEMPT_VOLUNTARY. I think you want to recompile your kernel with CONFIG_PREEMPT. The idea is that the RT task will continue to run on the CPU it last ran on, and would push off the lower priority task to the idle CPU. But CONFIG_PREEMPT_VOLUNTARY means that this will have to wait for the running task to not be in kernel context or hit a cond_resched() which is the "voluntary" scheduling point. -- Steve