Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp940294rbd; Fri, 23 Feb 2024 08:08:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUAq31zydZAIEVpER8TV9z6VGU1/BXarxal1wqaJSuM4NDF0jcj22wKU5ZYmEHLWFCyUQf0X0MYTtfmZfo2oLyvDbBvm9UHHG8T/usw+g== X-Google-Smtp-Source: AGHT+IHiAuRqit/0KxrFcZuE/p8h2c5Xg7TSJhteEQOcrZcWnYX/+RXruIVH0kuGrWeNviKsW7BC X-Received: by 2002:aa7:9992:0:b0:6e1:482b:8c8e with SMTP id k18-20020aa79992000000b006e1482b8c8emr251603pfh.17.1708704538536; Fri, 23 Feb 2024 08:08:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708704538; cv=pass; d=google.com; s=arc-20160816; b=F3Rs9DN9lr5yW+emW4Yako6G9vrgwOQyL57NUxjmEw8f0295JcCYyJMAMo4uNQwy0y fNZYde1LWrDpxzjbVbu+3hN+pv2hEGuRpGw0s0BXZrjJ2chcNo+J0bKMPS3Xjd7Pd6ZP Cn+1OhNJZE3kvfiN452zLTQstS3buS6GVtWGsLoJ3RsIjy52dDTcN/CormSTsXkvt134 fBCzxrXE541KmiLIVjeO728fYkKLSenm5NL8y4fvsBhL5e3Jn8NIDTecUopBGoByf3OB /xZSapmx/0eHSdjlF9xA/JxJKaPqN5VMgqRhkbEhbtdFS3hiWMp+zuYOAngHdH2ynTjw 1dwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=G6OU9fCSyWEEzN1u8BEFct7dyiCVhZczrHs1XtVuYnk=; fh=ROTDl0s9ELwKo5cutDBzeKVm4oVxUeHhHeHvP/bi5yc=; b=WHvtg9JtVxLYijRbCWYf835VXX7enEL7WEglg1611DtxVZp/IpIT3SNkr9QA6Vlp4Z X0vRBIbWAR5zmGkPkWIqJ1n70Xufm3EF/4HqAdgEjh/ICZl0yTzQOwO9AqHsF93l5xs0 CHyK1uHDm7c2rf6PUnDEfXL8a1pHj+NyTJOqVcSQwzAm5k0gh64/Lfei0qVegzKws+6i O6lU0mOnu4ruIfBrKrbx1f73f2eQbEorpHHq/rb1wQVx8O7bHrF5nRsOsVjE4/rqRzNo p29h2KazqKpoydn2z9h8qBhnbLRv3DX/ybsxyn6yqtzAiRbx4chQWvd9MTRMKcyya091 +5NQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=KFKNFmPH; 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-78658-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78658-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id fb38-20020a056a002da600b006e3ce8accffsi11371364pfb.174.2024.02.23.08.08.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 08:08:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78658-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=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=KFKNFmPH; 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-78658-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78658-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 58256B26571 for ; Fri, 23 Feb 2024 15:59:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D37E85C53; Fri, 23 Feb 2024 15:58:21 +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="KFKNFmPH" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 4E74482D7D for ; Fri, 23 Feb 2024 15:58:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708703900; cv=none; b=qjgkfmq4cTuXEkdPqyFdc6ck1fOXmL2UW87VbboveKP0q7jXuUTqeDT6pkc/CUW2IE/s36kjDma8+wlyi1mwoaNOQl3j5py1LoMR5DsGMjUpbitDk+PDqYjMX4ZgTVp6BjEi7AxEcAM/GjdLcPlpU5ds7FD3+fDf2dWAsRIuk3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708703900; c=relaxed/simple; bh=ZH381XWq1zBTkACBF2//KeafUWHfw67mulBGzDmiY08=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=bp1SzpVVjakw4n2Wp2HFf4p+UruLx3QJwBBIJ+u+7Y0+sWaAnxYQ9wk2Ey6U4P9D4Um+PIeNie1gVOWpA6wBeu6IP9olDh2NkhlVkbH994A3h/04acLC8BSnyUOpc1PtWwn/hPXJaXgT/aRqDVHhLCY9n5iuA9F++OG00i5vhD0= 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=KFKNFmPH; arc=none smtp.client-ip=209.85.218.42 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-ej1-f42.google.com with SMTP id a640c23a62f3a-a2f22bfb4e6so83094866b.0 for ; Fri, 23 Feb 2024 07:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1708703895; x=1709308695; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=G6OU9fCSyWEEzN1u8BEFct7dyiCVhZczrHs1XtVuYnk=; b=KFKNFmPHFQvnDtcs/LTdD3HuBYePSJheE7tvw/U+T3yLpjCPJNM1YC7hGoaOnohm/3 jVe/bz5W3TJj/JlbiKG3vuIVXEkzxilb8KUVOpSUfWlGYNlJZepoI8CIBRgA9K0wGqio v0NznsX88neTPiQms+BZKv0WeISNc4E3xrl/UUWTRUbzp1UWAzwC+pKRljfgTJAXz7Se jQQ5gVRZlwJgGLGDl+riICyZT9kZIu23m8ikbY8c/i3rAm/+MU0pKGbtbG8pWkGhhCQm J34aQYBkGW5NUrPmM1XLf8OQTs3o3w11yFl46Z9sDjJQcpsxWzpWwk6VJbIEBR499BFG pjCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708703895; x=1709308695; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G6OU9fCSyWEEzN1u8BEFct7dyiCVhZczrHs1XtVuYnk=; b=SiruqKScV2a0Y5hVxITyzR4xfjh8waMhRdP6SWAGTYliegO2NdoYTmeRd/SZitAxWT djHaoKBMv7SdSqARBZwkdljM0fHWWsXhw8qSLJRknTempD8Z3cMvP6hvLxFilf9BT4OS Qhph76upJnmeHO2wVsAaZcU30fo480NsWAzI3efMJFtgFX/+PCHrA2o1Eqw/W7QNfzaJ Srw0TjJayBsFiOxYY9Cvy6STrGZ7CCT0cY22YMXVD31MMCEalJxH23TzTmpZIIeVOoSP G1SWrVoxXoGKkmn9as0zDI9k7+0g26f9AIqFQKWqn/AHblYWZy+Iar3LTtMgA4b6AYMR l14g== X-Gm-Message-State: AOJu0Yy2oh+Enzxi53Z/izjMOmm026FERZmD1FXGbUr4yL2+wpLpWrFX 1JLPZ3OaVjaIxm9P1zg/ld7IJLmOFs2voFHhrfB4Ezim34l5DcvN+rufVFT7ETI= X-Received: by 2002:a17:906:ae54:b0:a3e:f7c1:5f21 with SMTP id lf20-20020a170906ae5400b00a3ef7c15f21mr147674ejb.52.1708703895503; Fri, 23 Feb 2024 07:58:15 -0800 (PST) Received: from airbuntu.. (host109-154-46-208.range109-154.btcentralplus.com. [109.154.46.208]) by smtp.gmail.com with ESMTPSA id rg8-20020a1709076b8800b00a3e28471fa4sm6461293ejc.59.2024.02.23.07.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 07:58:14 -0800 (PST) From: Qais Yousef To: Jens Axboe , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Sudeep Holla , Wei Wang , Jaegeuk Kim , Bart Van Assche , Christoph Hellwig , Qais Yousef Subject: [PATCH v2 0/2] sched: blk: Handle HMP systems when completing IO Date: Fri, 23 Feb 2024 15:57:47 +0000 Message-Id: <20240223155749.2958009-1-qyousef@layalina.io> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Due to recent changes in how topology is represented on asymmetric multi processing systems like big.LITTLE where all cpus share the last LLC, there is a performance regression as cpus with different compute capacities appear under the same LLC and we no longer send an IPI when the requester is running on a different cluster with different compute capacity. Restore the old behavior by adding a new cpus_equal_capacity() function to help check for the new condition for these systems. Changes since v1: * Split the patch per subsystem. * Convert cpus_gte_capacity() to cpus_equal_capacity() * Make cpus_equal_capacity() return immediately for SMP systems. Qais Yousef (2): sched: Add a new function to compare if two cpus have the same capacity block/blk-mq: Don't complete locally if capacities are different block/blk-mq.c | 5 +++-- include/linux/sched/topology.h | 6 ++++++ kernel/sched/core.c | 11 +++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) -- 2.34.1