Received: by 10.223.176.5 with SMTP id f5csp1016666wra; Fri, 2 Feb 2018 09:46:04 -0800 (PST) X-Google-Smtp-Source: AH8x227yWydb1W2bO62fG5j+iTpw+F45O5v8AFXkIJYPuSDb35QZRXmjr1k6ArTjmkoQ8U2prhUb X-Received: by 10.99.117.1 with SMTP id q1mr31982130pgc.350.1517593564173; Fri, 02 Feb 2018 09:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517593564; cv=none; d=google.com; s=arc-20160816; b=Kx0M0/AQI9nNOV+K7zQ3pOzNhuK6f/JM7a53TS49Ekxs3uPiVP0qyl7bVFweg4BfR4 VEofqTCsBTScGWpFvKfyzmFl8/CHFTWqTNC/f1ZNcxhAXIoO3weiN/4yLTA0M+6DBU1W FPGrbGHjQCVwygKGW2GPEhduTQfDY70GEvQ9igULMjbno1yjmx0iGXTBZN/kYcLHjA1F wXdhAHsjLNgzZ/b5rRwgNHvD8qSrGUW/DVEPfTndPKelxP2ibZLjO8Fu6FX+HJdXMll9 ailB9swNUrkEr5ccmqM00GRzDD3CK2Ja3rtb7C8JOBqGbi6zcEMOGJAYuJfeSI8Lgqf2 UHOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=wPbs8+aMPWlZ5a3Qv/a5iJOHm76VG1Zeyt4OoXbJhsw=; b=PEOQM+eLgHO6yNC16AZTdbMzJplRkRDreaIpiZFuRqQad5u0eBlPbnlX1d2mYVZm/T HJ93tBfBwoUFHUDD3C1F9YMKhkZQkLI0XO508DQx8e68y9KoM+kfh7OilCspQwYWEpwb GcmhLHZc60Dxoy3Nr3KZrcVFlU3Gx8d86014qv54G1kUtb1Yi/KUnY7rsv4+V1SsmU6a tuZYIvJAIqO+xpkOqMC+1MUSV9bdgy5SYFDWslCI0/6R/WmTeWxPaLkODSi+yL0DWlpa GuDACeUTHQQNvnrhXpW9GQtweUmL8uVea3jFbzMWVdYn4PotdF3KzVE6RzjgEBnuWhct KNew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=ZcLbvFIT; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1-v6si2125478pln.220.2018.02.02.09.45.49; Fri, 02 Feb 2018 09:46:04 -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=@oracle.com header.s=corp-2017-10-26 header.b=ZcLbvFIT; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753497AbeBBRoD (ORCPT + 99 others); Fri, 2 Feb 2018 12:44:03 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:50932 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753365AbeBBRmU (ORCPT ); Fri, 2 Feb 2018 12:42:20 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w12Hg4BL146141; Fri, 2 Feb 2018 17:42:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=wPbs8+aMPWlZ5a3Qv/a5iJOHm76VG1Zeyt4OoXbJhsw=; b=ZcLbvFIT8u5WAG4KzHT5Fuxzd0DoBEB7BAfdNHtpJDQHM8eO6p8PHrk5ThAicOBH4exY vZTptQUzjlU7XZHWZEZzSO6oLygpx+kTuobwa6KsMC8pDT0cm8zoRGueiw9u+Dew/qwQ HksfBB6nj7xuKHtAU+5hmDfqEzDyGkGpebH7VEFh2/7SgV9yI8lM0pIUQvg/TeC76co1 wC9eqcLZY94g3V2recH8GBJO3OIIe9S5tJA8kT7GSvpvQVhC28PhM8UUlNOnnbED7/5s HJAWGP45A3bhPNUTYgWu4hdVNGb4dE0qf6SOmwWQXXe8cmocE14AmOMClOUIx2bFZ04m Vg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2fvv5803uh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 02 Feb 2018 17:42:03 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w12HdPmW012095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 2 Feb 2018 17:39:25 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w12HdPgB031029; Fri, 2 Feb 2018 17:39:25 GMT Received: from [10.39.253.191] (/10.39.253.191) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 02 Feb 2018 09:39:25 -0800 Subject: Re: [RESEND RFC PATCH V3] sched: Improve scalability of select_idle_sibling using SMT balance To: Peter Zijlstra Cc: subhra mazumdar , linux-kernel@vger.kernel.org, mingo@redhat.com, dhaval.giani@oracle.com References: <20180129233102.19018-1-subhra.mazumdar@oracle.com> <20180201123335.GV2249@hirez.programming.kicks-ass.net> <911d42cf-54c7-4776-c13e-7c11f8ebfd31@oracle.com> <20180202172153.GO2269@hirez.programming.kicks-ass.net> From: Steven Sistare Organization: Oracle Corporation Message-ID: Date: Fri, 2 Feb 2018 12:39:20 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180202172153.GO2269@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8793 signatures=668661 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=993 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802020216 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/2/2018 12:21 PM, Peter Zijlstra wrote: > On Fri, Feb 02, 2018 at 11:53:40AM -0500, Steven Sistare wrote: >> It might be interesting to add a tunable for the number of random choices to >> make, and clamp it at the max nr computed from avg_cost in select_idle_cpu. > > This needs a fairly complicated PRNG for it would need to visit each > possible CPU once before looping. A LFSR does that, but requires 2^n-1 > elements and we have topology masks that don't match that.. The trivial > example is something with 6 cores. Or keep it simple and accept the possibility of choosing the same candidate more than once. >> Or, choose a random starting point and then search for nr sequential >> candidates; possibly limited by a tunable. > > And this is basically what we already do. Except with the task-cpu > instead of a per-cpu rotor. Righto. Disregard this suggestion. - Steve