Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2245406rdf; Mon, 6 Nov 2023 08:32:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlaW2hvyRwSwtft2Q+b5iljS1flnh0o2GNqAmKyvn8LKFrUPOtUEv7ovwGSCb5kfCXX+xz X-Received: by 2002:aca:171a:0:b0:3ae:4d0:7f0f with SMTP id j26-20020aca171a000000b003ae04d07f0fmr26184589oii.19.1699288364184; Mon, 06 Nov 2023 08:32:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699288364; cv=none; d=google.com; s=arc-20160816; b=RIcOHnFUZdT373GYS4EDf5VPcpv0lZDRGM8gDPtPjntKFA4pmPUauKD2fgG56EEfWn cRa6yYdIS1m4RBjElgysw+7qQzcdfs+gaSekKD+0gLZqQ6tCMnqHPwT5ApD5U1MjIzQs Ee6qkSfq+CW7Ioce2E7goNCLaH59RWzo1hv+uNuoH6WDW6sk2Be8EBGb5+KsUsVzOE+f GM98CWB7SquVUgyw4ME8sfdm8gCUGz7GQXGArOUdg+8OsAlIacJ4/b7Vp0syAXXBrS68 dHoqggOp9mxagVH29DpEXoQsC+g0P/1wonaXgg9rRT41OvozSB+hzkHkOxTElv8mugv8 /G9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=FrFtqbn884FhLCQNLWWIWLP5l2xV7C9lULsD1ctzONA=; fh=g6TcyNeSoij9kmtrTCZqS2f/ps6J8wswjQ+GsUrRHAQ=; b=jp4YwTVEt+RCTFuaC9bt/qJeKTHyEAnVU3Dvyw9y1Z6ydLE9oSNOofTqesyh6RhYqF 7yEbQsBDq9mPgwAN6sdWgi9JguDgwa+uqLmp/S8N60Y5r2uP8zXeaLF5lJGCJIByWdw9 VwhyQDwVuzNaNzTGhQw8M94Y4tPtr0QspRcKDxYMmq2VKW43pvlCfBdkqK2Wbkky4aN7 oHORKmRU4sxhqmJ5OuavmPbUvKUGC3KOAd3UtPra8IQDJfsFuiC1wMRLSwIl6G5lHCkp /B45puR3VklIxZaEEQycOpcQJzh5UXGUhvIMseUyRnUgZOQ8XkfB+I7bIS7s3vOzdaBk Rsjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=CdfnAS5H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id m8-20020a056808024800b003b3ac96bee0si3007250oie.345.2023.11.06.08.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 08:32:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=CdfnAS5H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CCC7080A90D4; Mon, 6 Nov 2023 08:32:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232901AbjKFQcA (ORCPT + 99 others); Mon, 6 Nov 2023 11:32:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232820AbjKFQbo (ORCPT ); Mon, 6 Nov 2023 11:31:44 -0500 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D79DD47 for ; Mon, 6 Nov 2023 08:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1699288298; bh=/r0fV53VLFri6xJZwakkB0teRAX33uU5uM/ke7kU0oQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=CdfnAS5H7sN4lKTCW3PnJ+UYxM+eReB8tqeHZX6TqvspU1n8T397G7chtIdfJgObw x7teodQKIblVJZcLfcbrmI3TssJaIOcgvXgey9mQj1c0ozm5lkyh9+9j9Kk1cLTjLO VJce+ZVIitOM96W1MKHgeHfWF6vT3Jx6k2+ttJ6+Hq7w3lnSGmMktPnDUfQahfrNRn OKgP84PbC3tgIEmCZLHHf7u82sGydzdrXOpeWn4P/KrC4LnvZ++rXPw/LMtcGs21oy /iyo39lfhd8BPfREIchJvTsV8RgNV0k7/71Mt2lt8ofI+WQU0aTQ9Dhx39zQQlyaVp IElvEtsWPsbZw== Received: from [172.16.0.134] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4SPH1554nlz1bBN; Mon, 6 Nov 2023 11:31:37 -0500 (EST) Message-ID: <909fd5b2-a1c6-49cf-8efa-c71affb1a4fe@efficios.com> Date: Mon, 6 Nov 2023 11:32:02 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v2 0/2] sched/fair migration reduction features Content-Language: en-US To: K Prateek Nayak , Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Valentin Schneider , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Vincent Guittot , Juri Lelli , Swapnil Sapkal , Aaron Lu , Chen Yu , Tim Chen , "Gautham R . Shenoy" , x86@kernel.org References: <20231019160523.1582101-1-mathieu.desnoyers@efficios.com> <85b710a9-5b26-b0df-8c21-c2768a21e182@amd.com> From: Mathieu Desnoyers In-Reply-To: <85b710a9-5b26-b0df-8c21-c2768a21e182@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Mon, 06 Nov 2023 08:32:37 -0800 (PST) On 2023-10-26 23:27, K Prateek Nayak wrote: [...] > -- > It is a mixed bag of results, as expected. I would love to hear your > thoughts on the results. Meanwhile, I'll try to get some more data > from other benchmarks. I suspect that workloads that exhibit a client-server (1:1) pairing pattern are hurt by the bias towards leaving tasks on their prev runqueue: they benefit from moving both client/server tasks as close as possible so they share either the same core or a common cache. The hackbench workload is also client-server, but there are N-client and N-server threads, creating a N:N relationship which really does not work well when trying to pull tasks on sync wakeup: tasks then bounce all over the place. It's tricky though. If we try to fix the "1:1" client-server pattern with a heuristic, we may miss scenarios which are close to 1:1 but don't exactly match. I'm working on a rewrite of select_task_rq_fair, with the aim to tackle the more general task placement problem taking into account the following: - We want to converge towards a task placement that moves tasks with most waker/wakee interactions as close as possible in the cache topology, - We can use the core util_est/capacity metrics to calculate whether we have capacity left to enqueue a task in a core's runqueue. - The underlying assumption is that work conserving [1] is not a good characteristic to aim for, because it does not take into account the overhead associated with migrations, and thus lack of cache locality. Thanks, Mathieu [1] I use the definition of "work conserving" found here: https://people.ece.ubc.ca/sasha/papers/eurosys16-final29.pdf -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com