Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp729115pxj; Wed, 16 Jun 2021 12:10:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyOl6EL7MGyxKkAH1J014BxjbZaJ1rKH+MMFv8Uao3b6sc7oJAFNdcU2vwWOsZmU/g7Gro X-Received: by 2002:aa7:d785:: with SMTP id s5mr1566418edq.19.1623870648114; Wed, 16 Jun 2021 12:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623870648; cv=none; d=google.com; s=arc-20160816; b=V5yI8bzKTsMZhE8WJ2gqW/OqDzkKP949omDanhO1MZvM5L04aB52Pi8HdXuDwsBBR1 qxZ4cuwhO3LeeJ4I+9HjAuqyFbRnZA5eECnTxjJ5DWXQWo8lM8bgriUT+tqQm6JihzhY yNWcxPUtulbVhmLrZIJT5hKpq1iUg8YmG1WclX6jHab0AJOVXMlVp05u1sz/xID1LlAP 1TPDiuOcfJtvyPE3Ma8fwFODcn9BfyI8IR5piQqhbc8BK8ZnKQiOpjy6VyY3cMGG3LN5 fZp4vu7MZWU4LKGp5sjN5Sw2OXCaXVQjQV94b1Ayb595Oz7YbAw0I7haZui7idoBgCAg v3fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=NUpkIPkuLBZbpmv8ycOI8xP/GPpdpeIzjn4UH9JJkzY=; b=u7waYSMDFzl9BnwghomUD8s3DPLt45u999DRQD8IQPlIRxQCE1Hriidsq8tONt3WIk M56PvaNJR/t41AaGd0f1uxlxl8qfwROCdjs08JQvlE5xAcUtGD95qQeIF7Q3OK5ch3ah qKt7tBekBmaFwRRnH8heuDicCDaslp+bDOc7AomdKGmN/GKdocIsTcv+5S3bvKq5uZ+b jkZUP5HkuS1s6WKZ7uyNjhqB1Q2KjrcIFc83NPqf2MgJ8TN3OFlSWaYrEZ9ANnuRVcE6 cVZraqhpJhf9Ql6JN5Yq+aKiYVS/sMRyBb3ELWhkKIVLvWhcKf96GQd7apNY3o16RidR vk9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=GuSrZ6cq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si3168129ejo.362.2021.06.16.12.10.25; Wed, 16 Jun 2021 12:10:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=GuSrZ6cq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234101AbhFPOqp (ORCPT + 99 others); Wed, 16 Jun 2021 10:46:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234052AbhFPOqo (ORCPT ); Wed, 16 Jun 2021 10:46:44 -0400 Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 139B8C06175F for ; Wed, 16 Jun 2021 07:44:38 -0700 (PDT) Received: by mail-il1-x132.google.com with SMTP id q18so2542119ile.10 for ; Wed, 16 Jun 2021 07:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=NUpkIPkuLBZbpmv8ycOI8xP/GPpdpeIzjn4UH9JJkzY=; b=GuSrZ6cq+7PUQEsH1YYuQFvFe7mMD0xMifr3K9ngiIQUQaZhFQMd2HWzaHO/0uq9jb aJ9uyL/9hDC3ETzRsw+s1Y8fxcwPQvO2TUM84QfU6SxcFdhUTZDBWc/wgRt1hWr3ZF87 s4JQraWvTjIZDazpQT/SnalOh5Fg3Ok4zPsQYnLl0XY74KeVofee3a2lJP87C0Fdvfba ojxuKvgD74NDUoAXyomlMt4TFrhaiylhzPjk/Mybxvjp8+b6t+tF1WCpa7kNpOq85ZVR nC8pJ2vFMWpxBa23WlMASpHitOUR4cr7eayjwFPG2NW60+GT3VlpT2xt53t2OB2FeH5i FIRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NUpkIPkuLBZbpmv8ycOI8xP/GPpdpeIzjn4UH9JJkzY=; b=IR/9T/iMeHEUjRUHfB5fY5T0ICw6XpYI+FFIwaXajFRygAhwA3Ua2vODhUGmjhXYzq G5cIM2CBqoGZG7jRLxspmU2AiJD36JDjD13UNJ0vgz+xZc/TzOmCoC2SAIZOoDTZwEfT 1FvrAIyncQMZDePicrhGV//QRP01c2QXT51y1ANJkZB4TmXntH+VqTL9APmxpYvbM8yx Nw/TdoSI6c8dUG0PRgqWVIOIxIxXHIuAlDXBusscqXpKWvmfM9CRiuic1birlXmCvH+w ZdTY9V3Dohm2UYBuOaZm2Ui5aRqTHnCyq9S0KzFY/k/IrBXeB1MyytMWYNbSuon1SQaI 0DOA== X-Gm-Message-State: AOAM530Zsm0yHxfhqFtmDTpnr+ZAq/EkzAi5V33l5Ggo9UMr1SuY6Lal ennuTQ8D7RoTezeuQ+OqBrOCCyxnJpVddYd3 X-Received: by 2002:a92:2a0a:: with SMTP id r10mr24831ile.274.1623854677273; Wed, 16 Jun 2021 07:44:37 -0700 (PDT) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id z14sm1259028ilb.48.2021.06.16.07.44.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Jun 2021 07:44:36 -0700 (PDT) Subject: Re: [PATCH] io_uring: store back buffer in case of failure To: Pavel Begunkov , Olivier Langlois , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org References: <60c83c12.1c69fb81.e3bea.0806SMTPIN_ADDED_MISSING@mx.google.com> <93256513-08d8-5b15-aa98-c1e83af60b54@gmail.com> <4f32f06306eac4dd7780ed28c06815e3d15b43ad.camel@trillion01.com> From: Jens Axboe Message-ID: <6bf916b4-ba6f-c401-9e8b-341f9a7b88f7@kernel.dk> Date: Wed, 16 Jun 2021 08:44:36 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/16/21 8:01 AM, Pavel Begunkov wrote: > On 6/16/21 2:42 PM, Olivier Langlois wrote: >> On Tue, 2021-06-15 at 15:51 -0600, Jens Axboe wrote: >>> Ditto for this one, don't see it in my email nor on the list. >>> >> I can resend you a private copy of this one but as Pavel pointed out, >> it contains fatal flaws. >> >> So unless someone can tell me that the idea is interesting and has >> potential and can give me some a hint or 2 about how to address the >> challenges to fix the current flaws, it is pretty much a show stopper >> to me and I think that I am going to let it go... > > It'd need to go through some other context, e.g. task context. > task_work_add() + custom handler would work, either buf-select > synchronisation can be reworked, but both would rather be > bulky and not great. Indeed - that'd solve both the passing around of locking state which I really don't like, and make it much simpler. Just use task work for the re-insert, and you can grab the ring lock unconditionally from there. -- Jens Axboe