Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp877264pxf; Wed, 7 Apr 2021 13:57:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2iBplWTRRKYKO8LUJG8QMV6veBtZ4AkmM8oJDf6EsQlOQ4rEaQgS6mfOobeXSStu5j7oN X-Received: by 2002:a17:906:c142:: with SMTP id dp2mr5955541ejc.189.1617829034586; Wed, 07 Apr 2021 13:57:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617829034; cv=none; d=google.com; s=arc-20160816; b=dBAMT8c98pf/iWbwjd4uOsEHXbuPQ1NGYCluBb5DBPCZ7pxqU3HAZxhIK7zcSfawDT aiRyb5KGI3+bD4z+Y24056kPHGTRW+3QeAwD6+FDkpSDWVI6vm2JNsEp5GEogc2inQAM SjIL/PkfKuYy/T4taKyreaxYN5QsCH1ImYJ/P6F8E8+2r4DlwxAY2JKEp9lrp3JDZxrN bbKYKVUOiMhzZD6grxZVg/suT+pCq880KOF1y+ya0LMRRT1/b8+ekk9Dgq+bb5A3F5wl UNwIZ7t+APAIkMsyGZolq9U/opWIjpckaDjO6Z4nvJe9QdQJN1aTdKrTJDWj6yDXQgpI uP9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=N4OmVmg67y1fM0fowTqNR4d36ChAKSePTQrWroxjXz4=; b=Fnan/ugue1CPtvAOLyapYKroohJrQ4huzaNsYOPWr4dbt2g6GCqyPyGditWijO+A7q s1f27umelSAzdudNGtPVsrXHbirE2ms1EOm8emfX8tM36VFn2x0/IMwk7v+Z6WOBABoz SaU9xLZ7POPpb9g14/khQ07jmLPRLsEQkpxzqdBxrEOtjbRHb3BpxZWGrxufvazcFrOr MXuM87G1i50ZHTKY7pUJ6V/sUnEN6VwTJnz7kbKaA2jdhrnucSTCAgc6GjrsjBoxaeS+ iYCA53pArjmdqpJCuY2xFObfOdhMFiV74G4H8i7msisNReiH4ebZbFRJvxVq2U/oYy5d BL+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="Eij/U3Y3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v3si19327233ejb.97.2021.04.07.13.56.51; Wed, 07 Apr 2021 13:57:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="Eij/U3Y3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352016AbhDGMLI (ORCPT + 99 others); Wed, 7 Apr 2021 08:11:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241241AbhDGMLD (ORCPT ); Wed, 7 Apr 2021 08:11:03 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE07BC06175F for ; Wed, 7 Apr 2021 05:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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; bh=N4OmVmg67y1fM0fowTqNR4d36ChAKSePTQrWroxjXz4=; b=Eij/U3Y3vRC1MhFFzM6jLkMmYJ 7JScTuWUtNfVaAWbjg35DjmQdkm4H1M0ECnfUt+sRUCYRFkD2TuF3KYedWg7TrCdCyD3J8F/4JvFE v/0JfnGObvWNec+Hbi2pQw5rMiF8IK47H/uj/8pPTJK5YqSghJOx9Y7Cr5Dc4a9LLSfCYQW8phMgm IMX5hVq5K2m5buyGhf8c7nXZT6I4ara16eEQQ/KaI2L0sCwWC913/eWWPcqI8e/J6WTxnjN0wmnl0 uLxFVL4L0BM8T6O4m3Nle67TyvJ5D1q3x6xrkZieFvrgX58UI2MDGajfTYLZGmCB1gSYHdc2sH8lY ssIx6l0Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lU71B-004wPf-QL; Wed, 07 Apr 2021 12:10:46 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 1490F300219; Wed, 7 Apr 2021 14:10:45 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E303224403DB9; Wed, 7 Apr 2021 14:10:44 +0200 (CEST) Date: Wed, 7 Apr 2021 14:10:44 +0200 From: Peter Zijlstra To: Mel Gorman Cc: Rik van Riel , Vincent Guittot , linux-kernel , Kernel Team , Ingo Molnar , Valentin Schneider Subject: Re: [PATCH v3] sched/fair: bring back select_idle_smt, but differently Message-ID: References: <20210321150358.71ef52b1@imladris.surriel.com> <20210322110306.GE3697@techsingularity.net> <20210326151932.2c187840@imladris.surriel.com> <1e21aa6ea7de3eae32b29559926d4f0ba5fea130.camel@surriel.com> <20210407094106.GC3697@techsingularity.net> <20210407104717.GD3697@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210407104717.GD3697@techsingularity.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 07, 2021 at 11:47:17AM +0100, Mel Gorman wrote: > Ok, cpusets do split domains. I can't imagine the logic of splitting SMT > siblings across cpusets but if it's possible, it has to be checked and > protecting that with cpusets_enabled() would be a little overkill and > possibly miss some other corner case :( Quite. The logic is that some people can't be arsed to look at how the topology is enumerated and simply split logical CPUs by a random number. Imagine we have 4 cores, with 2 threads each, for 8 logical CPUs. Suppose you want a partition of 6 'cpus' and 2 spares. Hoping for a 3:1 core split. If things are enumerated like: core0{smt0, smt1}, core1{smt0, smt1} ... then 0-5 will get you 3 whole cores. If OTOH things are enumerated like: smt0{core0, core1, core2, core3}, smt1{...} then 0-5 will get you the loonie side of the moon. Funny thing is that x86 can iterate either way depending on how the BIOS monkey filled out the tables.