Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp597588rbb; Sat, 24 Feb 2024 15:06:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXPSrfKQkrr5/Qj6rGmwVVAB6ZH93kjYRF/D5OjE2lKwAOVrlvty46ujQCPmKndlTEwu8jRD0WZdDup2uLblp3uJAmKuAMU7u3yk6Lp5w== X-Google-Smtp-Source: AGHT+IFd+OVg+Uj8yRgOtUL6LfqODaxC4TO7TYXQMsghn96CejgMTyxy+gg319I9Ubyq/Teju/+F X-Received: by 2002:a05:6402:d72:b0:565:a392:e50f with SMTP id ec50-20020a0564020d7200b00565a392e50fmr1335898edb.11.1708816006464; Sat, 24 Feb 2024 15:06:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708816006; cv=pass; d=google.com; s=arc-20160816; b=a9eO3m6L3OdBWIvZGN/Ope4tBgOTEwKOh6GiV0N+zECTIhv+GQqb2RmybKCIVvBN5b wSdvEVIdNylS4YXdhQOXuabwQmTpLioqGLyFUuPQMK4e0aIzhm3D43nIyvMyENL96e7M pmQRPyxVWuv+K+XTsFaxnNNHBmUz3e/fxDGTQSOJ9F+D9b59z9WBsMxsqV0wNqa3TIln Dwuu4B25eKc7kgs2jrDVYeXuaOoWtw/8B6ZSic/wgp66Q2zkGy0WGOZk8RCcu1MkhbGK E02JzT7+esr4oHWURmy+UTcXkZ5srytjm+alD7JDu0A45EwopoFQbE7VAQyPQlnuXIxa LIcw== 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=STRW+sDRKgDfYJ1/C7WIi910D5D2SyAksTFspCka2rw=; fh=xU1Wn3Zv0V9GxutBmNm71gaGi+36Sg3lZnw+FlMkyZk=; b=PwkmfSpa+5qB1JlHLDsIb9l1LtrXFvjgUYoWnzlzqcp1SCHx2T9c8iujEG91lFimoI aNde9qRl3Wu5iJ5pxEjPO5BBBBdU8MoYiUh5tN9xRynob3Dob6glXL+HYe7z+j4L8eYB TACckym49f5EPz/YAjFpgs8JnFkvI1addLcn7FkM5WUwA33p1m5xVjSpTjHuHTXkw+Nz ADvnNoBkZVcKo43Ao+to3NL20D5NbqcfxLx+FF9Id2jJXX7QnPd0QInRSkwXdPttSNGU JIHlkAA/q+NHDQMYzPSBKcwBjjRYzUfGOrYgHY7xCCtzkpnpMNctBzF/VLtDdBvA6wb0 w/5w==; 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=KOixnNfK; 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-79899-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79899-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 v15-20020aa7dbcf000000b005648b002d91si798237edt.524.2024.02.24.15.06.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 15:06:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79899-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=KOixnNfK; 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-79899-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79899-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 136B41F2133F for ; Sat, 24 Feb 2024 23:06:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B4B24EB3F; Sat, 24 Feb 2024 23:06:31 +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="KOixnNfK" Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 6F9D54D9F5 for ; Sat, 24 Feb 2024 23:06:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708815990; cv=none; b=TMRFLdpdwmJ4LeC4McZnJOhjE+esVLJa88aFTG6Ehoti0yieDl1vvzEFEriyEr+dSrXhSBwKBPMBxYHFmbXlO3zKOJZcWQxJL5o9Hf2Hp4W0S1Z+RNuwIeHAI6wTmqdc4RohUCA3bQXavY/SzK2vqMSkvrCZizfSQ2RFFp01EZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708815990; c=relaxed/simple; bh=kmA44JGlXCXr3hZ+2v5RomkzveC40+e4T6lxFB1zYms=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UrZWnmO3/FZdUIfanoAaLSOTnx2/YUuJtvszYDoxuAJyrsy3wsadhkq+0bB7JEAjT+b87WSoUjQPNmME1OPneBDOGCir4xsgPe24scBRvIkI3VjKUPMIUDz3GflLs8WD+2Qhtts61HgrvOB/vZ4gh/aEHEJyi5NAmkpfik5AV10= 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=KOixnNfK; arc=none smtp.client-ip=209.85.128.43 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-f43.google.com with SMTP id 5b1f17b1804b1-4128f5ec9b7so14541775e9.3 for ; Sat, 24 Feb 2024 15:06:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1708815987; x=1709420787; 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=STRW+sDRKgDfYJ1/C7WIi910D5D2SyAksTFspCka2rw=; b=KOixnNfKmo2/odIIn5pMB5Sbj4C+GhG3hUzG8DsseQnmCC8JVbtMDNUthcGZDpICzb TltFkYyywNstc6GlyT351Eh0jQ3DAIKXWeHV5c+IX9J/etYzzwCDcSB1+cS6qQF/UPPG s8TXD8LSSV/DizWuckxU19GUskjGQ4nw7kT7FSiQlf4cyx9LQHOWwA+AGf/4ERAbc0lW i7QCgnj/n4Vm4B2gT+/pYUYiZkxqcg2HLgbMVW8XJ7sitRvocxz8ARbNs2NVUio1uTe+ iucDlPAhgmdYeaausY+sS3asxuWmV87H+bAQmSxIqU+cGkeHfzi7/eUQSqWK2wbVamaA JCVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708815987; x=1709420787; 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=STRW+sDRKgDfYJ1/C7WIi910D5D2SyAksTFspCka2rw=; b=rfse+KAL4U1+84dsyaXjnvGF6QyEcKHXSBj/7zX+RywIv1LYllgLLM0qLqiQddp3X+ GrbuJMVyB2XOoKWuEDrZNj4axX2tzC9WkVHMjfYUfeBQEsDDoxpcdYLUoA50tasOxyGP TbzX6hsZ6oi8YLy1CGIwmjxd1JbNft35sTvwlBUNtneOy8/bo0ku1PRO0qP/8Qw/I6AD cNad6k1wiLScl13czVkLdfnpFqJY+YCUFU0LEq91m1s4rlVHPsqqw/wZhyJoKsVluXIO aqIZiRqpEe/BzPtp5P1CAOVVU6v0XFzLcr9zoUYbZhs1y2SeHzTW337hrB2e/3f3BfHX ajRw== X-Forwarded-Encrypted: i=1; AJvYcCVZGVxxYQIdl5ogtw3hXHLtRwNGNcggGMKc920kfoyeRJanxXqNuXta7b3UTHEWFdRXh1flta4s8KRBQhH0bMoW98XdYWxbczjqX5CD X-Gm-Message-State: AOJu0YwUBe6DLIkqO/wT19UwOQbhI7POFXDWAljuY9POGwu+22Jsk/6A aZSH3lakPscVgAfix/TxPaxCAK5yKII3LnjG1lLOsQCg/RSE912k0mE83w+GamY= X-Received: by 2002:a05:600c:3d09:b0:412:a1eb:4ef1 with SMTP id bh9-20020a05600c3d0900b00412a1eb4ef1mr231783wmb.9.1708815986783; Sat, 24 Feb 2024 15:06:26 -0800 (PST) Received: from airbuntu (host109-154-46-208.range109-154.btcentralplus.com. [109.154.46.208]) by smtp.gmail.com with ESMTPSA id 20-20020a05600c229400b004120675e057sm3415928wmf.0.2024.02.24.15.06.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 15:06:26 -0800 (PST) Date: Sat, 24 Feb 2024 23:06:24 +0000 From: Qais Yousef To: Bart Van Assche Cc: Jens Axboe , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Sudeep Holla , Wei Wang , Jaegeuk Kim , Christoph Hellwig Subject: Re: [PATCH v2 2/2] block/blk-mq: Don't complete locally if capacities are different Message-ID: <20240224230624.3sk3b5pmhoi67c3r@airbuntu> References: <20240223155749.2958009-1-qyousef@layalina.io> <20240223155749.2958009-3-qyousef@layalina.io> <8fc70827-9785-48d0-9a43-e1e3674317e9@acm.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=utf-8 Content-Disposition: inline In-Reply-To: <8fc70827-9785-48d0-9a43-e1e3674317e9@acm.org> On 02/23/24 08:09, Bart Van Assche wrote: > On 2/23/24 07:57, Qais Yousef wrote: > > diff --git a/block/blk-mq.c b/block/blk-mq.c > > index 2dc01551e27c..ea69047e12f7 100644 > > --- a/block/blk-mq.c > > +++ b/block/blk-mq.c > > @@ -1167,10 +1167,11 @@ static inline bool blk_mq_complete_need_ipi(struct request *rq) > > if (force_irqthreads()) > > return false; > > - /* same CPU or cache domain? Complete locally */ > > + /* same CPU or cache domain and capacity? Complete locally */ > > if (cpu == rq->mq_ctx->cpu || > > (!test_bit(QUEUE_FLAG_SAME_FORCE, &rq->q->queue_flags) && > > - cpus_share_cache(cpu, rq->mq_ctx->cpu))) > > + cpus_share_cache(cpu, rq->mq_ctx->cpu) && > > + cpus_equal_capacity(cpu, rq->mq_ctx->cpu))) > > return false; > > /* don't try to IPI to an offline CPU */ > > I think it's worth mentioning that this change is intended for storage > controllers that only support a single completion interrupt. Anyway: Sorry I didn't realize it is only applied for this scenario. > > Reviewed-by: Bart Van Assche Thanks for the reviews!