Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp116715pxx; Mon, 26 Oct 2020 04:53:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEzVZB2k/HxcSZ5lyCRel9ZYu0N+NmBJQp2ntEOOObu5rjKppS8cMgaXdNu9/fAkvBk6g9 X-Received: by 2002:a50:f785:: with SMTP id h5mr13699971edn.249.1603713195766; Mon, 26 Oct 2020 04:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603713195; cv=none; d=google.com; s=arc-20160816; b=aj8eY215t/q25dHmP9r9BQtvf/PSGKrgYp4WaW7Ms0aKf0LBCGPHbkzd7wcyRYD4KQ kb+wPW3e8AFZalJA4Dn2mxeV87jizkrkhAAEpGGVRKWrRYUpZPHrwIEtDAVQc8PR5zf5 P2gt/hhc0egekl1Hz/+6IrPZnhlXMhB5GlDQ0bjACLlPJmTtIXIfWnzMSBvfeoNqqzyR zSkIuLAG3wEXa1nod9lpo6Gocy+XVdaLn3OzBY9svJ2d8UJa75ZJGIBkm4TLfCh2wblY QNgI4KHvrP0kgzGYKUNyu7qeGaw9iDgPjgyIfj0PshnzA5pKT/Mj3bFz4dBBPiKNSm0R Wbdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4q79d55ID3Bf9O2H+Un8Zr9ufQ3leLyMW7CEeiGEmtE=; b=txk39zlhbkkPLx8PtVtV9XQnedE2dHo2RX8Ye2VjaVLXk8p/O/o4IchH9XDqP1eSIF z49dz1NhSGRxvcJHRPdP9Dfr2b3cJ2QgaxOHqIJd2YL0TCw/dM9d8cGzGYIUMOYkVVIK dBwPCbad8fGyQ2bJgqyskYhkeQJvW+CzgY1GMMsslE44rAo4SZGWLt6PBgXrJT4uDzTA M3qipYnerDN8zw6GPSTvhRKq0wRrP7XE3aG+41ujwS4yPdff2kZ+zZQvj51LlVw32VeV 0QnPagwJKe+k9av0HNUbxurpYUzw0Bx7DMFbqUXoAVSM883uK5idmUXTqsGJkeBL5/u2 iqFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XBdr2Iku; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l63si7732488ede.607.2020.10.26.04.52.53; Mon, 26 Oct 2020 04:53:15 -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=@linaro.org header.s=google header.b=XBdr2Iku; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1771687AbgJZI2B (ORCPT + 99 others); Mon, 26 Oct 2020 04:28:01 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:39334 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1771683AbgJZI2A (ORCPT ); Mon, 26 Oct 2020 04:28:00 -0400 Received: by mail-lf1-f67.google.com with SMTP id 184so10636214lfd.6 for ; Mon, 26 Oct 2020 01:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4q79d55ID3Bf9O2H+Un8Zr9ufQ3leLyMW7CEeiGEmtE=; b=XBdr2IkuNHK2a0R61eLOEMb/qNEha7Oxs9+R/wiQRJeZUF3cIousXkxwQdgl15gzVA Fyc0Vr3A2hO2cDOIaoH6TGTBWsnak1pZCaSKMJoeCcg8Vxolc1IymOGLyS7kW4c0mKto hmuA0xrfDwI+hONsw1TjVSUhjL96t+raB2fO62AGghwKuplvvYiIxqiBgQaft/Yickh1 phdZu4XRvlKMKWBx0xifEbVjBoxkdQfKlZAOO9QKAXy554M1uiE9ImglWqBs9wEhQGkJ A+NPg8XvX6EV5sN2ju+AeGHoKCKQ6hTkWNvJFgjyxIyr5s9d0Qj6MCA1ofa6/MBBdmhD vTjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4q79d55ID3Bf9O2H+Un8Zr9ufQ3leLyMW7CEeiGEmtE=; b=Ay7ehjjd6tsT2GRf9mwG/3iohGFkSKTS0wJ/G37YD/cC0RS7d1fns3SUo6DsfPU1qX YkdvCzQ44B5F3LbRdSzrPBTP9TycMwog03PD3fiCVK3jNDNSf8brOrW5mUcXlrAp5x0m 2JG54xHsnT3mwffvJtlU/3mN4ZlF06XUSeZC1qkwsFf9irnItSIsrSRu1EEn0pU697wa gx3jHVzswwz3f84XUeKjCB+kXfyI8dqSoMPpWi69VrmUfRnJVozVBZ7zasPyJGhaIex7 hHZhWADaIyZziR+3RxB6t31fXyB7C1ICfYkZ2HuMzJ+G1+2ALX9HVAmTnTvIHvP3/0yB Hi4w== X-Gm-Message-State: AOAM531XZN1atw0sbqYf8y8MBvYFB8M4r+CLVo4cCkXa770hMGkPqtT/ P38jwqA3t2QarvycQkcEwuWaD+5qZXS+HfUOb4Wcbw== X-Received: by 2002:a19:4a88:: with SMTP id x130mr4401986lfa.31.1603700878745; Mon, 26 Oct 2020 01:27:58 -0700 (PDT) MIME-Version: 1.0 References: <20201022134354.3485-1-vincent.guittot@linaro.org> <2a2699ee-e62f-1590-c846-009af0478c59@arm.com> In-Reply-To: <2a2699ee-e62f-1590-c846-009af0478c59@arm.com> From: Vincent Guittot Date: Mon, 26 Oct 2020 09:27:47 +0100 Message-ID: Subject: Re: [PATCH] sched/fair: prefer prev cpu in asymmetric wakeup path To: Dietmar Eggemann Cc: Valentin Schneider , Ingo Molnar , Peter Zijlstra , Juri Lelli , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel , Morten Rasmussen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 23 Oct 2020 at 19:14, Dietmar Eggemann wrote: > > On 22/10/2020 17:33, Vincent Guittot wrote: > > On Thu, 22 Oct 2020 at 16:53, Valentin Schneider > > wrote: > >> > >> > >> Hi Vincent, > >> > >> On 22/10/20 14:43, Vincent Guittot wrote: > > [...] > > >>> static int > >>> -select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) > >>> +select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int prev, int target) > >>> { > >>> unsigned long best_cap = 0; > >>> int cpu, best_cpu = -1; > >>> @@ -6178,9 +6178,22 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) > >>> > >>> sync_entity_load_avg(&p->se); > >>> > >>> + if ((available_idle_cpu(target) || sched_idle_cpu(target)) && > >>> + task_fits_capacity(p, capacity_of(target))) > >>> + return target; > >>> + > >> > >> I think we still need to check for CPU affinity here. > > > > yes good point > > We don't check CPU affinity on target and prev in the symmetric case. Yes that's what i have noticed while reworking the patch to merge asym and symmetric > > I always thought that since we: > > (1) check 'want_affine = ... && cpumask_test_cpu(cpu, p->cpus_ptr);' in > select_task_rq_fair() and > > (2) we have the select_fallback_rq() in select_task_rq() for prev > > that this would be sufficient? > > [...]