Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp91234rdb; Sun, 28 Jan 2024 15:33:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFEXLcH+UZhPNiiS1E5tHSnCWmr7mmb4HF+pq7QRr1w62i5zotDpg50sO56n8cxxpZFap9 X-Received: by 2002:a17:906:1694:b0:a35:7538:1db6 with SMTP id s20-20020a170906169400b00a3575381db6mr1990496ejd.26.1706484831762; Sun, 28 Jan 2024 15:33:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706484831; cv=pass; d=google.com; s=arc-20160816; b=swfMyPBdDr6JaAGfVMbiyIpOTYEMzgXDvqHrLZluDW3MiqFvr/ZyDy58+3Tp+XjlNW IYnZa6DZN1oaqHh0NxV9YXTwMIJFG8mOii9G8vfClBGbFOd/E8TedE812XNGkjxL/TAF f7W2UAMuY4DMQytlDR/xND9o84Df+9a6Y1+dYmrDLAmgspe7ePw3Fb8e28/VsgCEO/CT 2ZH7FyBZsYZMC0dl6mPliC3MwoWaewxYW08Au4R59+0D0/t1OuvtAeVSS6QlLb+0sI1f vhm1kGw+XTwNZJUqIPEAlVxrZIu/D+XsfbqDCJNn4qd8cwHnFUoBnYkgm9yTl2HTi7Hr E37A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=pAPh3t3T8gwSHK3fFX1PEbp1JEaD53zS+zqHNXDYu34=; fh=mHfqAwIJ+l/+euW351aOg70DZG7IOEjGqFN7T21HVfE=; b=vg9EJbfAbQbLTNW2rUb4V+CmZIseiHftPGSOOwVlYiuaHCQx5I/Bga0swcSKVAD2QR SXMxBoQwxeJC0c6cQRDXvX/6DmP9mxn7l8gyX6cWPR4LUKStybXZ5pY66DmCZSJiVtXf s07xmZh2RJf4IWiIPhr3U2FSbagf7dtXAmVViVkJWuQJvpz284WGHNPxd+48Q9Ow0YJX LJdZ7US+Fo0vbcSLtpmNlcbguuGs04jX/AmYrILgO+Kz9YbX6pZKBq7OZfJPjuzzowsl d5KOOPKCEER1tTbDhAGd7uPoFa6B8j2iZxdvwDlyjVqgx1JH7uJ+yANeNh2hV9UrgB7p 1W2A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=xkUCCe7x; arc=pass (i=1 spf=pass spfdomain=layalina.io dkim=pass dkdomain=layalina-io.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-42016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42016-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gh21-20020a170906e09500b00a35a158840dsi660742ejb.397.2024.01.28.15.33.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 15:33:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=xkUCCe7x; arc=pass (i=1 spf=pass spfdomain=layalina.io dkim=pass dkdomain=layalina-io.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-42016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42016-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 839791F241E4 for ; Sun, 28 Jan 2024 23:33:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77B9F4596C; Sun, 28 Jan 2024 23:33:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b="xkUCCe7x" Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5182D446CF for ; Sun, 28 Jan 2024 23:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706484784; cv=none; b=aKXs3eYV2E8TFBhoEgDXobP60PMRulCZ93TMwwW7jpJzhvijcxvNfR1Q2uQrOL+DxXANW2k41O9HsRDrId2/LyZIpN3bhZbdssSbQvwTYQLf1oq9j2f5YKxuY/I5PnPUhoPam78lsvoP4Cv1WXDsi6zHjarzNbykH8GLs+KOZJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706484784; c=relaxed/simple; bh=SGuu+3iE4RlZQwaoMsKXScsaTohl1/2a2dg8UqbNqDA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WzsAuGVd8aq00Tw0DnbE5/rXRu0h0Cbcs3Ks04e74uU71DyW2BnmMUKiMW4RGB7IJOpgPo6zihoY/P4d3ksM4xCqm9Q+XyeS6Tf0I4aZupx9p/nBpSyIihuUTX+E4UPQbOKgIZIJv+JA+fs6eDrEIfbtTxkESFdLCCtszrjQgs0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io; spf=pass smtp.mailfrom=layalina.io; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b=xkUCCe7x; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=layalina.io Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-40ef207c654so7850355e9.1 for ; Sun, 28 Jan 2024 15:33:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1706484780; x=1707089580; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pAPh3t3T8gwSHK3fFX1PEbp1JEaD53zS+zqHNXDYu34=; b=xkUCCe7xb5hnF7/G5eC4+bjata2fEA/UsKzii51hEqa1zDVLnDZT2HgCqD9rLX9SMM OB+HtrVmQ20m+gQ1TCVlmKlP8VaAPlgejldZm8r3B/9Gqp0b+PLNIO9tgII2TNrAPCAr x6pftmPca0GpdoCeRtkJ4vgY1YyGj0eujT5cvzsMqUNWrVz5ttD71ZRNsmTjcN35KY4z oZRMyHXlPxqP4/ootJOKjIKv0FF5c5iuH0iACITEvzJPtxGk27zBP+ve6FUxYsGtYd4E TjNTmw5GoyHulYiP9/DsFPztDYmLvXomwfW7YE12P/8GzCV/8JDC6aPTGZN0JyGFlD/C fvVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706484780; x=1707089580; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pAPh3t3T8gwSHK3fFX1PEbp1JEaD53zS+zqHNXDYu34=; b=ecPtHHcgJFOjJhrYH4FRrmR+3qSkAIZFEp8dzpsdntDp6aF4sMy1aJcsRRvx3vFUl+ qzfQTyPPAMYXiD2Kc8dy/B5zCzgkJ6znJxIDMy7s/C07mv7TC2vtu+deZSFbsDXUWReH y/H9HXcaZupZXojxk3VFtevFO70j4d2AvayGiBhTZDlBSrLOAnWeQtU1Lb3eSA8pUGR1 SfgrSU+9oxTSwQbWwQ/OHi8Spwb4xaUUwLmW+yKIJMXa28Yx7pKwH8AM53ie5l/TK30t Pi4WSfDT9Q9JcvvIXNuPteA/28OwsIdYv3p2xXyRX2Nl0Yb25eu7EO+SArsaNfaiaDi2 qdUg== X-Gm-Message-State: AOJu0Ywwl2Gbk0jtVG+r6YxixT4NB5mGueO1RVG+gUW4tkuV7J1Js0f8 kko4gZHxVWp7LGCkTTiviqRsns/qClWb6cWlO0kMAPKLGJhM5Cg4v2XGfAZdUmM= X-Received: by 2002:a05:600c:4e01:b0:40e:f539:f6ca with SMTP id b1-20020a05600c4e0100b0040ef539f6camr2082703wmq.36.1706484780362; Sun, 28 Jan 2024 15:33:00 -0800 (PST) Received: from airbuntu ([213.122.231.14]) by smtp.gmail.com with ESMTPSA id fm24-20020a05600c0c1800b0040ef61dfd48sm2069918wmb.11.2024.01.28.15.32.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 15:32:59 -0800 (PST) Date: Sun, 28 Jan 2024 23:32:58 +0000 From: Qais Yousef To: Vincent Guittot Cc: Ingo Molnar , Peter Zijlstra , Dietmar Eggemann , linux-kernel@vger.kernel.org, Pierre Gondois Subject: Re: [PATCH v4 1/2] sched/fair: Check a task has a fitting cpu when updating misfit Message-ID: <20240128233258.wwftb36ultqdifu3@airbuntu> References: <20240105222014.1025040-1-qyousef@layalina.io> <20240105222014.1025040-2-qyousef@layalina.io> <20240124223842.zjsolwhp26w7vowu@airbuntu> <20240126020743.tca257nvnlpyya2y@airbuntu> 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=utf-8 Content-Disposition: inline In-Reply-To: On 01/26/24 15:15, Vincent Guittot wrote: > > > TBH, I don't know. I would need time to think about this... > > > May be when we set the new affinity of the task > > > > I was thinking to actually call update_misfit_status() from another less > > expensive location. > > > > We can certainly do something to help the check less expensive if we must do it > > in pick_next_task(). For example set a flag if the task belongs to a single > > capacity value; and store the highest capacity its affinity belongs too. But > > with cpuset v1, v2 and hotplug I am wary that might get messy. > > I think it worth looking at such solution as this would mean parsing > the possible max capacity for the task only once per affinity change Okay. It might not be that bad and just need to do the parsing when we update the cpus_ptr, which seems to happen only in set_cpus_allowed_common(). I think I can create a wrapper for fair where we do set_cpus_allowed_common() then do the checks to discover the max_allowed_capacity and whether the new affinity is asymmetric or not. Cheers -- Qais Yousef