[{"id":3685137,"web_url":"http://patchwork.ozlabs.org/comment/3685137/","msgid":"<4be77745-2b7d-416c-b01a-88669d9bbeb8@oracle.com>","list_archive_url":null,"date":"2026-05-01T14:19:03","subject":"Re: [PATCH 0/3] ata: fix deferred QC handling for port multipliers","submitter":{"id":85141,"url":"http://patchwork.ozlabs.org/api/people/85141/","name":"John Garry","email":"john.g.garry@oracle.com"},"content":"On 01/05/2026 13:54, Niklas Cassel wrote:\n> Hello all,\n> \n> Tommy Kelly reported a regression with PMP that use CBS:\n> https://lore.kernel.org/linux-ide/ce09cc21-a8e9-4845-b205-35411e22fba9@tkel.ly/\n> \n> To me, this appears to be a problem in ata_pmp_qc_defer_cmd_switch() that\n> has been there since this function was introduced. ap->excl_link did not\n> always get set. This is fixed in patch 1/3.\n> \n> While looking at the code, when using a PMP with CBS, it turns out that we\n> are incorrectly using the deferred_qc feature that issues a QC via a\n> workqueue, even for non-NCQ commands that are issued to another link\n> (a link that is not the active link). This workqueue feature was meant to\n> avoid dealing with non-NCQ vs NCQ commands for a single drive, not to\n> duplicate the existing ap->excl_link logic. This is fixed in patch 2/3.\n> \n> While looking at the code, it turns out that the deferred qc issuing via\n> workqueue is misdesigned. It assumed that we can't mix NCQ and non-NCQ\n> commands on the same port. The limitation is that you can not mix NCQ and\n> non-NCQ commands on the same drive. However, with a PMP with FBS, you can\n> issue (mixed NCQ and non-NCQ commands) to the different drives. Thus, move\n> the saved deferred QC from struct ata_port to struct ata_link. This is\n> fixed in patch 3/3.\n> \n> Tommy, it would be nice if you could apply this series and see if it solves\n> your problem. Right now the series is compile tested only.\n> \n> \n\nHi Niklas,\n\nAs I understand, this deferred QC scheme was intended to solve \nstarvation problems for multiqueue SAS HBAs (using libsas-based \ndrivers). libsas has no port multiplier support, so I wonder why we make \ndeferred QC scheme work for port multiplier, i.e. non-libsas scenario.\n\nThanks,\nJohn\n\n> Niklas Cassel (3):\n>    ata: libata-pmp: fix ata_pmp_qc_defer_cmd_switch()\n>    ata: libata-scsi: do not use the deferred QC feature on PMPs with CBS\n>    ata: libata-scsi: do not needlessly defer commands when using PMP with\n>      FBS\n> \n>   drivers/ata/libata-core.c | 16 +++++++---\n>   drivers/ata/libata-eh.c   |  8 ++---\n>   drivers/ata/libata-pmp.c  | 13 +++++---\n>   drivers/ata/libata-scsi.c | 66 ++++++++++++++++++++++-----------------\n>   include/linux/libata.h    |  6 ++--\n>   5 files changed, 64 insertions(+), 45 deletions(-)\n>","headers":{"Return-Path":"\n <linux-ide+bounces-5620-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-ide@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256\n header.s=corp-2025-04-25 header.b=ZK4L2irM;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com\n header.a=rsa-sha256 header.s=selector2-oracle-onmicrosoft-com\n header.b=p/CRscl4;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-ide+bounces-5620-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com\n header.b=\"ZK4L2irM\";\n\tdkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com\n header.i=@oracle.onmicrosoft.com header.b=\"p/CRscl4\"","smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=205.220.165.32","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oracle.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=oracle.com"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g6Y8Q0lmPz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 02 May 2026 00:19:50 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id D62B23017C0A\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  1 May 2026 14:19:43 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D5C9A3859EC;\n\tFri,  1 May 2026 14:19:42 +0000 (UTC)","from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com\n [205.220.165.32])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 88D541A6834\n\tfor <linux-ide@vger.kernel.org>; Fri,  1 May 2026 14:19:40 +0000 (UTC)","from pps.filterd (m0246629.ppops.net [127.0.0.1])\n\tby mx0b-00069f02.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 6414GrwL622771;\n\tFri, 1 May 2026 14:19:12 GMT","from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com\n (iadpaimrmta02.appoci.oracle.com [147.154.18.20])\n\tby mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4drng8qftf-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n\tFri, 01 May 2026 14:19:11 +0000 (GMT)","from pps.filterd\n (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])\n\tby iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.7/8.18.1.7)\n with ESMTP id 641EGIOc015097;\n\tFri, 1 May 2026 14:19:10 GMT","from dm1pr04cu001.outbound.protection.outlook.com\n (mail-centralusazon11010036.outbound.protection.outlook.com [52.101.61.36])\n\tby iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id\n 4drm2gwhwb-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n\tFri, 01 May 2026 14:19:10 +0000 (GMT)","from DS4PPFEAFA21C69.namprd10.prod.outlook.com\n (2603:10b6:f:fc00::d54) by PH3PPF2B2347B8A.namprd10.prod.outlook.com\n (2603:10b6:518:1::792) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.26; Fri, 1 May\n 2026 14:19:07 +0000","from DS4PPFEAFA21C69.namprd10.prod.outlook.com\n ([fe80::9da2:46fe:4d63:a74b]) by DS4PPFEAFA21C69.namprd10.prod.outlook.com\n ([fe80::9da2:46fe:4d63:a74b%7]) with mapi id 15.20.9870.022; Fri, 1 May 2026\n 14:19:07 +0000"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777645182; cv=fail;\n b=dGiSvmS7hKIjWfB2uAvocKuGxf95/gyE6wr8ozp7QNU2k8MV/2MdvmgWD7l34T8VBAMm9TnOz1nKC70hbASGyz5FyRZXZRkcw2rAnCxfdRt6/KRXAoLLSLjCOu+AsPhNjeSZDOzLtyFsu0UJA9bvZK44aamK4t289aRBs3oVzsA=","i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=ZTXK6+us5CQk4/GDDyPH0iV0jYxexIcf3C0aVX/4JtEqVOoVAsOK4i5UQHj2JyI+nv2rmfx9DTV46jWQTIaTYP8bKqVPiQ7SID1irqp5JdTMWvcLxjL5GDajJPg9ajLKDXlqBCS5xIEIwYe0uKaRWsta3+edor93clCEjWiAVC0L4SK99ihT1DoYdmCn91r1YDpAOEYUBQeKzqZFW/oII+aQXK1wX12e9FK66SyQCu+H/HvIVYap+H3dcnQ9zLVZ1kgOHEJDvJJOd0YK0TjydIhAImebbydGOkyi2Z3dnXHI8nLuMftoi5bEDn32Rydt7GkKEzCeToQvIyUcBP4iGw=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777645182; c=relaxed/simple;\n\tbh=5mgd/Jr9Si5I09K0qJ4PfMTCi97kVIPxDB1iLgvL6w8=;\n\th=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:\n\t Content-Type:MIME-Version;\n b=qzSAV94wOTNIsnrUYejZkclAZs810ZFpFzlKH06/l/nw+tWgDiz8kJSSxE+FjB7jCYPXjg3FwjVYgDA0ubG+71ojWbIJ2LGcBuFwQVQ3PEK6vyODBSp9I49sd2VY73w3flW5wJevJvI9YuNpO/zoXhagdn7qjSqsQ60KL1ONRFg=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=c9/615yX9p2mfp38bF8U4poaNsHlsQ+yW2jJaJMsljI=;\n b=O4raERd7gklJyNrQ8Vuze3e0PS6vSftisZHBTBz7grscI7YLW/+o3ZK0KsFor+//jxotN4LFfjoUTlQJFuOvvAvPZF521HEcRr4khcpUGQQJ3HBHU0uXiMbgOOAYN+YB+fh/vakw8LuRp6BuFeQFPgJj7LP4VBhT+oNygOM1//a/zePn2tGUXwno7z/hfe5PB1ddh3wvJ3GcsbOBgon8/SQX/1rJUvcaSM+7v08t8kYnl1AyjBvnqEYwVZf2t1rezRJ0GZnXJeovBmc2m7ajOGYrDrvGL+x6VTGye4qs0JCVPJOHAAIuQYPrplfXV69y0RiXXETY9BiFIEkbKYRwOQ=="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oracle.com;\n spf=pass smtp.mailfrom=oracle.com;\n dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com\n header.b=ZK4L2irM;\n dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com\n header.b=p/CRscl4; arc=fail smtp.client-ip=205.220.165.32","i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;\n dkim=pass header.d=oracle.com; arc=none"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc\n\t:content-transfer-encoding:content-type:date:from:in-reply-to\n\t:message-id:mime-version:references:subject:to; s=\n\tcorp-2025-04-25; bh=c9/615yX9p2mfp38bF8U4poaNsHlsQ+yW2jJaJMsljI=; b=\n\tZK4L2irMvk3lhYyu8BbN9br9sRJXBv42DKIP2olJtoYndecunCbXoMq/ZHuf5FOQ\n\tspvN/5ABb/aZy4JMyaKbBeSYf18gnBGmdTRCs08uhQmTpKIRoLvIXZ2mVGRunkGy\n\tW7w4yYj+XLCgKb/icmS0xW2Hu+TKNZPVNF6rW7uCFdtuofzSxx6WqSwPxfUFN/+3\n\tT3HacmMo/CzikAWFBINTBt2FrBQEkwMGkvwbSkheBWyQB1zLKvXkywwLRcfSOG3N\n\tlUoToxqoZsqoy6qgY22Sj+P/fAxodDJTWrWZwexKiIJ3w9+3FS3Preghn6lSgxLo\n\tHdFncttsSN1TkVPt7uHj5w==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=c9/615yX9p2mfp38bF8U4poaNsHlsQ+yW2jJaJMsljI=;\n b=p/CRscl4YCYeSWLc8/3vF7Vgde8JN1KJlXoloBy8+v8tAxVCrgb5FLXQgDlkpJZQ9qqLCtfgZQfV5OwvikTab5w7DeUUzX7/FE9z/d4YJ6UzOqfOa0dO3q6+Wn1AUA4fOaoxG/squ84nKpZPxBbUQGXZOfSxGif73yXXTWgqShA="],"Message-ID":"<4be77745-2b7d-416c-b01a-88669d9bbeb8@oracle.com>","Date":"Fri, 1 May 2026 15:19:03 +0100","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 0/3] ata: fix deferred QC handling for port multipliers","To":"Niklas Cassel <cassel@kernel.org>, Tommy Kelly <linux@tkel.ly>,\n        Damien Le Moal <dlemoal@kernel.org>, Tejun Heo <htejun@gmail.com>,\n        Jeff Garzik <jeff@garzik.org>,\n        \"Martin K. Petersen\" <martin.petersen@oracle.com>","Cc":"linux-ide@vger.kernel.org, hare@suse.de","References":"<20260501125410.1204490-5-cassel@kernel.org>","Content-Language":"en-US","From":"John Garry <john.g.garry@oracle.com>","Organization":"Oracle Corporation","In-Reply-To":"<20260501125410.1204490-5-cassel@kernel.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-ClientProxiedBy":"FR2P281CA0150.DEUP281.PROD.OUTLOOK.COM\n (2603:10a6:d10:98::11) To DS4PPFEAFA21C69.namprd10.prod.outlook.com\n (2603:10b6:f:fc00::d54)","Precedence":"bulk","X-Mailing-List":"linux-ide@vger.kernel.org","List-Id":"<linux-ide.vger.kernel.org>","List-Subscribe":"<mailto:linux-ide+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-ide+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"DS4PPFEAFA21C69:EE_|PH3PPF2B2347B8A:EE_","X-MS-Office365-Filtering-Correlation-Id":"2de41cbc-f431-465f-0db9-08dea78c9af5","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"\n\tBCL:0;ARA:13230040|366016|376014|1800799024|56012099003|18002099003|22082099003;","X-Microsoft-Antispam-Message-Info":"\n\teE5KrleeSvDUrLQUu3fsn310Lrm5TBeyrPdsdB5vS9XrSJVF6vbNWbQ2mg6FkZ3RFs4PsiN6lWMVezNHcmoE4B8/KBN2Mnew6+Q9me36f697V6Q0WC9YQJ2mxyS//iJ/xtQnB8zGFWELGALwFog0SIKY+CgOkSl1SIXSvh9SR/fku4d+TQW5ALJDtdGGyO3UVYbTOI0AugvoSug+9MGHI4J4xOLcNrNJpkQJXhLVUgBdQz42GGqgBjuZUirND80Jv8SbSkjSODh8+ijI2hJX6+/vYIaPRnv7NLU6wDJFJq8ZChjsGRgfK7fC0/OWwdUgYH0j+9zZB7G0zUQ+knqfL2ZgWqR9NIpNbJimgiqC8mng3d/CzwmON+kgojmNUov6Aa0yA6I4UGSFOQnPDppnQWI7UJpwh1l1pXB1AoK/ikpKIzU2tgKsnozDf8syaR5RSoNeW6BtrRfoz7p4/zWSegfE/BouWtXlUTm9vkm8i4sztcPkGQazJEC2Ty2Tt4cFNvfQbypXoqCej7+52LjVFI/rOgdDDmKhBbYagpDx0/+e5gKjO7uMaUT2L0LaUo25T5Hcc4PTJR6Gk8U+rAjFtVSw2h4B/J6On72V/mU2B4P2fBhPXI4uZD8rSYlgxm5cfBHOnBHGa6jf50v9bGoYCw==","X-Forefront-Antispam-Report":"\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS4PPFEAFA21C69.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?XvZEDhDeE0DOLUcH3fnid0Ednqv1?=\n\t=?utf-8?q?1eFymXlDLUtGq8fkr5hNbdV43qgLyLF+c571A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W9mj1lK1EKZFUOOxflLjdYle1GgVz1rvg6GCaJo3zo9phbRQ34Ex73Mo3Spy+izEIa7DiNkfT4K64fXP3ZFGRbArP1r683IffPrfQrVtZCCTZuBSrLndLDsDRn8iYui/xvHQGDh/WIFFUhZwHckm8nugOOok7qAyhgSqZ5zaapWIcyErynDdBsaW0web8q+q2e3V36ew29V/8HBH8IUCXZ2y9uIjkHa6X43YqDWrsUKTbHj1fdda5BENIjZ0AKFEiKJ6hrKbYFXnqAJQotzxuDmDz2BXOMq/LXF/U0ol2PNDxho09AEsG1DP6+axNtvrHEb/G5ZHw==","X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0":"\n\tiq7FTO71xiTkTPiSAdDNEv5/oKNxhA/2rvR1X9VCSzSbEa+So5XJ+litqRvA8qLY586r5MzVSYeOo3JMzjmgaqCMaIrvS+F6wcAFKoWvg6sxElJORzpmbvfBdHVoL14f3qRf5F3YKaDLCNNsgwJ4+7fatuVQTZxEDWfwIwtEZ8uJPqbbeKGhZ1fHDnZoc0gn8UpkezSSKYuLykWja0SxYYFejYMoDbmOEDwacDz0JM9ohJwdWLMGA8+GmWZiCms1DCmJl+PqA6jC41dcXKDzx0rLniu1cOuaIZZwSGs+ZxUe1sCEsjkVIzmYTHV9DETyKzBdSle5oJrMxyXFXp9qMxVNdeB4BSmm1gCBH3KK2mY7xzk/YBZga0vYGLi1x9KlWaV02f+IO2zoOO+8gNcIPWMaFi+9M6CfVLh00rlJO3Jgc5+/UKQLSwOACxaxmBTdoqAvCA6VRUc4jqlKzcSMvwKxFBtpuSn7YQeZHOQ+goXFsvza1qlaFJYWUqZEj+YDbtx63j94SzKvYrlnW3IMt/La//YqhEGmMJPQ4ZxNNlQOYELR+BPMivxbnbX+YbSspLflPkE00dtKQgVwhvUBVUMFxwzBxYFzFocJKdlVwL0=","X-OriginatorOrg":"oracle.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n 2de41cbc-f431-465f-0db9-08dea78c9af5","X-MS-Exchange-CrossTenant-AuthSource":"\n DS4PPFEAFA21C69.namprd10.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"01 May 2026 14:19:07.1501\n (UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"4e2c6054-71cb-48f1-bd6c-3a9705aca71b","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"\n zeDAC6f4xC90PWFDOh3RX00EuTZaVc4N7mP6JNgAvi2ks63x9bowztr3LLDhh2FB9s+C/x0N/QdnI1Sgco8hqg==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"PH3PPF2B2347B8A","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-05-01_04,2026-04-30_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=notspam policy=default score=0 phishscore=0\n mlxlogscore=999 bulkscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0\n spamscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx\n scancount=1 engine=8.19.0-2604200000 definitions=main-2605010139","X-Authority-Analysis":"v=2.4 cv=U7uiy+ru c=1 sm=1 tr=0 ts=69f4b65f b=1 cx=c_pps\n a=e1sVV491RgrpLwSTMOnk8w==:117 a=e1sVV491RgrpLwSTMOnk8w==:17\n a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19\n a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10\n a=NGcC8JguVDcA:10 a=GoEa3M9JfhUA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=jiCTI4zE5U7BLdzWsZGv:22 a=EIcjfB9IiI4px24ztqRk:22 a=VwQbUJbxAAAA:8\n a=07-hrkyYv0_hsO-RJ1gA:9 a=QEXdDO2ut3YA:10 cc=ntf awl=host:13840","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNTAxMDEzOSBTYWx0ZWRfX3Q4HLiUcI0xx\n n5DISK6ezu0RmAM8mjFE5SlMXn5resc0mXvkzPxFw6A99EKw8/RncZbEIEhhIyttbk/Nfagiykz\n atDDROnMAfnIrox0yc4UeE2X9A+r+qdgjzXS4mF/q7AoTIo71CczcVEeNyPt+IOL03db0xaqzVq\n k/2DH4uIdwsSdFBlDUnjIFedoQMk1HK4T/l9bvbROyJQPQkmMEmAbasjo/fXX7hCcs5W93OENDb\n P5e6NE278NM+woDZ572VKZFpY5tNZrBAxzS9Pa1pTbMEe+8D1OWL3pYdpMmNeJS7eROhtIQuz2Q\n 4Ix0LrJFHgWdSwnJRNm4fnZ7wJ/omAwUrech9RAwN2lkMV2PMm6KQizBy4YJDMiJPPS9JIvczTe\n JSK7mGcy1ofE5hGXty2K2YkONP76FqfV2ZX7aNFjsJYSriA5OVOfdMEewQgMzIW3Fsqe+2ajIkj\n hiamEd4FIUV4BV/Z8TXvApMXQ+maSTuggMS2vePM=","X-Proofpoint-GUID":"vZfQ-TGaUE-mPhNeAqTt6Y3ttx4eWHdN","X-Proofpoint-ORIG-GUID":"vZfQ-TGaUE-mPhNeAqTt6Y3ttx4eWHdN"}},{"id":3685208,"web_url":"http://patchwork.ozlabs.org/comment/3685208/","msgid":"<afT0INMUg7scssxk@fedora>","list_archive_url":null,"date":"2026-05-01T18:42:40","subject":"Re: [PATCH 0/3] ata: fix deferred QC handling for port multipliers","submitter":{"id":87751,"url":"http://patchwork.ozlabs.org/api/people/87751/","name":"Niklas Cassel","email":"cassel@kernel.org"},"content":"On Fri, May 01, 2026 at 03:19:03PM +0100, John Garry wrote:\n> On 01/05/2026 13:54, Niklas Cassel wrote:\n> \n> As I understand, this deferred QC scheme was intended to solve starvation\n> problems for multiqueue SAS HBAs (using libsas-based drivers). libsas has no\n> port multiplier support, so I wonder why we make deferred QC scheme work for\n> port multiplier, i.e. non-libsas scenario.\n\nAre you certain that there are no libsas HBAs that support port\nmultipliers?\n\n\nBasically, before commit:\n0ea84089dbf6 (\"ata: libata-scsi: avoid Non-NCQ command starvation\")\n\nWe always aborted a new command, if that would have caused NCQ and non-NCQ\ncommands to be mixed on the same device.\nRegardless if libsas driver or any other SATA driver, e.g. AHCI.\n\n\nAfter commit:\n0ea84089dbf6 (\"ata: libata-scsi: avoid Non-NCQ command starvation\")\nIf sending a non-NCQ command while NCQ commands are in flight,\nwe instead save the non-NCQ command and issue it as soon all NCQ\ncommands are finished, from a workqueue.\n\nThis commit changed the behavior both for libsas based drivers and\nall other SATA drivers, including AHCI, which does support Port\nMultipliers.\n\nAs you might now, Port Multipliers are not that common, and I think\nsimply no one tested the change on Port Multipliers before the change\nwas included.\n\n\nAs you can see in patch 2/3, we basically stop using this deferred QC\nissuing via workqueue for Port Multipliers with CBS - when sending\ncommands to different devices.\n\nFor Port Multipliers with FBS support, or PMPs with CBS support where\nissuing commands within the same drive, we are still using it.\n\nFor PMPs with FBS, I don't see any problem of keep using the workqueue\nto issue a deferred QC. It should basically be the same as if directly\nconnected on the port. (There is no extra logic to handle ap->excl_link.)\n\n\nFor PMPs with CBS, we could keep the same behavior as before, and just\nabort the command, if NCQ and non-NCQ are mixed.\n\nThe advantage is that the workqueue issuing would not be able to somehow\ncollide with the ap->excl_link handling for CBS PMPs. Looking at the code,\nit \"should work\", because we always will always have ATA_QCFLAG_CLEAR_EXCL\nset on the QC issued by the workqueue.\n\nThis would require that we know that PMPs (with CBS) can't be used on\nlibsas based HBAs. Hell, we could probably do that if we wanted to, since\nI don't think that people using an expense SAS HBA with a cheap CBS PMP\n(does not not even support FBS) is very common in practice.,,\n\n\nKind regards,\nNiklas","headers":{"Return-Path":"\n <linux-ide+bounces-5621-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-ide@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=ELOXszeS;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-ide+bounces-5621-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"ELOXszeS\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g6fzr2x0zz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 02 May 2026 04:42:48 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id A681F30075DF\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  1 May 2026 18:42:46 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 30D7034E771;\n\tFri,  1 May 2026 18:42:46 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E6FD34D4FE\n\tfor <linux-ide@vger.kernel.org>; Fri,  1 May 2026 18:42:45 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 33B39C2BCB4;\n\tFri,  1 May 2026 18:42:42 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777660966; cv=none;\n b=lb8n/CY4u1b0C5dojzMGntwyRPwVuqCjhYztIE5qkCCMpm5WEpXjFZfOw2OWLEAXRNV8uGs66lhWfEfmzCsnK2/JqCR9Q1y+ylZGlC0aYtLrO1L5DiYxVXIz8ogrHj7scP7gZEvRsASjH1TTuP5QaRmy5Es/viMooub56EklcZ4=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777660966; c=relaxed/simple;\n\tbh=S/u4KZO1AO9TH54BDWTok7pWhcLnHgz22mW0i3pJN1k=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=h/gAyLlBZ4ouZrmexVGbEUvz7QI3afus/7uSVtLdXIrCT4jHwcl+X6y0i4RbhfvAZDEEZ5LsfxuXgxwbkhHEyrJuh/Z6yKOe7qSNTO32C8YgE1BKC43iTw3yIdVqxm6ALq4yFxLCcCUwzlJDccu1Ioc34ts7Adx61yQuj78Zf3U=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=ELOXszeS; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1777660965;\n\tbh=S/u4KZO1AO9TH54BDWTok7pWhcLnHgz22mW0i3pJN1k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ELOXszeS74053cVL3VmdlvLVrG36eoWbBFYrL3aBcPSnOc4CoYaG2mXkUWn9qBLWs\n\t VaC11U1mhYxoazOddPe7jaE31bxbdfzOAiz6n7HGrbikbH7Iag80a23XsCWvviZAnD\n\t HMjaXeTqw10l7E5kqAB+iWC5dPUxuNvaVOKqrhHlflxWvKcnj1vJMIDnnCebCUsun9\n\t Jmo0IJz9iNX5rt6LWxhsnTAWncgOxsV8JHk0k1P2HT6gVKimSfIHfgXE2Pa6mIhhuy\n\t FDcQmnMr2SJqzAEoA5Qg6JvoUPgP6vmYjHYC2+sOCqJBwjuuOTDpC1pc2Is6Dc4xc8\n\t G1VjUCRxBoHvQ==","Date":"Fri, 1 May 2026 20:42:40 +0200","From":"Niklas Cassel <cassel@kernel.org>","To":"John Garry <john.g.garry@oracle.com>","Cc":"Tommy Kelly <linux@tkel.ly>, Damien Le Moal <dlemoal@kernel.org>,\n\tTejun Heo <htejun@gmail.com>, Jeff Garzik <jeff@garzik.org>,\n\t\"Martin K. Petersen\" <martin.petersen@oracle.com>,\n\tlinux-ide@vger.kernel.org, hare@suse.de","Subject":"Re: [PATCH 0/3] ata: fix deferred QC handling for port multipliers","Message-ID":"<afT0INMUg7scssxk@fedora>","References":"<20260501125410.1204490-5-cassel@kernel.org>\n <4be77745-2b7d-416c-b01a-88669d9bbeb8@oracle.com>","Precedence":"bulk","X-Mailing-List":"linux-ide@vger.kernel.org","List-Id":"<linux-ide.vger.kernel.org>","List-Subscribe":"<mailto:linux-ide+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-ide+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<4be77745-2b7d-416c-b01a-88669d9bbeb8@oracle.com>"}}]