From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 C5F953FB7D1 for ; Mon, 18 May 2026 12:06:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779105988; cv=none; b=IzDJA7en+p3QvxMjlby6rn3YbLmodI2fob4Vh+CT6Vos6824LPAQrVm3rN1feGFxNS6HVbrmQtzrw6U3C5bJhOM7M7/L8Xw+bmr/+y+YyCwfmWoAAuWXBrftAjAF1P2Pgh4aZe9E91kisIF7o7I4dQGbhszxyIbZemjp8LR0f8o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779105988; c=relaxed/simple; bh=Y6RzADKazqjovLEBVn73IsJj5qHagFwp9nUi5OAFsE0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sOMADD2xzbL4QCCqmDgiLIZkGHCdc6RjweeysTdAvjhcvKuSDVlZ+wnaKraai+eHBR3VdQ0cWgkC+ozGaYtKFsyYgEMLh4RQCMLk9Wg/W6eXvjZVOogvvzMibKCVkD7x+8kzyCKmZHgJPgYgexPtqhS8qfpz5ITB9ihaRpQ5oFI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=g0hPOc/B; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="g0hPOc/B" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779105986; x=1810641986; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Y6RzADKazqjovLEBVn73IsJj5qHagFwp9nUi5OAFsE0=; b=g0hPOc/BEBwr9c/aIZggEim7+s8QV+VfHMy9/CaPeG3q71A6ilrwzwAs 6QEa0RuERW5o41Sne776wDvUiULPnDYi8MthnemEtFs4UOKmhpQLKlRHD De9oOwNWwIQohc0B/GBvn40+laDJzR9mrc0JIg10rWUDCzxlRozf4Mrav ImZrTnZm0yFz7gzQ8RtdDU1wZtVwe5XW+OP2RrMbpdOaer2iKshMMfQs/ rnmh/7h37Xa4UM8H3Duh8ZA8stKUmY687P3IWcdQRe5eKNOwWfDcW24iL TqzW8HyPlZEewpkc4CAfefUZlCBmqqzaZWalzq1C+eJTy65NnNBk/7kaL Q==; X-CSE-ConnectionGUID: hLYBNPf4SZKFY9/OeJTC+A== X-CSE-MsgGUID: D7N6MBiYShuh7Y9R7ZQ3yQ== X-IronPort-AV: E=McAfee;i="6800,10657,11789"; a="79807221" X-IronPort-AV: E=Sophos;i="6.23,241,1770624000"; d="scan'208";a="79807221" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2026 05:06:25 -0700 X-CSE-ConnectionGUID: waSh+p5oRYSXT3P/d1FWeg== X-CSE-MsgGUID: fsN4YPQzSdm8QwudpX0cnw== X-ExtLoop1: 1 Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmviesa003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2026 05:06:24 -0700 Date: Mon, 18 May 2026 05:14:59 -0700 From: Ricardo Neri To: "Chen, Yu C" Cc: "Rafael J. Wysocki" , Len Brown , Dietmar Eggemann , Juri Lelli , Vincent Guittot , ricardo.neri@intel.com, linux-kernel@vger.kernel.org, Steven Rostedt , Ben Segall , Valentin Schneider , Mel Gorman , Tim C Chen , Christian Loehle , Peter Zijlstra , Ingo Molnar , Barry Song Subject: Re: [PATCH v3 1/4] sched/fair: Check CPU capacity before comparing group types during load balance Message-ID: <20260518121459.GA4426@ranerica-svr.sc.intel.com> References: <20260514-rneri-fix-cas-clusters-v3-0-0037869554bd@linux.intel.com> <20260514-rneri-fix-cas-clusters-v3-1-0037869554bd@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) On Fri, May 15, 2026 at 08:29:28PM +0800, Chen, Yu C wrote: > On 5/15/2026 2:34 AM, Ricardo Neri wrote: > > [ ... ] > > > @@ -10818,6 +10818,20 @@ static bool update_sd_pick_busiest(struct lb_env *env, > > sds->local_stat.group_type != group_has_spare)) > > return false; > > + /* > > + * Candidate sg has no more than one task per CPU and has higher > > + * per-CPU capacity. Migrating tasks to less capable CPUs may harm > > + * throughput. Maximize throughput, power/energy consequences are not > > + * considered. > > + * > > + * Systems with SMT are unaffected, as asymmetric capacity is not set > > + * in such cases. > > + */ > > Does "SMT" here imply that group_smt_balance is unaffected? > Regardless of whether we move the check earlier, this seems to > already be guaranteed by the fact that the check only applies > to sgs->group_type <= group_fully_busy, which does not include > group_smt_balance. In other words, SD_ASYM_CPUCAPACITY is not > the only gatekeeper. This comment is instead about domains having both SD_ASYM_CPUCAPACITY and SD_SHARE_CPUCAPACITY. Today these flags are mutually exclusive, but that change. There have been patches proposing to make asymmetric capacity SMT- aware. In any case, I think this check still holds, because we are skipping groups up to fully_busy that have greater capacity than dst_cpu. > > Other than that, the change looks good to me,Reviewed-by: Chen Yu > Thank you! > > thanks, > Chenyu > > + if ((env->sd->flags & SD_ASYM_CPUCAPACITY) && > > + (sgs->group_type <= group_fully_busy) && > > + (capacity_greater(sg->sgc->min_capacity, capacity_of(env->dst_cpu)))) > > + return false; > > + >