Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp753240ybz; Wed, 15 Apr 2020 18:12:25 -0700 (PDT) X-Google-Smtp-Source: APiQypLYzxSop8okJKPXntNLoI5zEOkarSJkkwqaT2Bn/ZK4ir5t16OtL0ZHk6ZPSnHHwP7F0KLZ X-Received: by 2002:a05:6402:1243:: with SMTP id l3mr25915502edw.280.1586999545520; Wed, 15 Apr 2020 18:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999545; cv=none; d=google.com; s=arc-20160816; b=Yjgpwz328gmobwZGgbBdDc5VlERC1gMB0XNaUZhTYHqOWoq7xndKuGyc9JREbKR3Tt ovebMJ5yFeT0MJRcX5hpzQR1faNfxI9dJoYDLGZcElvfNWgHb7uiPscrgjVqTDrXhaxO MOO5+ZhfOsZ1Z/yWoGR1uRQ2Xk0tn6PEsKyVavcgiWVi2zLqbbXtLVVoYc1pUmbcOEW+ Pc6+Z4eSr1J6pFdJPNpdEXA/1b4qtErPRDRtvPKnjMvbJqZafjuZ6vUbrngIp6r2uvkx eGW7XdQw9bwJkDcoRXR6NRJoTA24W7bAzStV0Rva3l1/iOowJoQZY6oUVe7tYgdPBZPQ K4uA== 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:dkim-signature; bh=NxU2EAet1tn2ZKgYk7KLjPbGkAJNTRyOlp80JE9Vobo=; b=04dKdAz4+OAc+CvPfDmCXnR+V9BCbpU+dlJRtOItK5f0fCodwJaiNnnoLB8vRF+n0Y DvIRGjD2ym35S3dDp7yP1rvvBm/fAhRoNYV73Z4EwNXQAPsUGQVKo2HO8pjkhlnMoVLC Ci95xKAPFpOTGGrIXaVd5Qu2Lz9M77QmD1l4foDt9JJBaefrRUFhpFSaTf2+okA2wDJb HMZ1XFRhxjvNMJwiOR8gN+FdSaTClS9FpmcRu8sonyrvSFwIeX8eHQvqAFpRg7TxkSme PNJL5TzvHzz0R2Gk4+gkvl8VVn8GkabdNGyMlpZjVtexTMP7VvoDcQLAKcLKfqVUsLo4 LnlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@digitalocean.com header.s=google header.b=fKNpbLbn; 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=REJECT sp=REJECT dis=NONE) header.from=digitalocean.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id me19si3657975ejb.140.2020.04.15.18.12.00; Wed, 15 Apr 2020 18:12:25 -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=@digitalocean.com header.s=google header.b=fKNpbLbn; 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=REJECT sp=REJECT dis=NONE) header.from=digitalocean.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439061AbgDOVZJ (ORCPT + 99 others); Wed, 15 Apr 2020 17:25:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2438998AbgDOVYn (ORCPT ); Wed, 15 Apr 2020 17:24:43 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59ABEC061A0C for ; Wed, 15 Apr 2020 14:24:42 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id m2so1345003otr.1 for ; Wed, 15 Apr 2020 14:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digitalocean.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NxU2EAet1tn2ZKgYk7KLjPbGkAJNTRyOlp80JE9Vobo=; b=fKNpbLbnplbjAmd7tX3Tt7+9GboeLayjSU2crm8qh0/T2uz6k2lAXU1z4cPNJWyrOz k/DHv2zmyf2oX1lpjweTMuVdNaUuYq1hDmzXyZs8x6BvxwuO/3lRnGYMzgTIEmBWTFpr 3GQOr5ICDJ49h077iX6ZiqNJ1Ii8wS1woQ96k= 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=NxU2EAet1tn2ZKgYk7KLjPbGkAJNTRyOlp80JE9Vobo=; b=livlAn0YHZx+h7pOnrZ6wjHNDZ08mTfe1cGedhe0IkVC+E66wwLptVUUPb5PjYxFKk 4INTXY8YF6iEGlCKJFCpbZbE+GXDukdTH+zS+bAyWSj8AA5Avh/cSQnLQiiwXUk+gvl0 txLbGcvweI0xoq4Qvkl1h3HeElSU8/8ccgqUyXkKnpAwtBJhYWiLAdU0NuuADDn7muyN aSiG4ccHisX5snYzv0mS9xY5ZByLGR9H0oUbEbM/BDh2EeeLN0ajjQiCz14zHCsTVUIM Ni4mUtLw+f3a08Pryr/YVApt4KiFuAFMeCrEBYkIseHsHYYsLG3ZDsiS/95zUtNyRQ5C a++Q== X-Gm-Message-State: AGi0PuZYt45sTkzaMbqaQEAwTyt+e+0KB5cmhXSUy3nj2J62R4FhhKXr CUvLFF5x2Y50HQ7SAt2x2iidkRjMreYuUc8sH5AdUA== X-Received: by 2002:a9d:6252:: with SMTP id i18mr2486405otk.33.1586985881637; Wed, 15 Apr 2020 14:24:41 -0700 (PDT) MIME-Version: 1.0 References: <2f83d888890cec14be3a7aead0859dceebb4012f.1583332765.git.vpillai@digitalocean.com> <20200414135624.GU20730@hirez.programming.kicks-ass.net> <20200415033408.GA168322@ziqianlu-desktop.localdomain> <20200415040741.GA169001@ziqianlu-desktop.localdomain> In-Reply-To: <20200415040741.GA169001@ziqianlu-desktop.localdomain> From: Vineeth Remanan Pillai Date: Wed, 15 Apr 2020 17:24:30 -0400 Message-ID: Subject: Re: [RFC PATCH 09/13] sched/fair: core wide vruntime comparison To: Aaron Lu Cc: Peter Zijlstra , Nishanth Aravamudan , Julien Desfossez , Tim Chen , Ingo Molnar , Thomas Gleixner , Paul Turner , Linus Torvalds , Aaron Lu , Linux List Kernel Mailing , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Kees Cook , Greg Kerr , Phil Auld , Aubrey Li , "Li, Aubrey" , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , Joel Fernandes , Joel Fernandes 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 > > > You forgot the time complexity analysis. > > > > This is a mistake and the adjust should be needed only once when core > > scheduling is initially enabled. It is an initialization thing and there > > is no reason to do it in every invocation of coresched_adjust_vruntime(). > > Correction... > I meant there is no need to call coresched_adjust_vruntime() in every > invocation of update_core_cfs_rq_min_vruntime(). Due to the checks in place, update_core_cfs_rq_min_vruntime should not be calling coresched_adjust_vruntime more than once between a coresched enable/disable. Once the min_vruntime is adjusted, we depend only on rq->core and the other sibling's min_vruntime will not grow until coresched disable. I did some micro benchmark tests today to verify this and observed that coresched_adjust_vruntime called at most once between a coresched enable/disable. Thanks, Vineeth