Received: by 10.192.165.148 with SMTP id m20csp4754526imm; Tue, 24 Apr 2018 07:56:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx49EGZXugECo6I0Lpxb09gSYjz+KUXBHe6522BPKxdTlWDaF5w6CizM6EH4IpRWq+xUyGf/7 X-Received: by 2002:a17:902:2f43:: with SMTP id s61-v6mr21317519plb.99.1524581798649; Tue, 24 Apr 2018 07:56:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524581798; cv=none; d=google.com; s=arc-20160816; b=YJN0HBLoI0AyTUHynHCWGLc4V2Uuqav9+YZVLCaGqgjuaPq34SgD+T0p6NhZwBPUB0 gRr4c39WLLatb7aXcoSkU2MRDBdu+wO/suJczGOQPBE83k0Fi5TGRhAGuDN7f1S79a00 oYw5EEMTS+4LMI3cZFdmgJ9slPbt0maMGAu+ac+Mgvji5ZKhyD6OuGY2Om6j8+4g40cq IUr3+vBSG3hOJjjKoxoeQfPESkI43/wkm4aW1L/5CqyFqL39vTpc4xzrDk4Hmr+IYQRI z+DnoPAGdx+C4cxnV3F2AVPUp0fcMaqucLwDTTTSKi2NqaiQh1miqZqPuarWXpjfNoc7 Q4bg== 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=7f05Lxb+xsNNVrGEQQvgR4CM70z+XNLXtBbmDmr1XD4=; b=YAn7iJ58PddaRwj1qJxxgA7Ot3RJue9987Cca/qQtB+/771vaUdnS/RrmGTzvGW1CQ 5mNcc4tpgflkDQ8rTL3/YymZiiuAz2evo1hr0bjQtP16yl2vO4KHmaEchyN7ZDpfpSYy cYeTTNkM+OKnqMNpIngIapIFI2SAywpoQC5XU+1H4Xj3yRgZF4vOdZBlKR8GuhVwPA+w WeC+3zTQ0Xil/kqbfI7jByLqMS0RvHs7s7NwN7pITVQe5uLswJMc+weT5i0r4XNuGRPS iEPb+sq4fGBKDMR2+29HjrGaIfp12EMxm6kg71eH5b2bGfCH11hCAE460O+2MK4nL0fT VxrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=dvtAyl3v; 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 i75si11396423pgd.399.2018.04.24.07.56.22; Tue, 24 Apr 2018 07:56:38 -0700 (PDT) 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=dvtAyl3v; 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 S933140AbeDXMqw (ORCPT + 99 others); Tue, 24 Apr 2018 08:46:52 -0400 Received: from merlin.infradead.org ([205.233.59.134]:38320 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750736AbeDXMqa (ORCPT ); Tue, 24 Apr 2018 08:46:30 -0400 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=7f05Lxb+xsNNVrGEQQvgR4CM70z+XNLXtBbmDmr1XD4=; b=dvtAyl3v+RotN1oBOKU0FlxBC g+3y2UhvcZK0gbpdNMZvz04QF+o5Uh7jQzPbrsqjIT8Mn4aEYluIP2sN8SN4LhvkdUbp+fVR2tI3h JwawVQ1f8//xpmivwZZyDwKOr9wwnyuvAWcOVlUuNu3ZNSQ/Gy8S4YtTgRnJeAGT4Ew7FzS8LqOtM KbYXCOio/k2WSFnpyuVU3k+zxOZjwaG3zIwUoEVltZaSrKzw1Y0f+I/xH5s6/T+J0UamHGJ+XmWJr 7+PTSXgoCDZon7Kax4uy4eApuPYX3o2YyUa6K9em3XWR9IiyKcyLIV9/H780K0lCTL6EI87cLzuS9 bh6vm1uLA==; 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.90_1 #2 (Red Hat Linux)) id 1fAxKz-0000vr-2b; Tue, 24 Apr 2018 12:46:25 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 86DC7203BFAF1; Tue, 24 Apr 2018 14:46:21 +0200 (CEST) Date: Tue, 24 Apr 2018 14:46:21 +0200 From: Peter Zijlstra To: subhra mazumdar Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, daniel.lezcano@linaro.org, steven.sistare@oracle.com, dhaval.giani@oracle.com, rohit.k.jain@oracle.com Subject: Re: [PATCH 1/3] sched: remove select_idle_core() for scalability Message-ID: <20180424124621.GQ4082@hirez.programming.kicks-ass.net> References: <20180424004116.28151-1-subhra.mazumdar@oracle.com> <20180424004116.28151-2-subhra.mazumdar@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180424004116.28151-2-subhra.mazumdar@oracle.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 23, 2018 at 05:41:14PM -0700, subhra mazumdar wrote: > select_idle_core() can potentially search all cpus to find the fully idle > core even if there is one such core. Removing this is necessary to achieve > scalability in the fast path. So this removes the whole core awareness from the wakeup path; this needs far more justification. In general running on pure cores is much faster than running on threads. If you plot performance numbers there's almost always a fairly significant drop in slope at the moment when we run out of cores and start using threads. Also, depending on cpu enumeration, your next patch might not even leave the core scanning for idle CPUs. Now, typically on Intel systems, we first enumerate cores and then siblings, but I've seen Intel systems that don't do this and enumerate all threads together. Also other architectures are known to iterate full cores together, both s390 and Power for example do this. So by only doing a linear scan on CPU number you will actually fill cores instead of equally spreading across cores. Worse still, by limiting the scan to _4_ you only barely even get onto a next core for SMT4 hardware, never mind SMT8. So while I'm not adverse to limiting the empty core search; I do feel it is important to have. Overloading cores when you don't have to is not good.