Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3933324ybl; Mon, 3 Feb 2020 09:15:40 -0800 (PST) X-Google-Smtp-Source: APXvYqywaKKhZVkBPbECaWqbXDEb/xD81tOfPp7Y9LDh8r0eE8DSCiAN/duEgRMcRwvnDisNbPmH X-Received: by 2002:aca:4f8e:: with SMTP id d136mr56530oib.61.1580750140499; Mon, 03 Feb 2020 09:15:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580750140; cv=none; d=google.com; s=arc-20160816; b=uMWuw5Z0lYjAxGVMIX9hdcdA+cFIgpah9H0CSc4ZdC6wQYNgZIs4IVvm0UYgn375oi KoOgwubFNjH2/uWW96DuMzmA1W4nqvAuFFuERA2OsYqzmU2qGB+bAR9bFk6xJJu3f19O 2hRxGb/OP55PO6PVnXTS+nXZSXGzX5teCy4D3JOB61a2/PjRzNJXwtAaDOUj17t0C2Dz UKl1dTWn2aVqcacq3LdEkyNDXXNi1gHHe/Ja4uE1pinAnKCnZ0k+0OfJYi6ePSzyJhW3 +6q6Op1v/Vyl+WAHafu356oiMapFzJimHf4F7QyZGf/fkYi4EDP3AJ/uNn0ADGfZ/uCp VuYQ== 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=Alp1pWbKZAr2nE7s9qPHYYzcij6PptSMfhnjLQ9x5bQ=; b=NN8Ba1iCNcF2vVsbZ/Fk8WCFtI6oYs/03k90eB7HYfdbcIo/e3lgffy0p/yFmfbAio 4GtDMC81FM+ibJVs8LQOHsciyGGwRSEqIH7evdW9V48dBofuHUQQiCTBW2SigzCyTVWH XUhb83sotU3uIP9PHR1w7pD/CN5YGoQW+Gm2OVc2yRlvMoohyEXbeh7yDoFO3sllLKcl ShL14w7mq0zL0z+5+31sJh8ETs9BDt3m1w0WBgU3TeayA41K/dFXuEUmknuwvoMeVQGD 2Z7+G/2fl67gxwSlEHEyknGXkXDAlG++q1WMGmP7ue0EILNz/kL0kr17pJ1meZRYvDgZ zARw== 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 l19si7672372oii.54.2020.02.03.09.15.28; Mon, 03 Feb 2020 09:15:40 -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 S1728237AbgBCO6A (ORCPT + 99 others); Mon, 3 Feb 2020 09:58:00 -0500 Received: from foss.arm.com ([217.140.110.172]:54336 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726224AbgBCO6A (ORCPT ); Mon, 3 Feb 2020 09:58:00 -0500 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 B008B30E; Mon, 3 Feb 2020 06:57:57 -0800 (PST) Received: from e107158-lin (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 355453F68E; Mon, 3 Feb 2020 06:57:56 -0800 (PST) Date: Mon, 3 Feb 2020 14:57:53 +0000 From: Qais Yousef To: Pavan Kondeti Cc: Ingo Molnar , Peter Zijlstra , Steven Rostedt , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , LKML Subject: Re: [PATCH v2] sched: rt: Make RT capacity aware Message-ID: <20200203145752.sqxpqse6pav4nxxv@e107158-lin> References: <20191009104611.15363-1-qais.yousef@arm.com> <20200131100629.GC27398@codeaurora.org> <20200131153405.2ejp7fggqtg5dodx@e107158-lin.cambridge.arm.com> <20200203053235.GE27398@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200203053235.GE27398@codeaurora.org> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/03/20 11:02, Pavan Kondeti wrote: > Full trace is attached. Copy/pasting the snippet where it shows packing is > happening. The custom trace_printk are added in cpupri_find() before calling > fitness_fn(). As you can see pid=535 is woken on CPU#7 where pid=538 RT task > is runnning. Right after waking, the push is tried but it did not work either. > > This is not a serious problem for us since we don't set RT tasks > uclamp.min=1024 . However, it changed the behavior and might introduce latency > for RT tasks on b.L platforms running the upstream kernel as is. > > big-task-538 [007] d.h. 403.401633: irq_handler_entry: irq=3 name=arch_timer > big-task-538 [007] d.h2 403.401633: sched_waking: comm=big-task pid=535 prio=89 target_cpu=007 > big-task-538 [007] d.h2 403.401635: cpupri_find: before task=big-task-535 lowest_mask=f > big-task-538 [007] d.h2 403.401636: cpupri_find: after task=big-task-535 lowest_mask=0 > big-task-538 [007] d.h2 403.401637: cpupri_find: it comes here > big-task-538 [007] d.h2 403.401638: find_lowest_rq: task=big-task-535 ret=0 lowest_mask=0 > big-task-538 [007] d.h3 403.401640: sched_wakeup: comm=big-task pid=535 prio=89 target_cpu=007 > big-task-538 [007] d.h3 403.401641: cpupri_find: before task=big-task-535 lowest_mask=f > big-task-538 [007] d.h3 403.401642: cpupri_find: after task=big-task-535 lowest_mask=0 > big-task-538 [007] d.h3 403.401642: cpupri_find: it comes here > big-task-538 [007] d.h3 403.401643: find_lowest_rq: task=big-task-535 ret=0 lowest_mask=0 > big-task-538 [007] d.h. 403.401644: irq_handler_exit: irq=3 ret=handled > big-task-538 [007] d..2 403.402413: sched_switch: prev_comm=big-task prev_pid=538 prev_prio=89 prev_state=S ==> next_comm=big-task next_pid=535 next_prio=89 Thanks for that. If I read the trace correctly, the 5 tasks end up all being on the *all* the big cores (ie: sharing), correct? The results I posted did show that we can end up with 2 tasks on a single big core. I don't think we can say this is a good or a bad thing, though for me I see it a good thing since it honored a request to be on the big core which the system tried its best to provide. Maybe we do want to cater for a default all boosted RT tasks, is this what you're saying? If yes, how do you propose the logic to look like? My thought is to provide a real time knob to tune down most RT tasks to sensible default dependong on how powerful (and power hungry) the system is, then use the per task API to boost the few tasks that really need more performance out of the system. Note from my results assuming I didn't do anything stupid, if you boot with a system that runs with rt_task->uclamp_min = 1024, then some will race to the big cores and the rest will stay where they are on the littles. In my first version things looked slightly different and I think handling of the fallback not finding a fitting CPU was better. Please have a look at and let me know what you think. https://lore.kernel.org/lkml/20190903103329.24961-1-qais.yousef@arm.com/ Thanks -- Qais Yousef