Received: by 10.223.176.5 with SMTP id f5csp432085wra; Tue, 6 Feb 2018 01:13:33 -0800 (PST) X-Google-Smtp-Source: AH8x226bSOCHAqYVQBsyvqpBczN8/9Zh1KeJd5XVLQy/jx50Oi5/IKmU4rIb9q6y+K+OC5sdiV74 X-Received: by 2002:a17:902:2bc5:: with SMTP id l63-v6mr1789032plb.108.1517908413659; Tue, 06 Feb 2018 01:13:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517908413; cv=none; d=google.com; s=arc-20160816; b=A2Pd5rwyu0AjVYG5OKfvWrIbrbRdOWUiteHxKXTvZzTQou/a8Xw8+jhu/LsOa9zBQn oPE8+kFCguX9xGH+ycql9Z7H1miB2wNlkh9kZYqP0dOj34KtDeDo0MRP6SouQaE6/5jg ubAzkBwlLvs5K0+NoqpLJKUq6CCYD+t/pEdq1SiDa93C32SkvnpwT9o3ip9G4InoXmd+ e7z2XQyJ8ProIq0XhxV3NqMhehpbKKj2gzRnhaCK0dhVLgPruUReXUFmkXphSfiYHx0T lVOaPL+wA5n7ZfKgRjUe+7F643RrDO85OfbJvR9t/Pcc8ZjVXj3qpEeNUHxQegtpwrP3 Oxfg== 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=7N62gSVkvsFI2x5Z0KopiqFErPmWz84fi/mBVFHs0cc=; b=XQAE+Icfv9AHPDNiDLgVuXi5mPPrUKp8sUQtASbIgtGhzOYj24Q/2pb7vMjrFKcLgX GtLq+JzFNLj7OOEoYrVaIAaeG8LP7HLD9/YrzodvlsnvUH4kZsotzmmDWKVz7LTWvbQJ uihVV4NfbdmdDoabeEqFPp2Z+OEkz9M8seRz2xLT689BwPocMm7DNjKYbEAuj20SJ4Cb 9VpfIrIdCmeifIQw0N0lDZ/YIeipbb83D8Qa+2Nd0EkQDOpWeg1199++R34RVOZ6BtEv HfQwKNumtgI14+/rMNyrf31JiYQMaG9In7AzUocuLfHnFLeddAR+zN/+HvwgFQEr3tCo i1eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=bfb1R5VZ; 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 g34-v6si6269182pld.280.2018.02.06.01.13.19; Tue, 06 Feb 2018 01:13:33 -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=bombadil.20170209 header.b=bfb1R5VZ; 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 S1752640AbeBFJMu (ORCPT + 99 others); Tue, 6 Feb 2018 04:12:50 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:42217 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752288AbeBFJMq (ORCPT ); Tue, 6 Feb 2018 04:12:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=7N62gSVkvsFI2x5Z0KopiqFErPmWz84fi/mBVFHs0cc=; b=bfb1R5VZBnRsag2WCch5Tkj6S 7Ye3SK6UxlHicdeuieaPpyp2U3astC9a4AO+GPel5ZS8myPEtUOt/u5dFi9Cxid67cIvl90f4qoAt 77X1itLonEpzFCO4EDzwZ78/gEdFW2My9WxYm8QwzZ/PqwjwY3W9MGLMYcapkUT2V6gssU3zA3ojC L9TBbMm34qzfaiJlabVVTGbFWZeoV+hw6APzPTTJvB0mtPmIK0NFPRjAmaPOItAOY9WLxJyFzNbjf mLQN8uPYFFDeWLlgPnc+8lbs4qKRc662AOS2EbuO96Jtp9jvSAXz6fNHjALLm5sFN1qPEpRFN7cgI u7sCBlZdg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1eizIx-0004B6-Op; Tue, 06 Feb 2018 09:12:44 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 32C232029F9F9; Tue, 6 Feb 2018 10:12:39 +0100 (CET) Date: Tue, 6 Feb 2018 10:12:39 +0100 From: Peter Zijlstra To: Subhra Mazumdar Cc: Steven Sistare , 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: <20180206091239.GA2269@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> <20180202171708.GN2269@hirez.programming.kicks-ass.net> <93db4b69-5ec6-732f-558e-5e64d9ba0cf9@oracle.com> <20180205121947.GW2269@hirez.programming.kicks-ass.net> <930364e4-bbfe-8c8f-d095-0dd4256a5104@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <930364e4-bbfe-8c8f-d095-0dd4256a5104@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 Mon, Feb 05, 2018 at 02:09:11PM -0800, Subhra Mazumdar wrote: > The pseudo random is also used for choosing a random core to compare with, > how will transposing achieve that? Not entirely sure what your point is. Current code doesn't compare to just _one_ other core, and I don't think we'd ever want to do that. So currently select_idle_core() will, if there is an idle core, iterate the whole thing trying to find it. If it fails, it clears the 'have_idle_core' state. select_idle_cpu, which we'll fall back to, will limit the scanning based on the average idle time. The crucial point however, is that concurrent wakeups will not, on average, do the same iteration because of the target offset.