Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp690620rdb; Thu, 8 Feb 2024 19:50:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1wZLoAQ5hIwG8/5WF8d1XLjE/GynSJxBErLWvn9usWLL0C4dPlOOnRtq87D3DN1xRau60 X-Received: by 2002:a17:902:a385:b0:1d8:f129:a0bc with SMTP id x5-20020a170902a38500b001d8f129a0bcmr377171pla.13.1707450636590; Thu, 08 Feb 2024 19:50:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707450636; cv=pass; d=google.com; s=arc-20160816; b=YIBNr7Vvazk1lNuQSkQ635W7e23mpbvjrtH/vjo6VC5zB1aNHsEjLXb60PRfi/XTAb l38WS+tRQpRieCCN/INJ3H92vBw7VtqYfBFrFSMC+vH+W3+EHleqC4TgENuF68l1inIw x2R9Seh44Aou8VP1y9OOu7fRQOx7mSGFHz78Eb4FJyYGXbdHVXXpDU9jDqv+MlXWBWm/ Gexdq6dPnD4+PKSNJ3qtvCh7V/IuHclBLLiS2pHplSdtMcMWt8ka54C6bApXJQpTECTC +n/VJWusv+burbBlENYEZ8F7tNuhUDy25zg9eUPPI07j1xG635QbTswczCYONmGOPdlR hGfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=SUXKylzEQlDztiOIL4hdbvSeYV4AYAH8uoQgoo5JfRY=; fh=yHJjIxGXGZrIhbbmLloYxpwLP2GQwacD5FmzF6610Sc=; b=m3sgcsdl684gOfXI2klqm7eMAJpp0egRxHN9G07IdkOX4M2chlQGhdAS6bs63o2Cbo TYApHzEtsuC8Lmp3Jb5V+HecgS/+rU0CojPkWsPSKw5I4otinxS6umLGmrxNAZLUoP5F h4vuBzfN3aiCFLLRoS+DjfSmvrz2kxGzjAFvfaFTu40DVaSH/xkwurolZvuVJ5ws0ERW fLGg1Mh/lpLrhNrx7rz1hKhaf4VQyb1pNv7AYt/lHukJHJGt8v+BXboC0WtjGv1GIO5o 7wpQMFzPBlcDpIPhI0EJRtkdbjAvoQ6+xLeNJ3D25PRRlCxgKcUe2+o2LB3MCXPJ8/lj Do1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Yp4Ke0Xp; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-58947-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58947-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXLOisEBeJnDzcfN8TnRbDN2tYF44V4vImXsjeLqpz/JHf0BArTCgNmcY50YlPkSGkbfwKQP6dc910AfPUK+BuLMVlL2FRI1w8FK6zOTQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k3-20020a170902c40300b001d903a572edsi929955plk.606.2024.02.08.19.50.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 19:50:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58947-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Yp4Ke0Xp; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-58947-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58947-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B8325B24CC1 for ; Fri, 9 Feb 2024 02:46:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4791538A; Fri, 9 Feb 2024 02:46:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Yp4Ke0Xp" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 553BD5224 for ; Fri, 9 Feb 2024 02:46:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707446782; cv=none; b=lyX9Q8Tys/Z2hlghAIWJVkyqBk8NXxpIFvu3AhjmmxzP1k39JthEt0Ul7SafHvZ3iD5yzH2wsKQf6UQBU1CHdNbl208dsSreWgsdx7/wywiUBuPIPmWdo/Vp0PL76RG77X2wVti/ji1DLCc4CTlUM90rbsS74PB5i5W3Ncgc2+8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707446782; c=relaxed/simple; bh=TX6xbDNR+VhiOrMf9aaMf+IlEioElh0ZJt0LW9ypZd8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JdPz0WOGRLQbpY1mT0eLzzlNEaBjTksQ1P7pqdAN02hUlTqJgu2+wfsAHbvdiRRGQq3PO8Uh8SXeTUsGx8ag9NgSP6gV+yofaj57s/x8rNsiNUIDPermUhLg9VOhbk3VRwAOqS+FTTWZi/87IvFbfaaq7yOiUuaBRf5+oTcCYWY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Yp4Ke0Xp; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707446781; x=1738982781; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=TX6xbDNR+VhiOrMf9aaMf+IlEioElh0ZJt0LW9ypZd8=; b=Yp4Ke0XpMDfK+Ofs2eRPXOzr+V75Izd6N5rBhJVJ6yHUTIRlBIjEFC/U koyN2uFQxgU//Cm72GeOOsfqhusbf7Xq3b4spBRuVXsY6iVCiLlz4SebV dTUePESLiAB9ZBI7dN25PN+K3ZbzOV8aNeS/UPZfGG3kBHXBmV6ixpSxR eAaZZzz2EKkmOt39yJK+j05Zs59HxEeYxP3wSU2gLSC++Y1K0ASdPTZ6s LNvtQUOPUpluZWrQCE734fxzu0GLpy8NLM66SUK6t/CXSfU1dIdFZQPGo 6+kRR3O8T/CQRw+ebIIyWZAfYq/FtvgP7TndTa5PE7pdixyLKUm/6RvLq A==; X-IronPort-AV: E=McAfee;i="6600,9927,10978"; a="26812795" X-IronPort-AV: E=Sophos;i="6.05,255,1701158400"; d="scan'208";a="26812795" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 18:46:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,255,1701158400"; d="scan'208";a="2138368" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmviesa006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 18:46:20 -0800 Date: Thu, 8 Feb 2024 18:47:37 -0800 From: Ricardo Neri To: alexs@kernel.org Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, yangyicong@hisilicon.com Subject: Re: [PATCH v4 3/4] sched/fair: Rework sched_use_asym_prio() and sched_asym_prefer() Message-ID: <20240209024737.GA10494@ranerica-svr.sc.intel.com> References: <20240207034704.935774-1-alexs@kernel.org> <20240207034704.935774-3-alexs@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; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240207034704.935774-3-alexs@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) On Wed, Feb 07, 2024 at 11:47:03AM +0800, alexs@kernel.org wrote: > From: Alex Shi > > sched_use_asym_prio() sched_asym_prefer() are used together in various s/prio() sched/prio() and sched/ > places. Consolidate them into a single function sched_asym(). > > The existing sched_group_asym() is only used when collecting statistics > of a scheduling group. Rename it as sched_group_asym(). > This makes the code easier to read. No functional changes. > > Signed-off-by: Alex Shi > To: Ricardo Neri > To: Valentin Schneider > To: Vincent Guittot > To: Peter Zijlstra > To: Ingo Molnar > --- > kernel/sched/fair.c | 37 ++++++++++++++++++++----------------- > 1 file changed, 20 insertions(+), 17 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 607dc310b355..942b6358f683 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -9746,8 +9746,18 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu) > return sd->flags & SD_SHARE_CPUCAPACITY || is_core_idle(cpu); > } > > +static inline bool sched_asym(struct sched_domain *sd, int dst_cpu, int src_cpu) > +{ > + /* > + * First check if @dst_cpu can do asym_packing load balance. Only do it > + * if it has higher priority than @src_cpu. > + */ > + return sched_use_asym_prio(sd, dst_cpu) && > + sched_asym_prefer(dst_cpu, src_cpu); > +} > + > /** > - * sched_asym - Check if the destination CPU can do asym_packing load balance > + * sched_group_asym - Check if the destination CPU can do asym_packing balance > * @env: The load balancing environment > * @sgs: Load-balancing statistics of the candidate busiest group > * @group: The candidate busiest group After renaming and changing this function now its documentation has become obsolete. Can you update it?