From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 172E8C4332F for ; Thu, 2 Nov 2023 14:03:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8D8EA80027; Thu, 2 Nov 2023 10:03:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 889598D000F; Thu, 2 Nov 2023 10:03:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7503680027; Thu, 2 Nov 2023 10:03:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 66EB58D000F for ; Thu, 2 Nov 2023 10:03:50 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 1BC8540D89 for ; Thu, 2 Nov 2023 14:03:50 +0000 (UTC) X-FDA: 81413182620.13.015847A Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf08.hostedemail.com (Postfix) with ESMTP id B1665160291 for ; Thu, 2 Nov 2023 14:02:42 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=SX4WtNKm; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf08.hostedemail.com: domain of kbusch@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=kbusch@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698933762; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ruZCJ4w6ZzHVFH1NvqWDx3d8Cn0lU9vwUEKIRfvHctg=; b=HKMAWRkavkD58XjY5lggScLbdUBiRIZsTgzff2dkxvCL+/bojcWUPvPNwAD7W4UyKRB0cd UL14C4ykdDw/dFkjDM6u37/WbFb23uvmRpIv9cL5tr9VL6UI3vyU5GZJvxxuWNlJOi/OMq xSRcJsaPg3seXg7xnDDCIzGFlqE3xAI= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=SX4WtNKm; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf08.hostedemail.com: domain of kbusch@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=kbusch@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698933762; a=rsa-sha256; cv=none; b=wUOetIw36t94MIt28vNUZbYGXlJVBSoaOIDD5XydaIxqArEZTef4/tBhw18k92VmXX3r70 tcFmozA5xMzHRExbBo2DR3NXic/Dt+5XfoeasI197QSVbWxqw2KxzxejcwLxZ3rMmfCDti MfmI9PV06IFlDJRyds2U8pD7YNGtog0= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 58CB4B81CA1; Thu, 2 Nov 2023 14:02:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55B93C433C9; Thu, 2 Nov 2023 14:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698933759; bh=fgOZjn0WdFzXtcn8lGgDLoPHzxr8QdP2NR/ys5t0Tbc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SX4WtNKm5pDj9w492ahqKstWDnWh6M4sJIDEesfWnzHG+qb9Q4yNf6O/VTmBrzQ+B J+lN6pLndYpPJ2///jW3lO8ULdP1cvkId8z0QLLU9SCD1Vn3MCh+blaB22zqDAiR/o XR4l+VlEP7zQokYYie6zAycHpAphfEalcKMzDRGBY7DIFdzBxEoSIM1JcGC8CJxbij F9Ali9mUj5nbbM9wS1hvCdR6/H4SvGkafHYkIN0s4b7pqOGcZS/Zcm6+PYMZJDJNev 2MmTfCZEAoTWDPXuEvghazEUvKAcFhgHBcECGGT8wd3jtYaMQqEyBmgULjji+2X7SU nEdY57VcxKcNQ== Date: Thu, 2 Nov 2023 08:02:34 -0600 From: Keith Busch To: Ming Lei Cc: Hannes Reinecke , Ming Lei , Marek =?us-ascii?Q?Marczykowski-G'orecki?= , Jan Kara , Mikulas Patocka , Vlastimil Babka , Andrew Morton , Matthew Wilcox , Michal Hocko , stable@vger.kernel.org, regressions@lists.linux.dev, Alasdair Kergon , Mike Snitzer , dm-devel@lists.linux.dev, linux-mm@kvack.org, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org Subject: Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5 Message-ID: References: <98aefaa9-1ac-a0e4-fb9a-89ded456750@redhat.com> <20231031140136.25bio5wajc5pmdtl@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: B1665160291 X-Stat-Signature: hn5an9gf33oaai7qaqh885c8trtyjqii X-Rspam-User: X-HE-Tag: 1698933762-111175 X-HE-Meta: U2FsdGVkX1++X6DKPBRu8JLh52ZPtFidKqYd3AdediQzVIC0dYFaVFG6uxGxeo3bZkInzpg6UFnI1x59sIQAHK0cppDqoXmVpbVfy7+CTH5lsj/ViV1ymWnYiURKzHEJswN16T65FU5NYoJN3X2htk0IAOO3zhBvzKFmxjnHAJfTXz+wuIMOLlUHd0Co11hSISN68G0uvY6ln8puv3W6CwKuJShMYFppxLOrGRZjrp2EakooYvx2bNrstQTe+CphExZMCYrKt0rlbqFGCMWMMIqyFtjmUaQ3HRVwJxKkOxhbgvbTXfmXqc+vq3eL9GsiAWHqywJ2/t8TqTnUfTzDNc5Qj88RsLh5eP+JZEBI0qrRMefjKsrV25fYdDf+gvbyN+SdSNemERPdTJ01lqcMNfCp9aEh+/WbvrvpXj09JwexVOaTx4N6eXpMXtNOoQSc8fnZ8CRIFswVXuOeATe9cMiODYFGP09QiedKiwC1kR928OILaNDXIDHi2BlFm4t9n5pQwJgBUB8G+B/Jf3MRoAb4nZ/nALVMcc1zbMYZ3+2wmxnf+XP/XZzK725RRL5diuvpoVXfhqzDSkwnCXJIoiF1sY1eOPf4R3gHHAdByah0Q+3zAMPkOTvFR6VL2ZXdHBOkeEyMkpCx4ubXxlNBGo3cY9T119GpacrReviptkimTyD8ZM5YNXSyxwscoZwR0lw3UAKtGSIOXaU/X4GUV/3HcKQORf3JIws5efUMlodUsTAa6yqOMEXcc6B5DvYaF12KgyBfjLx59UtaF9cYh+5nlt3HQuwZphb1xnv0EqkFvJfDYsotte88nNX5qbgRplkt9zi5DL4N/RNFviniK+PR6gd72RKK2IG6D3UXgXSLV5cyBZD4mfAE8mw80G49M6Zw5SIqAOBevPkx0Ks2O7QFn7hEoYZt0v2j1/3bAeYT7/UZ/lh2PFCIQNCGGYriBk8wEAp/aPjWmBNBo8B KcYB/3Kd I/NigBzwIStqJn0SJI+gTQokFJHq9WPVKikPMTtW3t1KZhE9QBhGWXebpaeGT8RroMpT8XncNSdcgPjvkS3C0tgp8p4HfZ7/vuhxEAJC76JuWcYCrXSKY8FIq26o+rgmngGu+OoH19KZN34xkGPZfWe4UWppAnT4CPA0ZMJwhSlwZeNEJPcZqNmzZQQfozllouVqNvusSBX2r0b3mz+NnVd7EjFwS/8seRZMjrjsuWG+KaG3XBgmdeY46hkKS7kGrnYCVzkbcZKxizCCMtcy9sSbJyQTjxLikSc4xnoJ2GZ7Q/C0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Nov 01, 2023 at 07:23:05PM +0800, Ming Lei wrote: > On Wed, Nov 01, 2023 at 11:15:02AM +0100, Hannes Reinecke wrote: > > > nvme_queue_rq() on the above request. > > > > > And that is something I've been wondering (for quite some time now): > > What _is_ the appropriate error handling for -ENOMEM? > > It is just my guess. > > Actually it shouldn't fail since the sgl allocation is backed with > memory pool, but there is also dma pool allocation and dma mapping. > > > At this time, we assume it to be a retryable error and re-run the queue > > in the hope that things will sort itself out. > > It should not be hard to figure out why nvme_queue_rq() can't move on. There's only a few reasons nvme_queue_rq would return BLK_STS_RESOURCE for a typical read/write command: DMA mapping error Can't allocate SGL from mempool Can't allocate PRP from dma_pool Controller stuck in resetting state We should always be able to get at least one allocation from the memory pools, so I think the only one the driver doesn't have a way to guarantee eventual forward progress are the DMA mapping error conditions. Is there some other limit that the driver needs to consider when configuring it's largest supported transfers?