Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3478425ybi; Tue, 18 Jun 2019 01:13:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqz22P1gX7Q90tIahiiVAzf5WWVD2GY8Hcop22UlhxY6uz7xqzuAEXZNtE+/X35PEAZgEYo0 X-Received: by 2002:a17:902:aa88:: with SMTP id d8mr101044537plr.73.1560845625347; Tue, 18 Jun 2019 01:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560845625; cv=none; d=google.com; s=arc-20160816; b=ww85b0gYkX16mqrcNeSBN7DQ1GKGqVo08CNlNwAh57J5PB/DxWQaguJGUyc2lP1uz4 744fs+ruqgjEkc2SbhpzipLkRa3iH1DPH9sNgP1JU18fxiOhrNqqHMRpwMMVuT+SXVl+ 2qUGhkOJDh/bkMlykqcJrOzdtSoqm1CXyM/i+jzRG/0R4UfGsOOquMsRQAEjnEfycDXF TBDAOq46Vo5zUl1pSzyiN3tzQZ+LuguhyZnr2WMgI6JA9yQonnkuLzUEo0YivfeFF64C YPxLDh1XxSGzsxPyTNfufpQ3oLjPX7sNkwOxAwK7c/Vqa2BokGgHNR9YSIgpBv8WnSiG H1bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=Bwuz1jz3NpU9TY+ZYcwRD292nhZomipixuLcO9OcUYk=; b=rIFRJbQ1K63bluwj8QRLCi4UTawijBXVzhr7y7EXoZiXXRGPYGkaCvjpcEmUzty/r/ +WAGiyZDU53gZDA38EM3ezqhgiVLImKhJCw+2iHYoyBLSrBJTSGKG88iuFE268K4PDa6 jRbVLfii1JEpmOiJ6hBG/cpD0ojgJmW4AlYhdQkqRvOmq4KQpSxOWw8f6DpR9IIKV/Oa d1rwc9NoRPWv+zEcT/P60YdLSHCHnfr1EMCS+6f9p0uqFmByvNvzMx4pprEGQjW8MKYU jbqL2p2+Iv8p1pTXX/vHuad2OWwtD0pCVe62IsiMC6dvcLjQemjKXH4kjtXO5ep8jiGn 7LQg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si11837276plm.168.2019.06.18.01.13.27; Tue, 18 Jun 2019 01:13:45 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729002AbfFRILA (ORCPT + 99 others); Tue, 18 Jun 2019 04:11:00 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:36178 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728965AbfFRILA (ORCPT ); Tue, 18 Jun 2019 04:11:00 -0400 Received: by mail-ot1-f68.google.com with SMTP id r6so13085624oti.3 for ; Tue, 18 Jun 2019 01:11:00 -0700 (PDT) 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=Bwuz1jz3NpU9TY+ZYcwRD292nhZomipixuLcO9OcUYk=; b=A6Fx1Gfd8ygspt+euNqRqm4/acd2zaDknIUBOqlRMuhQ9q9IG6g92SQPF/ycESuvFL 6SoL5AnGYB+71sPXlrgU5x2ee8Qm4KhLep0I6KGhiQSIk298hQak9YU7w04qEVnko/1m X6fqkgrBomShGKRZYjL1SkwVfDRHpngIvhDTJwjBpIsA4z/35i7m8bc/B0imfIyn5q+T u08dA8jjo5XCkPTXJSu64MUZUC8tG0xkEyPuCeyLA9QbNi9PwhlSQLLSHyAXvqu0urgi xI8b+HfVwCQcjCaB6koAe3c1ypgDJvEP3pUtFfAlRWwENKcSYWxoEDBFV7ahMVomYMeb jwqg== X-Gm-Message-State: APjAAAVL2tpxxYUkK+I7xRJ0J3xL6FNNVgY3JXf6iZUav/9XtIP3WXLf 7um1UBxSzdAXkPpFYP8dSMuVSh2URpF2XUNtsgU= X-Received: by 2002:a9d:5e99:: with SMTP id f25mr34870526otl.262.1560845459845; Tue, 18 Jun 2019 01:10:59 -0700 (PDT) MIME-Version: 1.0 References: <20190605091644.w3g7hc7r3eiscz4f@queper01-lin> <20190606025204.qe5v7j6fysjkgxc6@vireshk-i7> <20190617150204.GG3436@hirez.programming.kicks-ass.net> <20190618031217.63md32da5pzydqia@vireshk-i7> <20190618074728.gf6wugkbndhhcqql@vireshk-i7> In-Reply-To: <20190618074728.gf6wugkbndhhcqql@vireshk-i7> From: "Rafael J. Wysocki" Date: Tue, 18 Jun 2019 10:10:48 +0200 Message-ID: Subject: Re: [PATCH] sched/fair: Introduce fits_capacity() To: Viresh Kumar Cc: "Rafael J. Wysocki" , Peter Zijlstra , Quentin Perret , Ingo Molnar , Linux Kernel Mailing List , Vincent Guittot Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 18, 2019 at 9:47 AM Viresh Kumar wrote: > > On 18-06-19, 09:26, Rafael J. Wysocki wrote: > > On Tue, Jun 18, 2019 at 5:12 AM Viresh Kumar wrote: > > > > > > +Rafael > > > > > > On 17-06-19, 17:02, Peter Zijlstra wrote: > > > > On Thu, Jun 06, 2019 at 08:22:04AM +0530, Viresh Kumar wrote: > > > > > Hmm, even if the values are same currently I am not sure if we want > > > > > the same for ever. I will write a patch for it though, if Peter/Rafael > > > > > feel the same as you. > > > > > > > > Is it really the same variable or just two numbers that happen to be the > > > > same? > > > > > > In both cases we are trying to keep the load under 80% of what can be supported. > > > But I am not sure of the answer to your question. > > > > > > Maybe Rafael knows :) > > > > Which variable? > > Schedutil multiplies the target frequency by 1.25 (20% more capacity eventually) > to get enough room for more load and similar thing is done in fair.c at several > places to see if the new task can fit in a runqueue without overloading it. For the schedutil part, see the changelog of the commit that introduced it: 9bdcb44e391d cpufreq: schedutil: New governor based on scheduler utilization data As for the other places, I don't know about the exact reasoning. > Quentin suggested to use common code for this calculation and that is what is > getting discussed here. I guess if the rationale for the formula is the same in all cases, it would be good to consolidate that code and document the rationale while at it. Otherwise, I'm not sure.