Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp512447ybz; Fri, 17 Apr 2020 05:23:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKVnBCPcZLZKD20joxAcboteiOu3c4Pb57Wpy6VgwkkugqtYSnHEXBjPFpjPCH/a5ivPxkD X-Received: by 2002:a17:906:748c:: with SMTP id e12mr2566590ejl.375.1587126210857; Fri, 17 Apr 2020 05:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587126210; cv=none; d=google.com; s=arc-20160816; b=WcuKrrfEX3Le5lLuBO5saalbr2aWHxJmSymjzzU14R77QgGZ5efVTfK6/OJMC8nsGB HgwEzt0HrGFDW80zBZR1xEB47xCWKywqSS7ST/WPk2VxE0iXLb2J7WtrLHnznUubcKK0 nC+IDc1CwfdGEa275hVde9rnzqcqbXEFDEA4pw8GjODh0JhB211aZ9QmsOo/7L71isqX /jopP70KNDrBHMIK7/C2qTKSjU7l3bRki7AQKagOauG6Iv3Lx/lIZcYK+4O34oeb5Ioo reNH3ZM4/pWeOH424zyXnS0P7qLyRP09j3n9VTa01C5hVOdq4hs/WKAmDJCvlQclNy2U CWsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=dAvAY7kidzmNvlsCwdf3voHC0ApsCK/J869Shf1r6TI=; b=vo2yoZFdGcuZfvLvNhdB44xpGYuyENOmidmT/mOIzdSXvjasd6hsYksvuEgIYdtL8w mbbcuojwFErcBrU96c19K9++Z1gKPveTqs8r91qZ1sv80C1cJVWcgo4tezYtrt98Q/uZ hfXRmQ704WyZdkqpJ0/0j/9KxxeBLSVdzk3YdiQpe1HgppR8Xeq3Zok+FW9taTn4oedF Q6ZFdJqDzmgpj7zIbO0Kr8Lv8kD8DFa2GwCV0KMlMIXP1NFJPh8jVSnpkwTq+CUsElJ3 vd9DfQn5Pv83d8xuCaFUZuWvrmnmgacZ5g1KT45/p/Ku+OUD8f6P7pcSbnotYvjHuJ8h nakw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ca3Nklzb; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si13171559ejq.430.2020.04.17.05.23.07; Fri, 17 Apr 2020 05:23:30 -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=@redhat.com header.s=mimecast20190719 header.b=ca3Nklzb; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728618AbgDQMTz (ORCPT + 99 others); Fri, 17 Apr 2020 08:19:55 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:57833 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726542AbgDQMTy (ORCPT ); Fri, 17 Apr 2020 08:19:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587125992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dAvAY7kidzmNvlsCwdf3voHC0ApsCK/J869Shf1r6TI=; b=ca3NklzbTg0LgFNfxe8HCfGyyVVaNfIYqJDQrPPP3n+Q/OIsMfuBEryC+BIu5U1ygLnqOi uNnXb4VmcJVggzeQpjo7RaNdfp8OF9P/BXjCVb8OtWmDwsQdmYAPmHE5W4xasM7mFhNP4F kPP7lHlubfdVV27XaVmD2f1g1pwzT1Q= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-319-PQ7yjlxiMwCNIvSF8HSRGQ-1; Fri, 17 Apr 2020 08:19:50 -0400 X-MC-Unique: PQ7yjlxiMwCNIvSF8HSRGQ-1 Received: by mail-wr1-f70.google.com with SMTP id j16so871243wrw.20 for ; Fri, 17 Apr 2020 05:19:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dAvAY7kidzmNvlsCwdf3voHC0ApsCK/J869Shf1r6TI=; b=uYd/+3fr9YHqcmYNt082zca6N1kVNJ3GT4tGv+oxXR+kaSa2ximxVRJXXI7TJd8vkP 3C1MjYwcfKKtRg0rluY+gDbFH3zzY/+wwwJhLcW41hEbFx2fq+vm8etm4Xnq692H4xzL L7qEFwcBlzvRYKXQ8SlwYoDXSz4pFJZWiuRd7V7/qK5V6aPPm2trCAeiesu2y7qj+Uob +Yfinql89ZGxzziNqp4lQEW4je+fJLOLOWB2vdacKoZOaZdlqUuTiLgdX79o1hNLGXlz qkjSGFLEYVuysAxRTrGTMrUjcXLkAnlgYl+uLqECgP9xj2ak/P0VYarbKfv6L35H8KS/ ci9Q== X-Gm-Message-State: AGi0Pua5rBH9kivlziJfnSqMeEIe6hFKoWh9wnJtBv7C0k2YvFHlru38 JkNj3y/IJyP67DVAGwdtCLwtVUk6G8UtYQm247M/4UwM7JNJUp2m/NtVRZ2vI3DgQToNpKSQlzb Up4PU+s2OAP7IRZvbMRFRNshn X-Received: by 2002:adf:f091:: with SMTP id n17mr3614536wro.200.1587125988946; Fri, 17 Apr 2020 05:19:48 -0700 (PDT) X-Received: by 2002:adf:f091:: with SMTP id n17mr3614500wro.200.1587125988687; Fri, 17 Apr 2020 05:19:48 -0700 (PDT) Received: from localhost.localdomain ([151.29.194.179]) by smtp.gmail.com with ESMTPSA id k14sm32506670wrp.53.2020.04.17.05.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2020 05:19:48 -0700 (PDT) Date: Fri, 17 Apr 2020 14:19:45 +0200 From: Juri Lelli To: Dietmar Eggemann Cc: Valentin Schneider , luca abeni , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Steven Rostedt , Daniel Bristot de Oliveira , Wei Wang , Quentin Perret , Alessio Balsini , Pavan Kondeti , Patrick Bellasi , Morten Rasmussen , Qais Yousef , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] sched/deadline: Improve admission control for asymmetric CPU capacities Message-ID: <20200417121945.GM9767@localhost.localdomain> References: <20200408095012.3819-1-dietmar.eggemann@arm.com> <20200408095012.3819-3-dietmar.eggemann@arm.com> <20200408153032.447e098d@nowhere> <31620965-e1e7-6854-ad46-8192ee4b41af@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31620965-e1e7-6854-ad46-8192ee4b41af@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/04/20 19:29, Dietmar Eggemann wrote: [...] > > Maybe we can do a hybrid. We have rd->span and rd->sum_cpu_capacity and > with the help of an extra per-cpu cpumask we could just Hummm, I like the idea, but > DEFINE_PER_CPU(cpumask_var_t, dl_bw_mask); > > dl_bw_cpus(int i) { This works if calls are always local to the rd we are interested into (argument 'i' isn't used). Are we always doing that? > struct cpumask *cpus = this_cpu_cpumask_var_ptr(dl_bw_mask); > ... > cpumask_and(cpus, rd->span, cpu_active_mask); > > return cpumask_weight(cpus); > } > > and > > dl_bw_capacity(int i) { > > struct cpumask *cpus = this_cpu_cpumask_var_ptr(dl_bw_mask); > ... > cpumask_and(cpus, rd->span, cpu_active_mask); > if (cpumask_equal(cpus, rd->span)) > return rd->sum_cpu_capacity; What if capacities change between invocations (with the same span)? Can that happen? > > for_each_cpu(i, cpus) > cap += capacity_orig_of(i); > > return cap; > } > > So only in cases in which rd->span and cpu_active_mask differ we would > have to sum up again. Thanks, Juri