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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 741D3C4167B for ; Wed, 1 Nov 2023 12:17:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235098AbjKAMRb (ORCPT ); Wed, 1 Nov 2023 08:17:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235094AbjKAMRa (ORCPT ); Wed, 1 Nov 2023 08:17:30 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05FBD118 for ; Wed, 1 Nov 2023 05:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698841003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=a5UIfMBVdGIbdKNzRDMLvhiScyxGbvuh4NifZMx02eQ=; b=aZ5mEXzxW8/GXvcWV22XW6XEVVcUUYsiJy2VvSbnZE/m0hrDOahBJhGV8GLDIetUFI1vLy nD1tOHm1m5vekifavTUGz37hyayt5LE0nTFZyJ07ITCchI01okVR9jJJd0tim1tsZv7CN0 xEacZrM0LPOEctKBBIDvzET2qIOjmbs= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-633-rsj5tSE7PqiyMazlfvH37A-1; Wed, 01 Nov 2023 08:16:40 -0400 X-MC-Unique: rsj5tSE7PqiyMazlfvH37A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C7E02803022; Wed, 1 Nov 2023 12:16:38 +0000 (UTC) Received: from file1-rdu.file-001.prod.rdu2.dc.redhat.com (unknown [10.11.5.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA5C11121309; Wed, 1 Nov 2023 12:16:37 +0000 (UTC) Received: by file1-rdu.file-001.prod.rdu2.dc.redhat.com (Postfix, from userid 12668) id D85C230C2A86; Wed, 1 Nov 2023 12:16:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by file1-rdu.file-001.prod.rdu2.dc.redhat.com (Postfix) with ESMTP id D3EFE3FB77; Wed, 1 Nov 2023 13:16:37 +0100 (CET) Date: Wed, 1 Nov 2023 13:16:37 +0100 (CET) From: Mikulas Patocka To: Hannes Reinecke cc: Ming Lei , =?ISO-8859-15?Q?Marek_Marczykowski-G=F3recki?= , Jan Kara , 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, ming.lei@redhat.com Subject: Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5 In-Reply-To: Message-ID: References: <20231030155603.k3kejytq2e4vnp7z@quack3> <98aefaa9-1ac-a0e4-fb9a-89ded456750@redhat.com> <20231031140136.25bio5wajc5pmdtl@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, 1 Nov 2023, Hannes Reinecke wrote: > And that is something I've been wondering (for quite some time now): > What _is_ the appropriate error handling for -ENOMEM? > 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. > But if they don't we're stuck. > Can we somehow figure out if we make progress during submission, and (at > least) issue a warning once we detect a stall? The appropriate way is to use mempools. mempool_alloc (with __GFP_DIRECT_RECLAIM) can't ever fail. But some kernel code does GFP_NOIO allocations in the I/O path and the authors hope that they get away with it. Mikulas