Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2651283rda; Wed, 25 Oct 2023 08:36:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1yG3TiYcx5gJYuPNEeU1o8GZyPzE91nXD56SCbLWnMzv9VKkQAsdG+I7rFGxs+cgj3nUF X-Received: by 2002:a81:7c82:0:b0:59f:6675:7771 with SMTP id x124-20020a817c82000000b0059f66757771mr15430314ywc.35.1698248200646; Wed, 25 Oct 2023 08:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698248200; cv=none; d=google.com; s=arc-20160816; b=pvbpjO9k0SHFHAx2XGptDZI4i3M2EsSATIYEgDTZtG59MsIDoHFo3rAExFlzDAJRIx 17PhtXL/2nnWSUpZGjP+5ER2HpX3mny9/lWjCU/icZYuYlrwvAPM/6UJkcCXRI4uiZVv XzUKVIeVqhswVVWkVzV3r8r9YY4M+sYbimkaVkc6VH+va4mCvfCdSQ3du+YdMvjATWGX TX+a2NY/7H6ZFI/RY509OY7vxBx9WLsWAOpx2maVwYCw1qww3m2hJ2F0PvpdQfLZnPqJ zgwQqYjJdGHuoqpgml8HSLV5lrVGCY/V0asVtmKyoyc3rP3rHnCo0UHYYzfuDBuLY1Ea 70wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=KnuRFrtZBpuNFclBQXRPUdRtFW5zT4PqP+dECAz1in8=; fh=6FC/CHvzMVjBsDPmrHVYDEl2B9/XtGS5nmVOlq0ACGM=; b=M22rEKOBvQon7eAcYfDSdTg5M2JyN/XTKuMcGSwb3ca3B3ayMKShcuznhY1f0LwLxf wqCLT/uPk265goxWSjMNJ7sQa+5hoPn9dzv2wz8rFJL8JZoYDcpM5FMBWoEvLNKL2+C7 39MsITxWm0qwhhAHezYbzwKw2sJp47ZhJ9ms2hcdmLCP2CtWC70UMrFvRukifdc+jTe6 NuqUDELhXU8eiPEeth8M7dpoEX8r93zq4gwRPvnjmuLnutdqG3zcfSx+FQ0Hdc8jgSZQ Vg9Ll2/WAgmGLrWyQ85lNiUQXPZiW2FnDClg7hZxzx4qRv8QAGSLCLHm96pjsldq0dkJ 7/7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=NV3EJssB; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b20-20020a81bd14000000b005ac228384a7si6728783ywi.518.2023.10.25.08.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 08:36:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=NV3EJssB; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C5E0B81197BB; Wed, 25 Oct 2023 08:36:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233509AbjJYPgH (ORCPT + 99 others); Wed, 25 Oct 2023 11:36:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232469AbjJYPgG (ORCPT ); Wed, 25 Oct 2023 11:36:06 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97006184 for ; Wed, 25 Oct 2023 08:36:03 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-7a66bf80fa3so68396639f.0 for ; Wed, 25 Oct 2023 08:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1698248163; x=1698852963; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KnuRFrtZBpuNFclBQXRPUdRtFW5zT4PqP+dECAz1in8=; b=NV3EJssB/gD7mnytYAR8oL2lO3wb1vxPsF3Qw5iUXUqHAX0WyqtSlreBv51uPBZ3Wx uA6XZJwBubT0cOOVa3wJR7Znnp2r0PerYZQF1oP7Bb34WQQLW39mqtFdbdEOV/MCzXgs H2pICO4HShxt70IU2VTKMK2H34qidpwrANPVhAKdhgHwxJopdiwIBlOL6icykjIM0Wus APvEjnp1MbagiV4mEn6EDOP5c/jDPQhhzk4eS6GEz4wQCYooGflMbbtywhKMS+RWUw58 jF8Um09bh3Pa3cOS41B9CxCUB4p4dtryaDjZUCN43/s/HP3C99X0njAxKDVcZo1Jr4y7 NXEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698248163; x=1698852963; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KnuRFrtZBpuNFclBQXRPUdRtFW5zT4PqP+dECAz1in8=; b=KGO6j/iiAo+0NtteTcrT5eWmXJ6J4VWYROiGQ6iQCBTj9ZfSYpGgnXhvH+1VKrLMNR cDjmjLusaRWMXGOwTtohL07oiYGxN9s+PlHZi96Utkfj72qSOfqNjKW4AlcGDEOk8KTw QWjcrnrtQQOo6CquLdU6AOWKhO2Mp354n4RjDg8hSR5RoSJp0rXp7PHm85uEWvUaKSAc vZ9wcrmkU/Y2iCh+7RSaPDac56pcIAioCfwxkSQfsACgR4CiNuX718WSTr3q1JsMr+xU msteHC6tP9MPzi7z+7UsSTU48Gwe2aClq2EHd91he8E9dxTUomGr6wtUQwfdHB/PaL9z QO9w== X-Gm-Message-State: AOJu0Yy/LSjBUUr1+0SQkc9BkfgMt4CnC2yBJaZZfw6XRk9q7vuBjxSF JmCchELbUHQmd4EH7rQW4bcf2Q== X-Received: by 2002:a5e:d70d:0:b0:79f:a8c2:290d with SMTP id v13-20020a5ed70d000000b0079fa8c2290dmr16583391iom.0.1698248162883; Wed, 25 Oct 2023 08:36:02 -0700 (PDT) Received: from [192.168.1.94] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id s8-20020a02cc88000000b004567567da78sm19032jap.151.2023.10.25.08.36.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Oct 2023 08:36:02 -0700 (PDT) Message-ID: Date: Wed, 25 Oct 2023 09:36:01 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: task hung in ext4_fallocate #2 Content-Language: en-US To: Andres Freund Cc: Dave Chinner , Theodore Ts'o , Thorsten Leemhuis , Shreeya Patel , linux-ext4@vger.kernel.org, =?UTF-8?Q?Ricardo_Ca=C3=B1uelo?= , gustavo.padovan@collabora.com, zsm@google.com, garrick@google.com, Linux regressions mailing list , io-uring@vger.kernel.org References: <20231017033725.r6pfo5a4ayqisct7@awork3.anarazel.de> <20231018004335.GA593012@mit.edu> <20231018025009.ulkykpefwdgpfvzf@awork3.anarazel.de> <74921cba-6237-4303-bb4c-baa22aaf497b@kernel.dk> <4ace2109-3d05-4ca0-b582-f7b8db88a0ca@kernel.dk> <20231025153135.kfnldzle3rglmfvp@awork3.anarazel.de> From: Jens Axboe In-Reply-To: <20231025153135.kfnldzle3rglmfvp@awork3.anarazel.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 25 Oct 2023 08:36:20 -0700 (PDT) On 10/25/23 9:31 AM, Andres Freund wrote: > Hi, > > On 2023-10-24 18:34:05 -0600, Jens Axboe wrote: >> Yeah I'm going to do a revert of the io_uring side, which effectively >> disables it. Then a revised series can be done, and when done, we could >> bring it back. > > I'm queueing a test to confirm that the revert actually fixes things. > Is there still benefit in testing your other patch in addition > upstream? Don't think there's much point to testing the quick hack, I believe it should work. So testing the most recent revert is useful, though I also fully expect that to work. And then we can test the re-enable once that is sent out, I did prepare a series. But timing is obviously unfortunate for that, as it'll miss 6.6 and now also 6.7 due to the report timing. FWIW, I wrote a small test case which does seem to trigger it very fast, as expected: #define _GNU_SOURCE #include #include #include #include #include #include #define BS 4096 #define FSIZE (128 * 1024 * 1024UL) static int set_file_size(int fd, off_t file_size) { off_t this_size; char buf[BS]; int ret; memset(buf, 0, BS); this_size = 0; while (this_size < file_size) { ret = write(fd, buf, BS); if (ret != BS) { fprintf(stderr, "write ret %d\n", ret); return 1; } this_size += BS; } fsync(fd); posix_fadvise(fd, 0, file_size, POSIX_FADV_DONTNEED); return 0; } int main(int argc, char *argv[]) { struct io_uring_sqe *sqe; struct io_uring_cqe *cqe; struct io_uring ring; off_t off, foff; int fd, i, ret; void *buf; if (argc < 2) { fprintf(stderr, "%s \n", argv[0]); return 1; } fd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC | O_DIRECT, 0644); if (fd < 0) { perror("open"); return 1; } if (set_file_size(fd, FSIZE)) return 1; if (posix_memalign(&buf, 4096, BS)) return 1; io_uring_queue_init(8, &ring, 0); i = 0; off = 0; foff = FSIZE + BS; do { sqe = io_uring_get_sqe(&ring); io_uring_prep_write(sqe, fd, buf, BS, off); off += BS; if (off == FSIZE) off = 0; io_uring_submit(&ring); ret = posix_fallocate(fd, 0, foff); if (ret < 0) { perror("fallocate"); return 1; } foff += BS; ret = io_uring_wait_cqe(&ring, &cqe); if (ret) { fprintf(stderr, "wait cqe %d\n", ret); return 1; } io_uring_cqe_seen(&ring, cqe); i++; if (!(i & 1023)) fprintf(stdout, "Loop iteration %d\n", i); } while (1); return 0; } -- Jens Axboe