Received: by 10.223.176.5 with SMTP id f5csp1004171wra; Fri, 2 Feb 2018 09:32:43 -0800 (PST) X-Google-Smtp-Source: AH8x227Ipvnpob+nOi0ljY0mn1iUSajwL4vKCVXvPPMnA5RK5R7HyN/daYKURalRdKAwJaT9Rj5r X-Received: by 2002:a17:902:36a:: with SMTP id 97-v6mr36662048pld.365.1517592763260; Fri, 02 Feb 2018 09:32:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517592763; cv=none; d=google.com; s=arc-20160816; b=AELUxfjI9aelmX8trT2c8YtO1SE3yigVvW5luFLGNVTwqpcnqsjaH3sV/rHwqFU0w8 bwhBNHPrDc3jn41VrLR+NPjDsJTr5+qkGhSFIOLtX0ShfJkfj6fkBn6mbkbMG5JELdS9 4EMNFWEbcywgVHGFxlz3gj1ocLcUWuuuUGkwvmVfgDW67XzTPNhim7sySkeHjowyhg7F ZJqRN5eYBIufZ5qQDVpvo1x2cyreA8KonVJKpetOly2usypdVhLtSq2KDUkSLnP4VhBv eMDzDGgPFPkfxEUwyyQj8/r8N4KavBaXluKRsnGuOHzsne7laSeQGbkKqhRbi9O7Yxzb kugA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=d7/mg3u3gy20VjFg15UUBTeo1A5ethLZS58p6XmOOLg=; b=FpiJdshk/er4qMizzjvZI6hTrWxrddDrlIMsVL2YW5bczjXWgPuL6o5ndxNY4/rNvz KJBY05mhymJmvltskhQg/VnZmhokf4sPYNgcZl7xQKZwd6J8oUmwBVEy5Pkf3s4vEqgX L7AwiCzVJCdUkppIkgGWUUjr2gZTxah5vFaVvlT95q56ETTRjMuG9Jcgx1J9+GfhpwZL zdiLA6FHNmUUqwnIXeJw2HQ0bxxR5nU3u03YBxhuU2Fd+XCCGiQ6kkZu/2CtIrizKe3D usjtlJGccHQ9L7kNOG5PWIaGGLQH183CJye6YkzsvGwETkjc26rZp7Z5h/mvOnCHicj/ X3Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=zKEnj3ct; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e29si15976pga.146.2018.02.02.09.32.28; Fri, 02 Feb 2018 09:32:43 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=zKEnj3ct; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753551AbeBBRat (ORCPT + 99 others); Fri, 2 Feb 2018 12:30:49 -0500 Received: from merlin.infradead.org ([205.233.59.134]:35960 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752378AbeBBRV7 (ORCPT ); Fri, 2 Feb 2018 12:21:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=d7/mg3u3gy20VjFg15UUBTeo1A5ethLZS58p6XmOOLg=; b=zKEnj3ct3uzezFQZgbEvh4F9c LfeK43my0UZ0rvbe9GZ04z5JamrvdBSdKjKoOjLg7kly+W4VTCZAtgafPheTrV126OaQlSoVlJbqn Mik8kACFv0eMxUUca8Tc3DKCZ6gUxnsvEoz2QvYL5dLgfkGcBlS5rPMj47fDHTyt7gzOcwIUcRSQz n/ifWei+zWy/5W8dydhXofyrYqtPfEc/RJh1UAkH++p4ho007qFQRf5AwdZ2D3FDismmRNzYXbTXC Mg/OV54hZf3lnT2PxvfWnmot+PYdPfTkA4CnKQoD40ca1cI7/ZDw8/jShdJd87MYMvR6SZbfPmUyl WnKiyCd6w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ehf2B-0003Eu-PT; Fri, 02 Feb 2018 17:21:56 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 7B5012029F9F9; Fri, 2 Feb 2018 18:21:53 +0100 (CET) Date: Fri, 2 Feb 2018 18:21:53 +0100 From: Peter Zijlstra To: Steven Sistare Cc: subhra mazumdar , linux-kernel@vger.kernel.org, mingo@redhat.com, dhaval.giani@oracle.com Subject: Re: [RESEND RFC PATCH V3] sched: Improve scalability of select_idle_sibling using SMT balance Message-ID: <20180202172153.GO2269@hirez.programming.kicks-ass.net> References: <20180129233102.19018-1-subhra.mazumdar@oracle.com> <20180201123335.GV2249@hirez.programming.kicks-ass.net> <911d42cf-54c7-4776-c13e-7c11f8ebfd31@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <911d42cf-54c7-4776-c13e-7c11f8ebfd31@oracle.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, 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.