Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1704734rdb; Sun, 8 Oct 2023 23:01:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSBgTNkHPwrgegW7m6i1X+q8filjG4i28D5wFHeRK1XdowF19my7ZTX7+hP6RGQg7G5FiC X-Received: by 2002:a17:902:f68b:b0:1c8:a68e:7f1 with SMTP id l11-20020a170902f68b00b001c8a68e07f1mr2139784plg.66.1696831314829; Sun, 08 Oct 2023 23:01:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696831314; cv=none; d=google.com; s=arc-20160816; b=FFaP2tzDbLL4cnL/9940B1MNNs/ozSl/JKXv7xH6osqnTzdaZEcWbKK5ie2F0aeetF IiRqguk2otSExlEVaTK1vir1V3cMQlArbKc6yBbsOCwsKJNsWlWLjHcnWmAMZV1pYQBD 3qftHTcgaZAgOSxoQqSMLheW6lQCx7KxFiRNuvoa48MHQw9Q0ymlNF41e+HuKa6KFPdB BhR6aaK9X/HIGAb7epUbXo23lnlUDlwHP7TcOAw/itDjf8JvT4vv8rRi6S/Xy4FDPqmy i8zCU6flz6MxSrYtm9h6USBQ1K80MVvQvXAHHV5EKDBEYoDX+sr4hzqAk3AHDzF12ibY Bfhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=jvPHV0Eh60HCWWfvX2U16GcYis4/JkEkuuIZg8SCuOA=; fh=vtD7yAQAubhxShBlPXtnTnBQlkXOFP5+h48jJjyV+PA=; b=ynwckXDLahT6cwjuFtkKwtqaqsPIVgFYIADOIyoSwWV3lEPMll5/nLYxnApllYhIWW NW38OmTTzb11TLMgeTJhW1alMRGvXeOuRGwGSAN6YtkTHkxx1Guwu9UXBvYfi34G6Lnz 9y4DDf7S+LQAXaX7JsJGCdgMKa3JNuuSpZiqQMetvNQRnqtVr7BXXAVhG1wmDjpKVc0S uTmhEkEQe6qtBUyxnib4yRd4Fy+F+gX7MOOaLHPSiV0iFGGUhAGSscvR3UurJlbmPJuZ kDGuc/oa8Jr0bvFxcxMn5ZKIXBwgi9DwT6NYpjfAoXblqL1ZGwDvglorEGw8P7fSkJuh 5MKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=eXwYh1CZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id w9-20020a1709026f0900b001c7342b46e4si8535858plk.23.2023.10.08.23.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 23:01:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=eXwYh1CZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 61CA28054B7D; Sun, 8 Oct 2023 23:01:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345145AbjJIGBl (ORCPT + 99 others); Mon, 9 Oct 2023 02:01:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345137AbjJIGBj (ORCPT ); Mon, 9 Oct 2023 02:01:39 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D581EA4; Sun, 8 Oct 2023 23:01:38 -0700 (PDT) Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3995sn5s026689; Mon, 9 Oct 2023 06:01:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pp1; bh=jvPHV0Eh60HCWWfvX2U16GcYis4/JkEkuuIZg8SCuOA=; b=eXwYh1CZWcZonUNle8eWENl7rhprYNNBYCanai+ccqrh5VSmuhAK5mnnD1fH9kzWuvxG /YV1bc3/L1V+gQH/p+JigwTTbxE+hkYqCvfZpWqfyPj8CDmVztTZa2KwdAbYKoMCCtdz pAJxRFDSCGtWzf+HEDG28kA/jmLvHRB9OtCQ+wmbcH/pBVwA2soQetCWRt0ZMyuxK/zA Smw4gY5ZeMcJ+A9grDhnFs2jlcdIr8sycmuNrRpxAdqxjfakBR+h1iuX+ieM/bY4SERf Ge/z6TYmxVerrzNOOJ7RVctBZEANGmO0Pzcv9rOtM02Axu0lciHr1hn7PcYqFzKVayRN 8A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tmbsmg420-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Oct 2023 06:01:10 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3995tECB027723; Mon, 9 Oct 2023 06:01:09 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tmbsmg41h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Oct 2023 06:01:09 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3993EI7R000685; Mon, 9 Oct 2023 06:01:08 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3tkk5k6t22-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Oct 2023 06:01:08 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 399616xr459342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 9 Oct 2023 06:01:06 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7C01E20063; Mon, 9 Oct 2023 06:01:06 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB27A2004E; Mon, 9 Oct 2023 06:01:03 +0000 (GMT) Received: from li-c1fdab4c-355a-11b2-a85c-ef242fe9efb4.in.ibm.com (unknown [9.109.201.126]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 9 Oct 2023 06:01:03 +0000 (GMT) From: Shrikanth Hegde To: mingo@redhat.com, peterz@infradead.org, vincent.guittot@linaro.org, vschneid@redhat.com Cc: sshegde@linux.vnet.ibm.com, dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org, qperret@google.com, srikar@linux.vnet.ibm.com, mingo@kernel.org, pierre.gondois@arm.com, yu.c.chen@intel.com, tim.c.chen@linux.intel.com, pauld@redhat.com, lukasz.luba@arm.com, linux-doc@vger.kernel.org Subject: [PATCH v6 0/2] sched: EAS changes for EM complexity and sysctl Date: Mon, 9 Oct 2023 11:30:35 +0530 Message-Id: <20231009060037.170765-1-sshegde@linux.vnet.ibm.com> X-Mailer: git-send-email 2.39.3 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: RN5JfF2QSDHhjxctS4BS5RVDAC5Ndffg X-Proofpoint-GUID: 02dwCb0upv6SV3TDuQItBhGpSDN1riEH Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-09_04,2023-10-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 adultscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=656 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310090052 X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 08 Oct 2023 23:01:50 -0700 (PDT) X-Spam-Level: ** In Brief: [PATCH v6 1/2] sched/topology: Remove EM_MAX_COMPLEXITY limit Since the EAS complexity was greatly reduced, bigger platforms can handle EAS. To reflect this improvement, remove the EAS complexity check. [PATCH v6 2/2] sched/topology: change behaviour of sysctl sched_energy_aware based on the platform Depending on the platform sysctl will either enable/disable EAS and NOP in case if EAS is not supported. Patchset contains these two patches. Second patch depends on the first patch to be applied first. v5->v6: Valentin pointed out that sd_asym_cpucapacity is under rcu and to avoid writing to sysctl if EAS is not possible. Did these two. v4->v5: sched_is_eas_possible missed handling of case when EM complexity was high. Dietmar suggested that there was work done already which removes these checks. Since it makes sched_is_eas_possible cleaner, picked up that patch along with v4 and made it as a patchset. Instead of using first CPU in cpu_active_mask, doing a simple loop across all CPU in cpu_active_mask to check if there is any asymmetric CPU capacities since it was breaking EAS capabilities over CPUSET islands. v3->v4: valentin suggested it would be better to consider simpler approach that was mentioned in v2. It is a standard approach to keep the knob visible but change how read and write are handled. Did that and Refactored the code to use a common function in build_perf_domains and in sysctl handler. v2->v3: Chen Yu and Pierre Gondois both pointed out that if platform becomes capable of EAS later, this patch was not allowing that to happen. Addressed that by using a variable to indicate the sysctl change and re-worded the commit message with desired behaviour, v1->v2: Chen Yu had pointed out that this will not destroy the perf domains on architectures where EAS is supported by changing the sysctl. [v1] Link: https://lore.kernel.org/lkml/20230829065040.920629-1-sshegde@linux.vnet.ibm.com/ [v2] Link: https://lore.kernel.org/lkml/20230901065249.137242-1-sshegde@linux.vnet.ibm.com/ [v3] Link: https://lore.kernel.org/lkml/20230913114807.665094-1-sshegde@linux.vnet.ibm.com/ [v4] Link: https://lore.kernel.org/lkml/20230926100046.405188-1-sshegde@linux.vnet.ibm.com/ [v5] Link: https://lore.kernel.org/lkml/20230929155209.667764-1-sshegde@linux.vnet.ibm.com/ Pierre Gondois (1): sched/topology: Remove EM_MAX_COMPLEXITY limit Shrikanth Hegde (1): sched/topology: change behaviour of sysctl sched_energy_aware based on the platform Documentation/admin-guide/sysctl/kernel.rst | 3 +- Documentation/scheduler/sched-energy.rst | 29 +--- kernel/sched/topology.c | 151 ++++++++++---------- 3 files changed, 82 insertions(+), 101 deletions(-) -- 2.31.1