Message ID | 20240223155749.2958009-1-qyousef@layalina.io |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-78658-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp673873dyb; Fri, 23 Feb 2024 07:59:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXbQ+lSDaT7RAQCCYIz1b/Wjg6nePrG1ugyMRMFGsQSWWkRxLNHCUxeqdpKMEpNvxhuhrIXOVtd9B/iXvvlSv/d85kz0g== X-Google-Smtp-Source: AGHT+IHcE1oKU6mZk9QW478+KcymC58jY6tkEwUyz7NAqICZC+dLaqbNsWVJwVc/obLHtDk6I0qb X-Received: by 2002:a17:906:780e:b0:a3e:7dbe:298b with SMTP id u14-20020a170906780e00b00a3e7dbe298bmr163471ejm.24.1708703986061; Fri, 23 Feb 2024 07:59:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708703986; cv=pass; d=google.com; s=arc-20160816; b=QdDdXKaxbnrj0tMzOdJJXdJ9nspeklzyCdxXfviGOnuLoYc5VENh8jX6loGPIpJunH xmVN2WDXuPmezQ60ibQ8yLS7u+uX2nQrDXzlaKh0sUBasokOcwimiI68dQEha0eaXby2 BERRlEZCKv8DKzF/uconQ3jpD8n+cQM3M22cuds8jEWBKYku+PGXXKJWAYlvftcT1mUX GdFPI1tv90EorE+hndf2EeDbHanjxieiq7AobKxET2OqV10pMbVP4dZVbS85n/swLUb+ IQ+ydPwOYdC3RnOBG8hIKVGAGkdM1VXpIz1LFzeky1XEv3E4uV44B4e1tViGNb8gGdAa biUw== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78658-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gt7-20020a1709072d8700b00a3e61672d07si5649964ejc.369.2024.02.23.07.59.45 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 07:59:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78658-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78658-ouuuleilei=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 AD0EB1F26BFD for <ouuuleilei@gmail.com>; Fri, 23 Feb 2024 15:59:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B847126F2D; Fri, 23 Feb 2024 15:58:23 +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 <linux-kernel@vger.kernel.org>; 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 <linux-kernel@vger.kernel.org>; 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 <qyousef@layalina.io> To: Jens Axboe <axboe@kernel.dk>, Ingo Molnar <mingo@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Vincent Guittot <vincent.guittot@linaro.org>, Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Sudeep Holla <sudeep.holla@arm.com>, Wei Wang <wvw@google.com>, Jaegeuk Kim <jaegeuk@kernel.org>, Bart Van Assche <bvanassche@acm.org>, Christoph Hellwig <hch@infradead.org>, Qais Yousef <qyousef@layalina.io> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791705990677270281 X-GMAIL-MSGID: 1791705990677270281 |
Series |
sched: blk: Handle HMP systems when completing IO
|
|
Message
Qais Yousef
Feb. 23, 2024, 3:57 p.m. UTC
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(-)
Comments
On 2/23/24 9:27 PM, Qais Yousef wrote: > 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. > nit: Did you mean !SMP systems here? Because in changes i see its returning true directly if its in !CONFIG_SMP path. > 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(-) >
On Fri, 23 Feb 2024 15:57:47 +0000, Qais Yousef wrote: > 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. > > [...] Applied, thanks! [1/2] sched: Add a new function to compare if two cpus have the same capacity commit: b361c9027b4e4159e7bcca4eb64fd26507c19994 [2/2] block/blk-mq: Don't complete locally if capacities are different commit: af550e4c968294398fc76b075f12d51c76caf753 Best regards,
On 02/24/24 19:13, Shrikanth Hegde wrote: > > > On 2/23/24 9:27 PM, Qais Yousef wrote: > > 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. > > > > nit: Did you mean !SMP systems here? > Because in changes i see its returning true directly if its in !CONFIG_SMP path. I was referring to this hunk + if (!sched_asym_cpucap_active()) + return true; in cpus_equal_capacity(). In SMP system the condition is always true and there's a static key that tells us if the system is asymmetric. > > > 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(-) > >