From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DB4731581D3 for ; Thu, 30 May 2024 12:02:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CF5ADE2A37; Thu, 30 May 2024 12:02:43 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B607CE2A37 for ; Thu, 30 May 2024 12:02:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E8E5E335D64 for ; Thu, 30 May 2024 12:02:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 832DAD for ; Thu, 30 May 2024 12:02:41 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1717070543.e9f56ab9ee755cdb0ac1635e3b7c3939049f79d0.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:6.9 commit in: / X-VCS-Repository: proj/linux-patches X-VCS-Files: 0000_README 2930_io-uring-sqpoll-ensure-task_work-fix.patch X-VCS-Directories: / X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: e9f56ab9ee755cdb0ac1635e3b7c3939049f79d0 X-VCS-Branch: 6.9 Date: Thu, 30 May 2024 12:02:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 50d01a22-15b1-4d27-bbbe-a85824f9a0e6 X-Archives-Hash: b257768e7c32e4197eff4e4a83a7691d commit: e9f56ab9ee755cdb0ac1635e3b7c3939049f79d0 Author: Mike Pagano gentoo org> AuthorDate: Thu May 30 12:02:23 2024 +0000 Commit: Mike Pagano gentoo org> CommitDate: Thu May 30 12:02:23 2024 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=e9f56ab9 Remove redundant patch Removed: 2930_io-uring-sqpoll-ensure-task_work-fix.patch Signed-off-by: Mike Pagano gentoo.org> 0000_README | 4 - 2930_io-uring-sqpoll-ensure-task_work-fix.patch | 115 ------------------------ 2 files changed, 119 deletions(-) diff --git a/0000_README b/0000_README index 41e4fabf..83130556 100644 --- a/0000_README +++ b/0000_README @@ -83,10 +83,6 @@ Patch: 2920_sign-file-patch-for-libressl.patch From: https://bugs.gentoo.org/717166 Desc: sign-file: full functionality with modern LibreSSL -Patch: 2930_io-uring-sqpoll-ensure-task_work-fix.patch -From: https://bugs.gentoo.org/931942 -Desc: sqpoll: ensure that normal task_work is also run timely - Patch: 3000_Support-printing-firmware-info.patch From: https://bugs.gentoo.org/732852 Desc: Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks to Georgy Yakovlev diff --git a/2930_io-uring-sqpoll-ensure-task_work-fix.patch b/2930_io-uring-sqpoll-ensure-task_work-fix.patch deleted file mode 100644 index 70e62a25..00000000 --- a/2930_io-uring-sqpoll-ensure-task_work-fix.patch +++ /dev/null @@ -1,115 +0,0 @@ -From mboxrd@z Thu Jan 1 00:00:00 1970 -Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) - (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 C0BC614884F - for ; Tue, 21 May 2024 19:43:52 +0000 (UTC) -Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.48 -ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; - t=1716320634; cv=none; b=KU/mCJ7mBHO+iHipnVTh5iJc7FxW5xbo1S24b4Vfx1HWcIChj7ieZ6M0D4Dly+m6CHUZ/xGmrFxNLNl+hJyl1SruXRuZGd2zsG87whd+SMirOeAcxfkjgTN9YcSuuAs+cr6WBGo33TXA1wYYEdcKAp5+2MtFRlOEfEpneQZ1jRI= -ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; - s=arc-20240116; t=1716320634; c=relaxed/simple; - bh=gaIkoP5Tt9ptNy9eqUxDwFHSVRdtXZdNQxS3gSxXieM=; - h=Message-ID:Date:MIME-Version:To:From:Subject:Cc:Content-Type; b=g/8jkVOwbG15NZZ75HTC/Dfc8RLdXo+ufUTtRf0leBrGhctRXfFOQcPJHuIp8HY9Wrch47B9oRjqZL6/m5CaK8aKCXZAQ7dCknHsT8yf8O7aMN+fNs+3QQ7EyZpc+3NjnHZ+NbtSEtGyK2eC5F75Apq4KjVZCYUl/lUQ5sCjIp0= -ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=Q/x459tT; arc=none smtp.client-ip=209.85.166.48 -Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk -Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk -Authentication-Results: smtp.subspace.kernel.org; - dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="Q/x459tT" -Received: by mail-io1-f48.google.com with SMTP id ca18e2360f4ac-7e1b8606bfdso19766539f.3 - for ; Tue, 21 May 2024 12:43:52 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1716320631; x=1716925431; darn=vger.kernel.org; - h=content-transfer-encoding:cc:subject:from:to:content-language - :user-agent:mime-version:date:message-id:from:to:cc:subject:date - :message-id:reply-to; - bh=T4xIoHSMmGrzeSfhPivp04fPK+A8FmMUIxCHFcE1zPo=; - b=Q/x459tTR9ak5EYWL/Ygb8HtLydtfqDpakjjofFDUwlF24E3mxFim/Nnw4x9AEj/vO - Nw0e7YouxTiSj9kxnTdLpVz9LuTMJxvPohmoXfgI9ReSCIJ1I95Dn70CZ1CiQW8bsad1 - /7LdSpIPqGK1OCnLphDgXdqqyBn/URkVCoVovoxwhWgmDm4DwKMePqCdecoZ/M/o9zr5 - yEPrJag55yEmCVL6Rfezs07paFsHgHAiX55syf6xBBP2ghaH18+oB8oeeHfbCnHxunNc - cTL4mATn49cvERCj4GYxEZWnSB/KVSJw2TQbs8VyyLJauzMx4Jk5S/lrhsMzDolCajWj - /Tyw== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20230601; t=1716320631; x=1716925431; - h=content-transfer-encoding:cc:subject:from:to:content-language - :user-agent:mime-version:date:message-id:x-gm-message-state:from:to - :cc:subject:date:message-id:reply-to; - bh=T4xIoHSMmGrzeSfhPivp04fPK+A8FmMUIxCHFcE1zPo=; - b=W1PQkCljf2qgJy1vEyfE6GT8FahYvbyD7b8TGqRMKaqyAI6lt9kofryakDyC3RKSSQ - FZsB+Gx9RQEUu40SOMfUjZQegR+zKaojOx6wtx37pRW85eJG4oNto15sFFfJQSwyKuyN - p61QuElnpiAFyaT2QpK3M3NctjaTKRzT+DhJ4+cK1Py69C+ZCqQiaCMgtkIycVWtaUWF - evEF260Bry0bjSBbdVfuDaic9WhdvMo2p8c726hK/Bu1CkRs3pGoxkNEHWPQlMmyxzRw - zZLB6bwYwQjFAJ6/O0m04m/74Qx1TvUSmx++KafWS0Mn2iVq7rbg/2gPYjLdH/wOoIVf - 637Q== -X-Gm-Message-State: AOJu0YyFIIKlIrtLfYpArCPZCQ5Jzozh7A3dzTYrVMDbjr9u4nAs/Wp7 - ixCpJUwEr1gVybpU68+EwAaRu/9iGdFdgduROcwRveqm10je+a40D0fqv3ilzfyy0QQWWxpTXCD - P -X-Google-Smtp-Source: AGHT+IHIvD2vBkh0fv6wTvoSX5+gjdHhX2Vpo1oJeclj6etBfpIA8v5xmG1uQE1/CW5TRH1jaVRaqw== -X-Received: by 2002:a05:6e02:148d:b0:36d:cdc1:d76c with SMTP id e9e14a558f8ab-371f617e0c6mr462975ab.0.1716320630872; - Tue, 21 May 2024 12:43:50 -0700 (PDT) -Received: from [192.168.1.116] ([96.43.243.2]) - by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-36cb9d3f219sm66602285ab.12.2024.05.21.12.43.49 - (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); - Tue, 21 May 2024 12:43:49 -0700 (PDT) -Message-ID: <45f46362-7dc2-4ab5-ab49-0f3cac1d58fb@kernel.dk> -Date: Tue, 21 May 2024 13:43:48 -0600 -Precedence: bulk -X-Mailing-List: io-uring@vger.kernel.org -List-Id: -List-Subscribe: -List-Unsubscribe: -MIME-Version: 1.0 -User-Agent: Mozilla Thunderbird -Content-Language: en-US -To: io-uring -From: Jens Axboe -Subject: [PATCH v2] io_uring/sqpoll: ensure that normal task_work is also run - timely -Cc: Christian Heusel , Andrew Udvare -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 7bit - -With the move to private task_work, SQPOLL neglected to also run the -normal task_work, if any is pending. This will eventually get run, but -we should run it with the private task_work to ensure that things like -a final fput() is processed in a timely fashion. - -Cc: stable@vger.kernel.org -Link: https://lore.kernel.org/all/313824bc-799d-414f-96b7-e6de57c7e21d@gmail.com/ -Reported-by: Andrew Udvare -Fixes: af5d68f8892f ("io_uring/sqpoll: manage task_work privately") -Tested-by: Christian Heusel -Tested-by: Andrew Udvare -Signed-off-by: Jens Axboe - ---- - -V2: move the task_work_run() section so we're always guaranteed it - runs after any task_work. Ran the previous test cases again, both - the yarn based one and the liburing test case, and they still work - as they should. Previously, if we had a retry condition due to being - flooded with task_work, then we'd not run the kernel side task_work. - -diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c -index 554c7212aa46..b3722e5275e7 100644 ---- a/io_uring/sqpoll.c -+++ b/io_uring/sqpoll.c -@@ -238,11 +238,13 @@ static unsigned int io_sq_tw(struct llist_node **retry_list, int max_entries) - if (*retry_list) { - *retry_list = io_handle_tw_list(*retry_list, &count, max_entries); - if (count >= max_entries) -- return count; -+ goto out; - max_entries -= count; - } -- - *retry_list = tctx_task_work_run(tctx, max_entries, &count); -+out: -+ if (task_work_pending(current)) -+ task_work_run(); - return count; - } - --- -Jens Axboe