Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8557349imu; Fri, 28 Dec 2018 22:03:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN6hc1aDbB7PhQDJzrmTcG8pwiQcwKCn/27nsszYJucqiB4Y0z+bVVtk24ca746lVpdu7eNX X-Received: by 2002:a63:d904:: with SMTP id r4mr28888217pgg.207.1546063401563; Fri, 28 Dec 2018 22:03:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546063401; cv=none; d=google.com; s=arc-20160816; b=rB+6ejOOCztr7VCnLtut9yXbyU1j/Y0xJMGeQ9xFEA6aAxunSs1msDXZZ+yNY5j9Z+ 91xKeORMwJFMs47rfI60/4ORZVCt/brepylervaV3K8vuYonsoCr7Nf3uz1wpNJWiFma YU9CiSWUoeUC7JK5Q+p0ozZqLMzBZX0Cqq9oFUYbOnEGKHRZ09HsB/P5r8w/K9odWZTz Ys2TQPLSqkuzq/HzQMN5VbZrK3K+t1uhCjHhVFhcw8POm0Dh3/sHkYtuszTF0gRpwpH2 /e87Ap80WZBUqTxMpBnahStJoDV1BSi44RN7Hnb+bz1rWTvWwzwpmgMxIkB6IMbJJ75X dCqg== 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=hO6btzCMrspbbGuA4t1Dn1GB/cNGFTn7DeTiFHCdvBU=; b=Kw4itafTLO7r2kVr6wuZf6hmhjItmdZ12AY4epzL7PPRU3cDUdD98Q2gL+mWE0NjPx i+7e8URZuKkIMwHfMZWS8jqGKm9OO3sNmAPf1HTWGeyoCgM6ysw9Hgc1R1ScOEW0zkby urdoAPEU01HrpUY/2PEPX/zZo1s4fUsTrf+sq24txkyAvvYRKJ6akD2+uRyZORO24m4l cOG89AqM3+nazWPV9L2uAzv5+oWPQLyXqMYysY5y+LXuVat0fP3GdKNE9324wmTXomBC KjSoLBDm6TiGdUCl12xqBR+s9tCewQnJqanuZbTqyCugxGcvNUvYBRo3wlAPic2ePUxo RNRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dfDvSkd5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l61si19552448plb.6.2018.12.28.22.03.05; Fri, 28 Dec 2018 22:03:21 -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; dkim=pass header.i=@linaro.org header.s=google header.b=dfDvSkd5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387638AbeL1SEg (ORCPT + 99 others); Fri, 28 Dec 2018 13:04:36 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:39696 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727957AbeL1SEg (ORCPT ); Fri, 28 Dec 2018 13:04:36 -0500 Received: by mail-it1-f195.google.com with SMTP id a6so27848056itl.4 for ; Fri, 28 Dec 2018 10:04:34 -0800 (PST) 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=hO6btzCMrspbbGuA4t1Dn1GB/cNGFTn7DeTiFHCdvBU=; b=dfDvSkd5V25EW3j/plGIf7nrV7UTYCBPpnkRpYNlaTUojd3kgEeaF17N5COXvb6tUs 1rvtoomCjVSECjICQa1cs4/bUBCXrKqYVR2EP2GkmQ16USswGLfAYu3AW/ScjZY6F6o/ ZTs4IeHx1ENzoqIEK96Jn6rRB/hBi4zXfMN8A= 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=hO6btzCMrspbbGuA4t1Dn1GB/cNGFTn7DeTiFHCdvBU=; b=pdxWz07xXXAhL3+IrGVaVgSrvyV3gKY/h70Vm1q1KWorLHEBKPcfjFPRjE2j8fWJqu PxcJzuTUKtDjB5HvhLW7pyTXQjvsgdLf2RCJKj1p2OmjxGWBbrXQ/En67Nki8JN4iPDt TCH4CSw2Je1zvFGLAr94UbS2cHESdffvk8+BxMkLQNRifst9kmiJcvOoQIvk0r8OWD+5 +gQ+uHDjMMeJWdvqGIT31FFb3pvhi0SbR/9/6mDVx0MRufqzyc3mRLMlHhbNftAlMJlO 5VOIDpYgJAkj0ASL50Ln6mzDvi1hqfXoemueWY60755mqTI1UiEcS03/IppGNbk1Ry5k ytDw== X-Gm-Message-State: AJcUukcDnvmRLf9YFfyuhZ5Lg2QHOS9skSvswL3OzprI2ZacnWqkzmrQ hRVfXCahJMD4FRl+1flNG11RlDFUk0LmYrF9N21dzQ== X-Received: by 2002:a24:a20e:: with SMTP id j14mr18878734itf.14.1546020274084; Fri, 28 Dec 2018 10:04:34 -0800 (PST) MIME-Version: 1.0 References: <20181228011524.GF2509588@devbig004.ftw2.facebook.com> <20181228015352.GG2509588@devbig004.ftw2.facebook.com> <20181228020243.GH2509588@devbig004.ftw2.facebook.com> <20181228165451.GJ2509588@devbig004.ftw2.facebook.com> <20181228174600.GK2509588@devbig004.ftw2.facebook.com> In-Reply-To: <20181228174600.GK2509588@devbig004.ftw2.facebook.com> From: Vincent Guittot Date: Fri, 28 Dec 2018 19:04:23 +0100 Message-ID: Subject: Re: [PATCH] sched: fix infinity loop in update_blocked_averages To: Tejun Heo Cc: Linus Torvalds , Sargun Dhillon , Xie XiuQi , Ingo Molnar , Peter Zijlstra , xiezhipeng1@huawei.com, huawei.libin@huawei.com, linux-kernel , Dmitry Adamushko , Rik van Riel 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 Fri, 28 Dec 2018 at 18:46, Tejun Heo wrote: > > On Fri, Dec 28, 2018 at 06:25:37PM +0100, Vincent Guittot wrote: > > > done without extra space as long as each node has the parent pointer, > > > which they do. Is the dedicated list an optimization? > > > > It prevents to parse and walk all task group struct every time. > > Instead, you just have to follow a linked list > > Hmmm... I'm having a bit of a hard time imagining doing an actual > traversal being a meaningful optimization. It may require more > branches but that shouldn't be expensive at all, especially compared > to walking all idle groups in the system each time which the code used > to do. Anyways, this is tangential. > > Thanks for the explanation and happy new year! Happy new year for you too Thanks Vincent > > -- > tejun