Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6451018rdb; Thu, 14 Dec 2023 21:01:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxN0t9MFlXsfXExCoKWh7Ho6XklMuqcaDNSI3LSx81mxoGLQCbb9DBafeXL4yamhyVEHcT X-Received: by 2002:a0c:ec01:0:b0:67a:d255:72c2 with SMTP id y1-20020a0cec01000000b0067ad25572c2mr11473405qvo.67.1702616502424; Thu, 14 Dec 2023 21:01:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702616502; cv=none; d=google.com; s=arc-20160816; b=x+LwyvfiUIyfVb5TYslP98HVWlBS4tA2RuQG6vB548izyW+Ovu71l19JkCGirc0Ysy O1cpFccRiMI6VNWmaAddL1+hSIzorYenYtKT5Ks47PaP0b07bWDITgp26ZTEviP98Cr9 W2HdfZsO0qiUlnh8CSFi/SUYVn+ZrCjvcuXEg7lU3UlFwEHhensyOvWegdt29+jqAGPg yLJ5NIp3mR3Ms+8bV+XBgjigkXW30Alj3wqaVHD4bJIogtVZzRTgYZ3cW7gjKE73Fjvg kTxD3OknuBEG3YQFC9l2KWUL/myNFIST1V2Z3OxZq6cZpS5EBlbQjnKaydw7mD6NMVAz S1wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=GfuQK/aoPEsrziur5obbZ3d6v/psrzo6lJNACbmfOm8=; fh=FLMZ5Ixg6U72jQzbbfhy2HOj4Er+oh+SKELYU/rRyJw=; b=uRgrJVol+Ou9d3i4tkeGNd+xVQzbvoSRXDSF/KCaDze86Z0b9fouVoNALM936PAc/F OaiIfdv4KNSgUW5eF95oD7kdUA6lqzoSGaBEeu7MVr2oS1AdUUVAm/JdYF8/7mTKbNUJ 9jVi07mgZoVj/K6VWHEOvzLVBw1guywjcfxy5VByDtQXd5BpWuhB8Ft+VsGe336b4ixX nsMNH50xyK/eRqvTiZ+rRzup8V7J4yBCSh9h9Gqnb/mxdnffT9rEm28B4eLpzHxtGDfr z/8s8Ek+hLtGKp5lDCsTYV034dPKg80huoj+dXdmu7w/GURFPSQH6yUMNWgv2Wo1dArz flDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uFmXIMrX; spf=pass (google.com: domain of linux-kernel+bounces-435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m18-20020a0cdb92000000b0067ef1a2ef5asi4231453qvk.341.2023.12.14.21.01.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 21:01:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uFmXIMrX; spf=pass (google.com: domain of linux-kernel+bounces-435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 302551C22383 for ; Fri, 15 Dec 2023 05:01:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD4F2612B; Fri, 15 Dec 2023 05:01:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uFmXIMrX" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF0FA53A5 for ; Fri, 15 Dec 2023 05:01:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D7AAC433C8; Fri, 15 Dec 2023 05:01:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702616495; bh=8RH/h1jakl0y7fPQ+kWUq85u6w9KslnUix/YJd0gqak=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=uFmXIMrXVkH0fn/PsKKyhCuvCCKR72ILItsqoCmKdvQicjHJTk+itW07h9q+uxgTx 4S5Xy9zdMEROVAJXk2UlqHVCvs6I5971BZncNlgXD1hKoPgutrEHHlds3gysgQDnrX Ck3Z3aTsBWHh+UutJIO8B+GRu5Mn3FprvP/T20ycwjRfUjtOtmDguHYNFZIqK+7G9c 61CedmmpQ9Do9oyZ2KJa2OG2XfyFt0vydvqaKpbMQs0oCFPDRXJ+CkS1Cl0T57D0/N R1XkIMdk+2ODC2zza+9UphvjUoBwYb1TzVDIQ2ksM2kYQDZkEfUZ8Nu/pPblV1piWq 7RLuZxlrNt0dg== X-Mailer: emacs 29.1 (via feedmail 11-beta-1 I) From: Aneesh Kumar K.V To: Srikar Dronamraju , Michael Ellerman , Nicholas Piggin , Christophe Leroy Cc: linuxppc-dev , Srikar Dronamraju , Josh Poimboeuf , linux-kernel@vger.kernel.org, Mark Rutland , "Paul E. McKenney" , Peter Zijlstra , Rohan McLure , Valentin Schneider , Vincent Guittot , "ndesaulniers@google.com" Subject: Re: [PATCH v5 1/5] powerpc/smp: Enable Asym packing for cores on shared processor In-Reply-To: <20231214180720.310852-2-srikar@linux.vnet.ibm.com> References: <20231214180720.310852-1-srikar@linux.vnet.ibm.com> <20231214180720.310852-2-srikar@linux.vnet.ibm.com> Date: Fri, 15 Dec 2023 10:31:26 +0530 Message-ID: <87zfyct5y1.fsf@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Srikar Dronamraju writes: > If there are shared processor LPARs, underlying Hypervisor can have more > virtual cores to handle than actual physical cores. > > Starting with Power 9, a big core (aka SMT8 core) has 2 nearly > independent thread groups. On a shared processors LPARs, it helps to > pack threads to lesser number of cores so that the overall system > performance and utilization improves. PowerVM schedules at a big core > level. Hence packing to fewer cores helps. > .... > +/* > + * On shared processor LPARs scheduled on a big core (which has two or more > + * independent thread groups per core), prefer lower numbered CPUs, so > + * that workload consolidates to lesser number of cores. > + */ > +static __ro_after_init DEFINE_STATIC_KEY_FALSE(splpar_asym_pack); DEFINE_STATIC_KEY_FALSE_RO ? > + > /* > * P9 has a slightly odd architecture where pairs of cores share an L2 cache. > * This topology makes it *much* cheaper to migrate tasks between adjacent cores > @@ -1011,9 +1018,20 @@ static int powerpc_smt_flags(void) > */ -aneesh